/* =============================================================
   iStudyEBS Theme Stylesheet
   Version: 1.0.0
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
───────────────────────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --color-primary:          #C72D27;
    --color-primary-dark:     #a32420;
    --color-primary-light:    #e84040;
    --color-secondary-orange: #F7941D;
    --color-secondary-blue:   #0097D7;
    --color-secondary-green:  #92C83E;
    --color-neutral-dark:     #6E6E6E;
    --color-neutral-light:    #BEBEBE;
    --color-neutral-bg:       #F5F5F5;

    /* Text */
    --color-text:             #1a1a1a;
    --color-text-muted:       #6E6E6E;
    --color-text-light:       #999999;
    --color-white:            #ffffff;

    /* UI */
    --color-border:           #E0E0E0;
    --color-bg:               #ffffff;
    --color-bg-alt:           #F7F7F7;
    --color-shadow:           rgba(0,0,0,.08);

    /* Typography */
    --font-sans:   'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-serif:  'EB Garamond', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    --font-weight-light:   300;
    --font-weight-regular: 400;
    --font-weight-medium:  500;
    --font-weight-semi:    600;
    --font-weight-bold:    700;

    /* Spacing */
    --space-xs:   0.25rem;
    --space-sm:   0.5rem;
    --space-md:   1rem;
    --space-lg:   1.5rem;
    --space-xl:   2rem;
    --space-2xl:  3rem;
    --space-3xl:  4rem;
    --space-4xl:  6rem;

    /* Layout */
    --container-max:  1200px;
    --sidebar-width:  300px;
    --gap:            2rem;

    /* Borders & Radius */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-full: 9999px;
    --border:      1px solid var(--color-border);

    /* Transitions */
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

    /* Header */
    --header-height: 72px;
}

/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--font-weight-light);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ─────────────────────────────────────────────────────────────
   3. TYPOGRAPHY SCALE
───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: var(--font-weight-light);
    line-height: 1.25;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; font-weight: var(--font-weight-medium); }
h5 { font-size: 1.1rem; font-weight: var(--font-weight-medium); }
h6 { font-size: 1rem;   font-weight: var(--font-weight-semi); }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    border-left: 4px solid var(--color-primary);
    padding: var(--space-md) var(--space-xl);
    margin: var(--space-xl) 0;
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

code, pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
}
code { padding: 0.1em 0.4em; }
pre { padding: var(--space-lg); overflow-x: auto; }

/* Serif accent class (per brand guide) */
.serif, .entry-content blockquote, .footer-motto {
    font-family: var(--font-serif);
}

