/* =====================================================
   PH360 Premium Layout System
   PublishingHub360 / Authority / Library Sites
   Version: 1.0.0
===================================================== */

:root {
    --ph360-bg: #F7F9FC;
    --ph360-surface: #FFFFFF;
    --ph360-surface-soft: #F1F5F9;
    --ph360-border: #E2E8F0;
    --ph360-text: #1F2937;
    --ph360-text-soft: #64748B;
    --ph360-primary: #1F4E79;
    --ph360-primary-dark: #163A5C;
    --ph360-primary-soft: #E8F1FD;
    --ph360-accent: #4A90E2;
    --ph360-success-soft: #EAF7EF;
    --ph360-warning-soft: #FFF7E6;
    --ph360-radius-sm: 8px;
    --ph360-radius: 14px;
    --ph360-radius-lg: 22px;
    --ph360-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
    --ph360-shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.04);
    --ph360-container: 1180px;
    --ph360-reading: 820px;
}

/* Base */
html { scroll-behavior: smooth; }
body {
    background: var(--ph360-bg);
    color: var(--ph360-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--ph360-primary); text-decoration: none; }
a:hover { color: var(--ph360-primary-dark); text-decoration: underline; }

/* Containers */
.ph360-container,
.ph360-homepage-wrapper,
.ph360-site-main > .ph360-section,
.ph360-site-main > .ph360-home-section {
    max-width: var(--ph360-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}

/* Header */
.ph360-site-header { background: var(--ph360-surface); border-bottom: 1px solid var(--ph360-border); }
.ph360-topbar { background: var(--ph360-surface-soft); padding: 8px 0; font-size: 13px; }
.ph360-main-header { padding: 20px 0; background: var(--ph360-surface); }
.ph360-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.ph360-logo a { font-size: 28px; font-weight: 800; color: var(--ph360-text); letter-spacing: -0.5px; text-decoration: none; }
.ph360-primary-menu,
.ph360-topbar-menu { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.ph360-primary-menu a,
.ph360-topbar-menu a { font-size: 15px; font-weight: 700; color: var(--ph360-text); text-decoration: none; }
.ph360-primary-menu a:hover,
.ph360-topbar-menu a:hover { color: var(--ph360-primary); }

/* Hero */
.ph360-hero,
.ph360-custom-hero,
.ph360-section.ph360-custom-hero,
.ph360-home-section.ph360-custom-hero {
    background: linear-gradient(180deg, #F8FAFC 0%, #EEF5FF 100%) !important;
    color: var(--ph360-text) !important;
    max-width: var(--ph360-container);
    margin: 34px auto 44px;
    padding: 74px 46px;
    border-radius: var(--ph360-radius-lg);
    border: 1px solid var(--ph360-border);
    text-align: center;
    box-shadow: var(--ph360-shadow-soft);
}
.ph360-hero h1,
.ph360-custom-hero h1 {
    max-width: 920px;
    margin: 0 auto 18px;
    color: var(--ph360-text) !important;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -1.6px;
}
.ph360-hero p,
.ph360-custom-hero p {
    max-width: 740px;
    margin: 0 auto 28px;
    color: var(--ph360-text-soft) !important;
    font-size: 20px;
    line-height: 1.6;
}

/* Buttons */
.ph360-button,
.ph360-cta-button,
.ph360-header-cta,
.ph360-hero a[class*="button"],
.ph360-custom-hero a[class*="button"],
.wp-block-button__link,
button,
input[type="submit"] {
    display: inline-block;
    background: var(--ph360-primary);
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(31, 78, 121, 0.18);
}
.ph360-button:hover,
.ph360-cta-button:hover,
.ph360-header-cta:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--ph360-primary-dark);
}

/* Sections */
.ph360-section,
.ph360-home-section {
    background: transparent !important;
    padding-top: 44px;
    padding-bottom: 44px;
    margin-top: 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.ph360-section-title,
.ph360-home-section-title,
.ph360-section h2,
.ph360-home-section h2 {
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.6px;
    color: var(--ph360-text) !important;
    margin: 0 0 24px;
}

/* Section title styles */
.ph360-title-stripe .ph360-section-title,
.ph360-title-stripe .ph360-home-section-title {
    display: inline-block;
    position: relative;
    z-index: 1;
    padding: 0 8px;
}
.ph360-title-stripe .ph360-section-title::after,
.ph360-title-stripe .ph360-home-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 12px;
    background: var(--ph360-primary-soft);
    z-index: -1;
    border-radius: 5px;
}

/* Grids */
.ph360-grid {
    display: grid;
    gap: 22px !important;
}
.ph360-grid.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ph360-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ph360-grid.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Premium cards: smaller, cleaner */
.ph360-card,
.ph360-post-card,
.post-card,
.archive article,
.blog article {
    background: var(--ph360-surface) !important;
    border: 1px solid var(--ph360-border) !important;
    border-radius: var(--ph360-radius) !important;
    overflow: hidden;
    box-shadow: var(--ph360-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ph360-card:hover,
.ph360-post-card:hover,
.post-card:hover {
    transform: translateY(-2px);
    border-color: #CBD5E1 !important;
    box-shadow: var(--ph360-shadow);
}
.ph360-card img,
.ph360-post-card img,
.home .ph360-card img,
.blog .ph360-card img,
.archive .ph360-card img {
    width: 100%;
    height: 168px !important;
    object-fit: contain;
    background: #F8FAFC;
    padding: 12px;
    display: block;
}
.ph360-card-content,
.ph360-post-card-content,
.post-card-content {
    padding: 16px 17px 18px !important;
}
.ph360-card h3,
.ph360-card-title,
.ph360-post-card h3,
.archive article .entry-title,
.blog article .entry-title {
    font-size: 18px !important;
    line-height: 1.32 !important;
    font-weight: 850 !important;
    margin: 0 0 10px !important;
    color: var(--ph360-text) !important;
}
.ph360-card h3 a,
.ph360-card-title a,
.ph360-post-card h3 a {
    color: var(--ph360-text) !important;
    text-decoration: none !important;
}
.ph360-card p,
.ph360-card-excerpt,
.ph360-post-card p,
.archive article p,
.blog article p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--ph360-text-soft) !important;
    margin: 0 0 12px !important;
}

/* Category/collection boxes */
.ph360-category-grid,
.ph360-collection-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}
.ph360-category-card,
.ph360-collection-card {
    background: var(--ph360-surface);
    border: 1px solid var(--ph360-border);
    border-radius: var(--ph360-radius);
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--ph360-shadow-soft);
}
.ph360-category-card h3,
.ph360-collection-card h3 {
    font-size: 17px;
    line-height: 1.25;
    font-weight: 850;
    margin: 0 0 10px;
}