/* ─────────────────────────────────────────────────────────────
   4. UTILITY CLASSES
───────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.section-padding { padding-block: var(--space-4xl); }
.bg-light { background-color: var(--color-neutral-bg); }
.bg-white { background-color: var(--color-white); }
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap;
}
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    z-index: 9999;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { top: 0; }

/* ─────────────────────────────────────────────────────────────
   5. BUTTONS
───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-sans);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(199,45,39,0.3);
}
.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover, .btn-outline:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--color-white);
    color: var(--color-white);
}
.btn-white {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}
.btn-white:hover {
    background: var(--color-neutral-bg);
    color: var(--color-primary-dark);
}
.btn-secondary {
    background-color: var(--color-secondary-blue);
    color: var(--color-white);
    border-color: var(--color-secondary-blue);
}
.btn-secondary:hover { filter: brightness(0.9); color: var(--color-white); }

/* ─────────────────────────────────────────────────────────────
   6. HEADER
───────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    display: flex;
    align-items: center;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    height: 100%;
}

/* Site Branding */
.site-branding { flex-shrink: 0; }
.custom-logo-link img,
.site-branding img { height: 52px; width: auto; }
.site-name-link { text-decoration: none; }
.site-name {
    display: block;
    font-size: 1.4rem;
    font-weight: var(--font-weight-semi);
    color: var(--color-primary);
    line-height: 1;
}
.site-description {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Primary Navigation */
.main-navigation { display: flex; align-items: center; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
    position: relative;
}
.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a {
    color: var(--color-primary);
}
.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after,
.nav-menu > li.current_page_item > a::after {
    transform: scaleX(1);
}

/* Dropdown sub-menus */
.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 200;
    list-style: none;
    padding: var(--space-sm) 0;
}
.nav-menu > li:hover > .sub-menu,
.nav-menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-menu .sub-menu a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition);
}
.nav-menu .sub-menu a:hover {
    background: var(--color-neutral-bg);
    color: var(--color-primary);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.menu-toggle:hover { background: var(--color-neutral-bg); }
.hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: var(--radius-full);
    transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────────────────────────
   7. CONTENT LAYOUT WRAPPERS
───────────────────────────────────────────────────────────── */
.site-content { padding-block: var(--space-3xl); }

.content-wrapper {
    display: grid;
    gap: var(--gap);
    align-items: start;
}

/* Right sidebar layout */
.layout-right-sidebar {
    grid-template-columns: 1fr var(--sidebar-width);
}
.layout-right-sidebar .site-main  { grid-column: 1; }
.layout-right-sidebar .sidebar    { grid-column: 2; }

/* Left sidebar layout */
.layout-left-sidebar {
    grid-template-columns: var(--sidebar-width) 1fr;
}
.layout-left-sidebar .sidebar-left { grid-column: 1; grid-row: 1; }
.layout-left-sidebar .site-main    { grid-column: 2; grid-row: 1; }

/* No sidebar / full width */
.layout-no-sidebar { grid-template-columns: 1fr; }
.layout-home       { grid-template-columns: 1fr; }

.full-width { width: 100%; max-width: 860px; margin-inline: auto; }

/* ─────────────────────────────────────────────────────────────
   8. HERO SECTION (Home Page)
───────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #1a1a1a;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transition: transform 8s ease;
}
.hero-section:hover .hero-bg { transform: scale(1); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(199,45,39,0.85) 0%,
        rgba(26,26,26,0.75) 60%,
        rgba(0,0,0,0.6) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    padding-block: var(--space-4xl);
}
.hero-text {
    max-width: 680px;
    color: var(--color-white);
}
.hero-logo { margin-bottom: var(--space-xl); }
.hero-logo img { height: 80px; width: auto; }
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-light);
    color: var(--color-white);
    margin-bottom: var(--space-md);
    line-height: 1.1;
}
.hero-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.02em;
}
.hero-description {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--space-2xl);
    max-width: 540px;
    line-height: 1.8;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-md); }

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.hero-scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-full);
    position: relative;
}
.hero-scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-full);
    animation: scrollBounce 1.6s ease infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50%       { transform: translateX(-50%) translateY(8px); opacity: 0.4; }
}

/* ─────────────────────────────────────────────────────────────
   9. SECTION HEADERS
───────────────────────────────────────────────────────────── */
.section-header { margin-bottom: var(--space-3xl); }
.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}
.section-title {
    font-weight: var(--font-weight-light);
    color: var(--color-text);
    margin-bottom: var(--space-md);
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin-inline: auto;
    line-height: 1.8;
}

/* ─────────────────────────────────────────────────────────────
   10. HOW IT WORKS STEPS
───────────────────────────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}
.step-card {
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}
.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-card:hover::before { transform: scaleX(1); }

.step-number {
    font-size: 3rem;
    font-weight: var(--font-weight-light);
    color: var(--color-neutral-light);
    line-height: 1;
    margin-bottom: var(--space-md);
}
.step-icon {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}
.step-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-md);
    color: var(--color-text);
}
.step-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

/* Step card accent colors */
.step-card:nth-child(1) .step-number { color: rgba(199,45,39,0.15); }
.step-card:nth-child(2) .step-number { color: rgba(247,148,29,0.2); }
.step-card:nth-child(3) .step-number { color: rgba(0,151,215,0.2); }
.step-card:nth-child(4) .step-number { color: rgba(146,200,62,0.2); }

.step-card:nth-child(2)::before { background: var(--color-secondary-orange); }
.step-card:nth-child(3)::before { background: var(--color-secondary-blue); }
.step-card:nth-child(4)::before { background: var(--color-secondary-green); }

/* ─────────────────────────────────────────────────────────────
   11. POST CARDS & GRIDS
───────────────────────────────────────────────────────────── */
.posts-grid { display: grid; gap: var(--space-xl); }
.posts-grid-3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }

.posts-list { display: flex; flex-direction: column; gap: var(--space-xl); }

.post-card {
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.posts-list .post-card {
    flex-direction: row;
    border-radius: var(--radius-md);
}
.post-card .post-thumbnail,
.post-card > a.post-thumbnail { display: block; overflow: hidden; }
.posts-grid .post-card .post-thumbnail { aspect-ratio: 16/10; }
.posts-list .post-card .post-thumbnail {
    flex-shrink: 0;
    width: 280px;
    aspect-ratio: unset;
    min-height: 180px;
}
.post-card .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.post-card:hover .post-thumbnail img { transform: scale(1.04); }

.post-card-body { padding: var(--space-xl); display: flex; flex-direction: column; flex: 1; }
.posts-list .post-card-body { padding: var(--space-xl) var(--space-2xl); }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}
.post-meta a { color: var(--color-text-muted); }
.post-meta .reading-time { color: var(--color-neutral-light); }

.entry-title { font-size: 1.2rem; font-weight: var(--font-weight-medium); margin-bottom: var(--space-sm); line-height: 1.3; }
.entry-title a { color: var(--color-text); }
.entry-title a:hover { color: var(--color-primary); }

.entry-summary { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-lg); flex: 1; }

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    transition: gap var(--transition);
    margin-top: auto;
}
.read-more-link:hover { gap: 10px; color: var(--color-primary-dark); }

/* Section CTA */
.section-cta { margin-top: var(--space-3xl); }

/* ─────────────────────────────────────────────────────────────
   12. CTA BANNER
───────────────────────────────────────────────────────────── */
.cta-banner-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding-block: var(--space-3xl);
}
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}
.cta-banner-text h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}
.cta-banner-text p { color: rgba(255,255,255,0.85); margin: 0; font-size: 1.05rem; }

/* ─────────────────────────────────────────────────────────────
   13. PAGE ARTICLES & ENTRY CONTENT
───────────────────────────────────────────────────────────── */
.page-article { margin-bottom: var(--space-3xl); }
.page-article .entry-header { margin-bottom: var(--space-xl); }
.page-article .entry-title { font-size: clamp(1.75rem, 3vw, 2.5rem); }

.page-article .post-thumbnail,
.single-post-article .post-thumbnail {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
    aspect-ratio: 16/7;
}
.page-article .post-thumbnail img,
.single-post-article .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.entry-content { max-width: 100%; }
.entry-content > * + * { margin-top: var(--space-md); }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: var(--space-2xl); }
.entry-content ul, .entry-content ol { padding-left: var(--space-xl); }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: var(--space-sm); }
.entry-content img { border-radius: var(--radius-md); margin-block: var(--space-xl); }
.entry-content a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--color-primary-dark); }
.entry-content table { width: 100%; border-collapse: collapse; margin-block: var(--space-xl); }
.entry-content th, .entry-content td { padding: 0.75rem 1rem; border: var(--border); text-align: left; }
.entry-content th { background: var(--color-bg-alt); font-weight: var(--font-weight-semi); }

.entry-footer { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: var(--border); font-size: 0.875rem; color: var(--color-text-muted); }

/* Entry meta */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: var(--border);
}

/* Page header */
.page-header { margin-bottom: var(--space-2xl); }
.page-title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: var(--font-weight-light); }
.page-description { color: var(--color-text-muted); margin-top: var(--space-md); }

/* Post navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: var(--border);
}
.post-navigation a { display: block; padding: var(--space-lg); border: var(--border); border-radius: var(--radius-md); transition: all var(--transition); color: var(--color-text); }
.post-navigation a:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(199,45,39,0.03); }
.nav-subtitle { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-neutral-dark); margin-bottom: 4px; }
.nav-title { font-weight: var(--font-weight-medium); font-size: 0.95rem; }

/* Pagination */
.posts-pagination,
.nav-links { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-2xl); }
.page-numbers, .nav-links a, .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding-inline: var(--space-md);
    border: var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--color-text);
    transition: all var(--transition);
    text-decoration: none;
}
.page-numbers:hover, .nav-links a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.page-numbers.current { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }

/* ─────────────────────────────────────────────────────────────
   14. SIDEBAR & WIDGETS
───────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--header-height) + var(--space-xl)); }

.widget {
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}
.widget:last-child { margin-bottom: 0; }

.widget-title {
    font-size: 0.8rem;
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-primary);
    position: relative;
}
.widget-title span { display: block; }

/* Widget list items */
.widget ul { list-style: none; }
.widget ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-text); display: flex; justify-content: space-between; }
.widget ul li a:hover { color: var(--color-primary); }