/* CTA / notice / text blocks */
.ph360-cta,
.ph360-notice,
.ph360-text-image,
.ph360-custom-block {
    background: var(--ph360-surface);
    border: 1px solid var(--ph360-border);
    border-radius: var(--ph360-radius-lg);
    padding: 34px;
    box-shadow: var(--ph360-shadow-soft);
}

/* Single ebook/post page */
.single-post .ph360-site-main,
.single-post article {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}
.single-post article {
    background: var(--ph360-surface);
    border: 1px solid var(--ph360-border);
    border-radius: var(--ph360-radius-lg);
    padding: 36px;
    box-shadow: var(--ph360-shadow-soft);
}
.single-post .entry-content {
    max-width: var(--ph360-reading);
    margin-left: auto;
    margin-right: auto;
}
.single-post .entry-title {
    font-size: clamp(34px, 4vw, 48px) !important;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.8px;
    color: var(--ph360-text);
}
.single-post .post-thumbnail {
    max-width: 520px;
    margin: 0 auto 28px;
}
.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--ph360-radius);
}

/* Hide home page title */
.home .entry-title,
.home .entry-header { display: none !important; }

/* Footer */
.ph360-site-footer,
.site-footer {
    background: var(--ph360-surface-soft);
    border-top: 1px solid var(--ph360-border);
    padding: 28px 0;
    text-align: center;
    color: var(--ph360-text-soft);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ph360-grid.columns-4,
    .ph360-category-grid,
    .ph360-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ph360-header-inner { flex-direction: column; text-align: center; }
    .ph360-primary-menu,
    .ph360-topbar-menu { justify-content: center; }
}
@media (max-width: 640px) {
    body { font-size: 15px; }
    .ph360-container,
    .ph360-homepage-wrapper,
    .ph360-site-main > .ph360-section,
    .ph360-site-main > .ph360-home-section { padding-left: 18px; padding-right: 18px; }
    .ph360-hero,
    .ph360-custom-hero { padding: 44px 22px; margin-top: 20px; }
    .ph360-grid.columns-4,
    .ph360-grid.columns-3,
    .ph360-grid.columns-2,
    .ph360-category-grid,
    .ph360-collection-grid { grid-template-columns: 1fr; }
    .ph360-card img,
    .ph360-post-card img { height: 190px !important; }
    .single-post article { padding: 24px; }
}