/* Search widget */
.widget_search .search-form { display: flex; gap: var(--space-sm); }
.widget_search .search-field {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
}
.widget_search .search-field:focus { border-color: var(--color-primary); }
.widget_search .search-submit {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background var(--transition);
}
.widget_search .search-submit:hover { background: var(--color-primary-dark); }

/* ─────────────────────────────────────────────────────────────
   15. FOOTER
───────────────────────────────────────────────────────────── */
.site-footer {
    background: #1a1a1a;
    color: rgba(255,255,255,0.8);
}

/* Footer widgets */
.footer-widgets {
    padding-block: var(--space-3xl);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3xl);
}

/* Override widget styles inside footer */
.footer-widgets .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
}
.footer-widgets .widget-title {
    color: var(--color-white);
    border-bottom-color: var(--color-primary);
    margin-bottom: var(--space-lg);
}
.footer-widgets .widget ul li { border-bottom-color: rgba(255,255,255,0.08); }
.footer-widgets .widget ul li a { color: rgba(255,255,255,0.7); }
.footer-widgets .widget ul li a:hover { color: var(--color-primary-light); }
.footer-widgets p { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-widgets a { color: rgba(255,255,255,0.7); }
.footer-widgets a:hover { color: var(--color-white); }
.footer-widgets .widget_search .search-field { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: var(--color-white); }
.footer-widgets .widget_search .search-field::placeholder { color: rgba(255,255,255,0.4); }

/* Footer bottom bar */
.footer-bottom {
    padding-block: var(--space-xl);
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-xl);
}
.footer-brand { }
.footer-logo-link img { height: 48px; width: auto; opacity: 0.85; filter: brightness(0) invert(1); }
.footer-site-name { font-size: 1.3rem; font-weight: var(--font-weight-semi); color: var(--color-white); display: block; }
.footer-motto {
    font-style: italic;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* Footer nav */
.footer-nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-xl);
    list-style: none;
}
.footer-nav-menu a { font-size: 0.85rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-nav-menu a:hover { color: var(--color-white); }

/* Footer copyright */
.footer-copyright { text-align: right; }
.footer-copyright p { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-bottom: var(--space-xs); }
.footer-copyright a { color: rgba(255,255,255,0.5); }
.footer-copyright a:hover { color: var(--color-white); }
.powered-by { font-size: 0.75rem; }

/* ─────────────────────────────────────────────────────────────
   16. 404 PAGE
───────────────────────────────────────────────────────────── */
.error-404 {
    padding-block: var(--space-4xl);
    text-align: center;
}
.error-404-inner { max-width: 600px; margin-inline: auto; }
.error-code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: var(--font-weight-light);
    color: var(--color-primary);
    line-height: 1;
    opacity: 0.15;
    margin-bottom: var(--space-md);
}
.error-scripture {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-text-muted);
    margin-block: var(--space-xl);
    font-size: 1.05rem;
}
.error-404 .search-form { margin-block: var(--space-xl); }

/* ─────────────────────────────────────────────────────────────
   17. SEARCH FORM
───────────────────────────────────────────────────────────── */
.search-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 480px;
    margin-inline: auto;
}
.search-field {
    flex: 1;
    padding: 0.65rem 1rem;
    border: var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color var(--transition);
}
.search-field:focus { outline: none; border-color: var(--color-primary); }
.search-submit {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background var(--transition);
}
.search-submit:hover { background: var(--color-primary-dark); }

/* ─────────────────────────────────────────────────────────────
   18. COMMENTS
───────────────────────────────────────────────────────────── */
.comments-area { margin-top: var(--space-3xl); padding-top: var(--space-2xl); border-top: var(--border); }
.comments-title { font-size: 1.4rem; margin-bottom: var(--space-2xl); }
.comment-list { list-style: none; }
.comment-list .comment { padding: var(--space-lg) 0; border-bottom: var(--border); }
.comment-author img { border-radius: var(--radius-full); width: 44px; height: 44px; }
.comment-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.comment-content p { font-size: 0.95rem; }
.comment-form label { display: block; font-size: 0.875rem; font-weight: var(--font-weight-medium); margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    transition: border-color var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--color-primary); }
.comment-form .submit {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background var(--transition);
}
.comment-form .submit:hover { background: var(--color-primary-dark); }

/* ─────────────────────────────────────────────────────────────
   19. GUTENBERG BLOCK STYLES
───────────────────────────────────────────────────────────── */
.has-primary-color          { color: var(--color-primary) !important; }
.has-primary-background-color       { background-color: var(--color-primary) !important; }
.has-secondary-orange-color { color: var(--color-secondary-orange) !important; }
.has-secondary-blue-color   { color: var(--color-secondary-blue) !important; }
.has-secondary-green-color  { color: var(--color-secondary-green) !important; }
.has-white-color            { color: var(--color-white) !important; }
.has-dark-color             { color: var(--color-text) !important; }

/* Wide/full alignment */
.alignwide  { width: calc(100% + 4rem); margin-inline: -2rem; }
.alignfull  { width: 100vw; margin-inline: calc(-50vw + 50%); }
@media (max-width: 768px) {
    .alignwide  { width: 100%; margin-inline: 0; }
    .alignfull  { width: 100%; margin-inline: 0; }
}

/* ─────────────────────────────────────────────────────────────
   20. RESPONSIVE — TABLET (max 1024px)
───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --sidebar-width: 260px; --gap: 1.5rem; }

    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }

    .footer-widgets-grid { gap: var(--space-2xl); }
    .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: var(--space-lg); }
    .footer-copyright { text-align: left; }
}

/* ─────────────────────────────────────────────────────────────
   21. RESPONSIVE — MOBILE (max 768px)
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --header-height: 64px; }

    .container { padding-inline: var(--space-lg); }

    /* Mobile Navigation */
    .menu-toggle { display: flex; }
    .main-navigation {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        padding: var(--space-xl);
        flex-direction: column;
        align-items: flex-start;
        transform: translateX(100%);
        transition: transform var(--transition-slow);
        overflow-y: auto;
        z-index: 99;
        box-shadow: var(--shadow-lg);
    }
    .main-navigation.is-open { transform: translateX(0); }

    .nav-menu { flex-direction: column; width: 100%; gap: 0; }
    .nav-menu > li { width: 100%; border-bottom: var(--border); }
    .nav-menu > li > a { padding: var(--space-md) 0; font-size: 1rem; }
    .nav-menu > li > a::after { display: none; }
    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--color-bg-alt);
        border-radius: var(--radius-sm);
        padding: var(--space-sm);
        margin-top: var(--space-sm);
    }

    /* Hero */
    .hero-section { min-height: 85vh; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; justify-content: center; }

    /* Layout — stack all sidebars below content on mobile */
    .layout-right-sidebar,
    .layout-left-sidebar { grid-template-columns: 1fr; }
    .layout-left-sidebar .sidebar-left { grid-column: 1; grid-row: 2; }
    .layout-left-sidebar .site-main    { grid-column: 1; grid-row: 1; }
    .sidebar { position: static; }

    /* Steps */
    .steps-grid { grid-template-columns: 1fr; }
    .step-card { padding: var(--space-xl); }

    /* Posts */
    .posts-grid-3 { grid-template-columns: 1fr; }
    .posts-grid-2 { grid-template-columns: 1fr; }
    .posts-list .post-card { flex-direction: column; }
    .posts-list .post-card .post-thumbnail { width: 100%; min-height: 200px; }

    /* Footer */
    .footer-widgets-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
    .footer-bottom-inner { flex-direction: column; gap: var(--space-lg); }
    .footer-copyright { text-align: left; }
    .footer-nav-menu { flex-direction: column; gap: var(--space-sm); }

    /* CTA Banner */
    .cta-banner { flex-direction: column; text-align: center; }
    .cta-banner .btn { width: 100%; justify-content: center; }

    /* Post navigation */
    .post-navigation { grid-template-columns: 1fr; }

    /* Section */
    .section-padding { padding-block: var(--space-3xl); }
}

/* ─────────────────────────────────────────────────────────────
   22. RESPONSIVE — SMALL MOBILE (max 480px)
───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding-inline: var(--space-md); }
    .hero-title { font-size: 2rem; }
    .hero-section { min-height: 100svh; }
    .step-card { padding: var(--space-lg); }
    .post-card-body { padding: var(--space-lg); }
}

/* ─────────────────────────────────────────────────────────────
   23. PRINT STYLES
───────────────────────────────────────────────────────────── */
@media print {
    .site-header, .sidebar, .site-footer, .hero-scroll-indicator { display: none !important; }
    .layout-right-sidebar, .layout-left-sidebar { grid-template-columns: 1fr; }
    body { font-size: 12pt; color: #000; }
    a { color: #000; }
    a[href]::after { content: ' (' attr(href) ')'; font-size: 0.85em; }
}
