/*
Theme Name: EEi Blog
Theme URI: https://eeiblog.com
Author: MuseGroup
Author URI: https://eeiblog.com
Description: A clean WordPress theme matching the EEi Blog design — dark header, white content area, list-style blog posts.
Version: 1.0.39
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eeiblog
Tags: blog, education, music, minimal, custom-header, custom-menu, featured-images
*/

/* =========================================================
   CSS Custom Properties
   ========================================================= */
:root {
    --color-header-bg:   #1e1e1e;
    --color-header-text: #ffffff;
    --color-nav-hover:   #cccccc;
    --color-body-bg:     #ffffff;
    --color-text:        #2d2d2d;
    --color-text-muted:  #777777;
    --color-accent:      #005a9e;
    --color-accent-hover:#003d6e;
    --color-border:      #e5e5e5;
    --color-light-bg:    #f8f8f8;
    --color-footer-bg:   #1e1e1e;
    --color-footer-text: #cccccc;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.7;

    --container-width: 1100px;
    --container-padding: 24px;
    --header-height: 64px;
}

/* =========================================================
   Reset & Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-body-bg);
    -webkit-font-smoothing: antialiased;
    /* Sticky footer scaffolding — on short pages (404, empty archive)
       the footer would otherwise float in the middle of the viewport.
       Body fills the viewport, #page is a flex column inside it, and
       .site-content grows to push the footer down to the bottom edge. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

#page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

#page > .site-content {
    flex: 1 0 auto;
}

#page > .site-footer {
    flex-shrink: 0;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5em;
}

p { margin-bottom: 1.25em; }
ul, ol { margin-bottom: 1.25em; padding-left: 1.5em; }
li { margin-bottom: 0.35em; }

/* =========================================================
   Layout Helpers
   ========================================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* =========================================================
   Site Header
   ========================================================= */
.site-header {
    background: var(--color-header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 24px;
}

/* Logo / Site Title */
.site-branding { display: flex; align-items: center; }

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.site-title a {
    color: var(--color-header-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title a:hover { color: #dddddd; text-decoration: none; }

.site-logo { height: 40px; width: auto; }

/* =========================================================
   Primary Navigation
   ========================================================= */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-navigation li { position: relative; }

.main-navigation a {
    display: block;
    padding: 8px 14px;
    color: var(--color-header-text);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

/* Dropdown arrow indicator — full-size BLACK DOWN-POINTING TRIANGLE
   (U+25BC) at near-full opacity. The previous BLACK DOWN-POINTING
   SMALL TRIANGLE (U+25BE) at 0.7em / 0.8 alpha read as a dot, not
   a chevron. */
.main-navigation .menu-item-has-children > a::after {
    content: '\25BC'; /* ▼ */
    font-size: 0.62em;
    margin-left: 0.45em;
    vertical-align: 0.12em;
    opacity: 0.95;
    line-height: 1;
}

/* Dropdowns
   No gap between parent <li> and the submenu — a visual gap creates a
   dead zone where cursor exits both, killing :hover. The submenu sits
   flush under the parent and a transparent ::before extends the hover
   bridge upward to forgive small cursor wiggles. JS adds a 250ms
   hover-intent close delay (.is-open-hover); see navigation.js. */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-header-bg);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    min-width: 200px;
    flex-direction: column;
    gap: 0;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 200;
}

.main-navigation .sub-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    /* invisible hover bridge */
}

.main-navigation .sub-menu li { width: 100%; }

.main-navigation .sub-menu a {
    text-transform: none;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    padding: 8px 16px;
    border-radius: 0;
    width: 100%;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu,
.main-navigation .menu-item-has-children.is-open-hover > .sub-menu {
    display: flex;
    flex-direction: column;
}

/* Mobile hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--color-header-text);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

/* =========================================================
   Front Page: EE Interactive hero
   ========================================================= */
.ee-hero {
    max-width: 1100px;
    margin: 40px auto 64px;
    padding: 0 20px;
    text-align: center;
}

.ee-hero-image {
    display: inline-block;
    text-decoration: none;
}

.ee-hero-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ee-hero-headline {
    font-size: clamp(20px, 2.6vw, 32px);
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin: 32px 0 0;
    color: var(--color-text, #1a1a1a);
}

.ee-hero-sub {
    font-size: clamp(15px, 1.6vw, 18px);
    color: var(--color-muted, #555);
    margin: 16px auto 0;
    max-width: 720px;
    line-height: 1.5;
}

.ee-hero-cta {
    display: inline-block;
    margin-top: 32px;
    padding: 16px 40px;
    background: #2c2c2c;
    color: #fff;
    text-transform: none;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.15s;
}

.ee-hero-cta:hover,
.ee-hero-cta:focus {
    background: #4a4a4a;          /* one shade lighter than resting #2c2c2c */
    color: #fff;
    text-decoration: none;        /* override global a:hover underline */
}

/* =========================================================
   Front Page: Audience sections (Teachers / Students / News)
   ========================================================= */
.audience-section {
    margin: 0 0 64px;
}

.audience-banner {
    position: relative;
    display: block;
    min-height: 320px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    overflow: hidden;
}

/* The whole banner is a single <a>, so global a:hover underline would
   line through the title + tagline. Lock text-decoration off here. */
.audience-banner,
.audience-banner:hover,
.audience-banner:focus,
.audience-banner:active {
    text-decoration: none;
}

.audience-banner .audience-title,
.audience-banner .audience-tagline {
    text-decoration: none;
}

.audience-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(64, 64, 64, 0.8);
    pointer-events: none;
    z-index: 1;
}

.audience-banner:hover::before,
.audience-banner:focus-within::before {
    background-color: rgba(64, 64, 64, 0.7);
}

/* Stretched link — invisible anchor that fills the banner so the
   whole banner area is clickable, but the in-overlay button can be
   its own <a> on top (avoiding invalid <a>-in-<a> nesting). The
   overlay above this is pointer-events: none, so clicks land here
   unless they hit the button. */
.audience-banner-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* No visible content — aria-label provides the accessible name. */
}

.audience-banner-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
}

.audience-overlay {
    position: relative;
    z-index: 3; /* above stretched .audience-banner-link */
    text-align: center;
    color: #fff;
    padding: 96px 20px;
    pointer-events: none;
}

/* Re-enable pointer events on the in-overlay button so clicks on it
   route to its own href, not the stretched banner link below. */
.audience-overlay .audience-cta-btn {
    pointer-events: auto;
    display: inline-block;
    margin-top: 24px;
}

.audience-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 0;
    color: #fff;
}

.audience-tagline {
    font-size: clamp(14px, 1.5vw, 20px);
    letter-spacing: 0.18em;
    margin: 12px 0 0;
    color: #fff;
    font-weight: 500;
}

.audience-posts {
    list-style: none;
    margin: 40px auto 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1180px;
    padding: 0 20px;
}

.audience-post-card {
    display: flex;
    flex-direction: column;
}

.audience-post-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 4px;
}

.audience-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.audience-post-content {
    padding: 16px 0 0;
}

.audience-post-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 8px;
}

.audience-post-title a {
    color: var(--color-text, #1a1a1a);
    text-decoration: none;
}

.audience-post-title a:hover,
.audience-post-title a:focus {
    color: var(--color-accent, #c00);
}

.audience-post-excerpt {
    font-size: 15px;
    color: var(--color-muted, #555);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.audience-cta {
    text-align: center;
    margin: 0 auto;
    padding: 8px 20px;
}

.audience-view-all {
    display: inline-block;
    color: var(--color-accent, #c00);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    text-transform: lowercase;
}

.audience-view-all:hover,
.audience-view-all:focus {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .audience-banner { min-height: 220px; }
    .audience-overlay { padding: 60px 16px; }
}

/* =========================================================
   Main Content Area
   ========================================================= */
.site-main { padding: 48px 0 64px; }

.content-area { width: 100%; }

/* Content + Sidebar layout */
.has-sidebar .content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

/* =========================================================
   Page Title Banner
   ========================================================= */
.page-header {
    background: var(--color-light-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 36px 0;
    margin-bottom: 40px;
}

.page-header .page-title {
    font-size: 2rem;
    margin: 0;
    color: var(--color-header-bg);
}

.page-header .page-subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin: 8px 0 0;
}

/* =========================================================
   Blog Post List (archive / home)
   ========================================================= */
.posts-list { list-style: none; margin: 0; padding: 0; }

.post-item {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    border-bottom: 1px solid var(--color-border);
    padding: 36px 0;
    align-items: start;
}

.post-item:first-child { padding-top: 0; }

.post-thumbnail {
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-light-bg);
    aspect-ratio: 16/10;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-item:hover .post-thumbnail img { transform: scale(1.03); }

.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    min-height: 150px;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 2rem;
}

.post-content { display: flex; flex-direction: column; gap: 10px; }

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.post-meta .post-category a {
    background: var(--color-accent);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.post-meta .post-category a:hover { background: var(--color-accent-hover); text-decoration: none; }

.post-meta .post-date-label {
    color: var(--color-text-muted);
    margin-right: 0.25rem;
}

.post-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.post-title a { color: var(--color-text); text-decoration: none; }
.post-title a:hover { color: var(--color-accent); }

.post-excerpt {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.read-more {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: none;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.read-more:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* No posts */
.no-posts { padding: 48px 0; text-align: center; color: var(--color-text-muted); }

/* =========================================================
   Pagination
   ========================================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--color-border);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pagination a:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; text-decoration: none; }
.pagination .current { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.pagination .dots { border: none; color: var(--color-text-muted); }

/* =========================================================
   Single Post
   ========================================================= */
.single-post-header { margin-bottom: 36px; }

.single-post-header .post-meta { margin-bottom: 14px; }

.single-post-header .post-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 16px;
}

.single-post-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border, #e5e5e5);
}

.single-post-footer .post-meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.single-post-footer .post-meta .post-date-sep {
    margin: 0 0.25em;
    color: var(--color-text-muted);
}

/* Byline under H1 — renders only when Co-Authors Plus has assigned a
   guest author (silent on legacy/imported posts authored by site owner). */
.single-post-header .post-meta {
    margin: 12px 0 0;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}
.single-post-header .post-meta .post-author-by {
    /* the leading "by" in lowercase, name follows */
}
.single-post-header .post-meta .post-author-name {
    color: var(--color-text);
    font-weight: 600;
}

/* Guest-author links inside the byline.
   Each name is wrapped in <a class="post-author-link"> pointing to the
   /author/{slug}/ archive. Style as part of the bold name run, not as a
   regular body link — underline only on hover. */
.single-post-header .post-meta .post-author-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.single-post-header .post-meta .post-author-link:hover,
.single-post-header .post-meta .post-author-link:focus {
    border-bottom-color: currentColor;
}

/* Author archive page — header card with avatar + name + bio. Sits where
   the .page-header normally shows on category/tag archives, but rendered
   with custom flex layout in author.php. */
.author-archive-header .author-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
.author-archive-header .author-avatar {
    flex-shrink: 0;
}
.author-archive-header .author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.author-archive-header .author-meta {
    flex: 1;
    min-width: 0;
}
.author-archive-header .author-name {
    margin: 0 0 12px;
}
.author-archive-header .author-bio {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}
.author-archive-header .author-bio p {
    margin: 0 0 8px;
}
.author-archive-header .author-bio p:last-child {
    margin-bottom: 0;
}

.author-posts-heading {
    font-size: 1.25rem;
    margin: 0 0 16px;
    color: var(--color-text);
}

@media (max-width: 600px) {
    .author-archive-header .author-card {
        flex-direction: column;
        gap: 16px;
    }
    .author-archive-header .author-avatar img {
        width: 96px;
        height: 96px;
    }
}

/* Jetpack related-posts block at the bottom of single posts.
   No border-top — the single-post-footer line above already separates
   body from footer chrome; multiple stacked borders looked like a
   "barcode" running down the page. */
.post-related-jetpack {
    margin-top: 32px;
    padding-top: 0;
}

/* Jetpack share / like modules — kill their default border-top.
   Plugin adds `border-top: 1px dotted` between Share/Like/etc., which
   compounds with our own footer border into a noisy strip. */
.sharedaddy.sd-block,
.sharedaddy.sharedaddy-bottom,
.post-content-body + .sharedaddy,
.entry-content + .sharedaddy,
.jetpack-likes-widget-wrapper,
.sd-content > .sd-block,
div.sharing-hidden + .sd-content,
#jp-relatedposts {
    border-top: 0 !important;
    border-bottom: 0 !important;
    padding-top: 8px !important;
}

/* And the "Share this:" / "Like this:" labels themselves — Jetpack
   adds inner separators we don't need. */
.sharedaddy h3.sd-title,
.jetpack-likes-widget-wrapper .sd-title {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 8px !important;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text);
}

.post-related-jetpack .jp-relatedposts-headline {
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.08em;
    color: var(--color-header-bg);
    margin-bottom: 16px;
}

.post-featured-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
    max-height: 480px;
}

.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* Post content typography */
.post-content-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    max-width: 760px;
}

.post-content-body h2 { font-size: 1.5rem; margin: 2em 0 0.75em; }
.post-content-body h3 { font-size: 1.25rem; margin: 1.75em 0 0.6em; }
.post-content-body h4 { font-size: 1.0625rem; margin: 1.5em 0 0.5em; }

/* Strict left alignment for headings inside post bodies. Beats core's
   .has-text-align-center via descendant-selector specificity, so legacy
   imports that snuck centered headings through are overridden site-wide. */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6,
.post-content-body h1, .post-content-body h2, .post-content-body h3,
.post-content-body h4, .post-content-body h5, .post-content-body h6 {
    text-align: left;
}

.post-content-body p { margin-bottom: 1.4em; }

.post-content-body a { color: var(--color-accent); }
.post-content-body a:hover { color: var(--color-accent-hover); }

.post-content-body img {
    border-radius: 6px;
    margin: 1.5em auto;
    display: block;
}

.post-content-body ul, .post-content-body ol { margin: 0 0 1.4em 1.5em; }
.post-content-body li { margin-bottom: 0.4em; }

.post-content-body blockquote {
    border-left: 4px solid var(--color-accent);
    background: var(--color-light-bg);
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #555;
}

.post-content-body pre, .post-content-body code {
    font-family: 'SF Mono', Consolas, Monaco, monospace;
    font-size: 0.875em;
    background: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.post-content-body code { padding: 2px 6px; }
.post-content-body pre { padding: 16px; overflow-x: auto; margin-bottom: 1.4em; }
.post-content-body pre code { background: none; border: none; padding: 0; }

.post-content-body iframe, .post-content-body video {
    max-width: 100%;
    border-radius: 6px;
    margin: 1.5em 0;
}

/* Tags */
.post-tags {
    margin-top: 28px;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.post-tags .label { font-size: 0.8125rem; font-weight: 700; color: var(--color-text-muted); }

.post-tags a {
    padding: 4px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.post-tags a:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }

/* Post navigation (prev/next) */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--color-border);
}

.nav-previous, .nav-next { display: flex; flex-direction: column; gap: 6px; }
.nav-next { text-align: right; }

.nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.nav-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-accent);
    line-height: 1.4;
    text-decoration: none;
}

.nav-title:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* =========================================================
   Sidebar
   ========================================================= */
.widget-area {
    position: sticky;
    /* Generous offset so the widget doesn't feel like it's smacking
       into the bottom of the dark header on scroll. */
    top: calc(var(--header-height) + 56px);
}

.widget {
    background: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.08em;
    color: var(--color-header-bg);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-accent);
}

.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}
.widget ul li:last-child { border-bottom: none; }
/* Anchor is block-level + bleeds to the widget edges, so the whole
   row is one tap target with a visible hover band (not just blue
   text). Negative horizontal margin matches the widget's 24 px padding
   so the hover background runs edge-to-edge inside the widget. */
.widget ul li a {
    display: block;
    padding: 12px 24px;
    margin: 0 -24px;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.widget ul li a:hover,
.widget ul li a:focus {
    color: var(--color-accent);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Search widget */
.widget.widget_search .search-form {
    display: flex;
    gap: 8px;
}

.widget.widget_search input[type="search"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
}

.widget.widget_search input[type="search"]:focus { border-color: var(--color-accent); }

.widget.widget_search button {
    padding: 8px 14px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.widget.widget_search button:hover { background: var(--color-accent-hover); }

/* =========================================================
   Static Page
   ========================================================= */
.page-content { max-width: 820px; }
.page-content h2 { margin-top: 2em; }
.page-content img { border-radius: 6px; margin: 1.5em 0; }

/* =========================================================
   404 Page
   ========================================================= */
.error-404 { text-align: center; padding: 80px 0; }
.error-404 .error-code { font-size: 7rem; font-weight: 900; color: var(--color-border); line-height: 1; }
.error-404 h1 { font-size: 2rem; margin: 16px 0 12px; }
.error-404 p { color: var(--color-text-muted); margin-bottom: 32px; }
.error-404 .btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}
.error-404 .btn:hover { background: var(--color-accent-hover); text-decoration: none; }

/* =========================================================
   Site Footer
   ========================================================= */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 40px 0;
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo { height: 36px; width: auto; opacity: 0.85; }
.footer-logo:hover { opacity: 1; }

.footer-info { text-align: center; }

.site-footer .copyright {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-links a {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: #ffffff; text-decoration: none; }

/* =========================================================
   Header search trigger + dropdown form
   ========================================================= */
.header-search-toggle {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    color: var(--color-header-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: 4px;
}

.header-search-toggle:hover,
.header-search-toggle:focus-visible {
    color: var(--color-nav-hover);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.header-search-form {
    position: absolute;
    right: var(--container-padding, 16px);
    top: 100%;
    margin-top: 8px;
    background: #ffffff;
    color: var(--color-text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    padding: 12px;
    border-radius: 4px;
    z-index: 250;
    min-width: 320px;
}

.header-search-form .search-form {
    display: flex;
    gap: 8px;
    margin: 0;
}

.header-search-form input[type="search"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 2px;
    font-size: 14px;
    background: #fff;
    color: var(--color-text);
}

.header-search-form input[type="submit"],
.header-search-form button[type="submit"] {
    padding: 8px 16px;
    background: #2c2c2c;
    color: #fff;
    border: 0;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.04em;
}

.header-search-form input[type="submit"]:hover,
.header-search-form button[type="submit"]:hover {
    background: #4a4a4a;
}

.site-header,
.site-header .container {
    position: relative;
}

@media (max-width: 767px) {
    .header-search-form {
        right: var(--container-padding, 16px);
        left: var(--container-padding, 16px);
        min-width: 0;
    }
}

/* =========================================================
   Footer top row
   Full-width band inside the dark footer holding the
   Categories list and the Our Products link list side by
   side. Above the existing brand / copyright / links strip,
   separated by a hairline divider.
   ========================================================= */
.footer-top {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.footer-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-categories-list,
.footer-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.footer-categories-list {
    /* column-width lets the browser pick fit count for the
       wider Categories column without us guessing breakpoints. */
    column-width: 160px;
    column-gap: 32px;
}

.footer-categories-list li,
.footer-products-list li {
    margin: 0 0 6px;
    break-inside: avoid;
}

.footer-categories-list a,
.footer-products-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-categories-list a:hover,
.footer-categories-list a:focus,
.footer-products-list a:hover,
.footer-products-list a:focus {
    color: #ffffff;
}

@media (max-width: 700px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* =========================================================
   Block: Separator (<hr>)
   WP core constrains the default-style separator to
   max-width: 100px via `.wp-block-separator:not(.is-style-wide):not(.is-style-dots)`
   (specificity 0,3,0). We need at least 0,3,1 to override.
   ========================================================= */
.entry-content hr.wp-block-separator:not(.is-style-dots),
.post-content-body hr.wp-block-separator:not(.is-style-dots) {
    border: 0;
    border-top: 1px solid var(--color-border);
    width: 100%;
    max-width: 100%;
    margin: 3rem auto;
    opacity: 1;
}

.entry-content hr.wp-block-separator.is-style-dots,
.post-content-body hr.wp-block-separator.is-style-dots {
    border: 0;
    background: none;
    text-align: center;
    line-height: 1;
    height: auto;
    margin: 3rem auto;
}

.entry-content hr.wp-block-separator.is-style-dots::before,
.post-content-body hr.wp-block-separator.is-style-dots::before {
    content: "···";
    font-size: 1.5rem;
    letter-spacing: 1rem;
    color: var(--color-text-muted);
}

/* =========================================================
   Block: Columns (image-left + text-right rows on /correlatedcollections/
   and similar magazine-style layouts).
   WP core's block-supports CSS that normally turns .wp-block-columns into
   a flex container isn't enqueued reliably on our front-end, so the columns
   would stack vertically. We re-establish the flex layout here and honour
   Gutenberg's inline `flex-basis` style on each column.
   ========================================================= */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    margin: 1.75em 0;
    box-sizing: border-box;
}

.wp-block-column {
    flex: 1 1 0%;
    min-width: 0; /* prevent overflow when a column has very long content */
    word-break: break-word;
}

/* When Gutenberg sets an inline flex-basis on a column (e.g. 40% / 60%),
   stop the flex-grow so the basis is honoured. */
.wp-block-column[style*="flex-basis"] {
    flex-grow: 0;
}

.wp-block-columns.are-vertically-aligned-top    { align-items: flex-start; }
.wp-block-columns.are-vertically-aligned-center { align-items: center; }
.wp-block-columns.are-vertically-aligned-bottom { align-items: flex-end; }

/* Stack on mobile unless explicitly opted-out via `is-not-stacked-on-mobile`. */
@media (max-width: 781px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-direction: column;
    }
    .wp-block-columns:not(.is-not-stacked-on-mobile) .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* =========================================================
   Block: Buttons (CTA)
   ========================================================= */
.wp-block-button {
    margin: 1rem 0;
}

.wp-block-buttons {
    margin: 2rem 0;
}

/* Vertical button group — WP renders the inner .wp-block-button items
   with no gap by default and varying widths by label, producing a
   "staircase" of touching buttons. Add visual rhythm and (on desktop)
   align the stack centred with a sane max width so a long label
   doesn't drag the whole column wide. */
.wp-block-buttons.is-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .wp-block-buttons.is-vertical {
        align-items: center;
    }
    .wp-block-buttons.is-vertical .wp-block-button {
        width: 100%;
        max-width: 560px;
        margin: 0; /* the parent gap handles spacing now */
    }
    .wp-block-buttons.is-vertical .wp-block-button__link {
        display: block;
        text-align: center;
    }
}

.wp-block-button__link.wp-element-button,
.wp-block-button__link {
    background-color: var(--color-header-bg);
    color: #ffffff;
    border-radius: 0;
    padding: 1rem 2.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: none;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.15s ease;
}

.wp-block-button__link.wp-element-button:hover,
.wp-block-button__link:hover {
    background-color: var(--color-accent);
    color: #ffffff;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--color-header-bg);
    border: 2px solid var(--color-header-bg);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--color-header-bg);
    color: #ffffff;
}

/* Light button — for use ON DARK BACKGROUNDS (audience banners,
   hero overlays, photographs). White fill, dark text, hairline
   border for crispness on light photos that creep close to white.
   Two ways to invoke:
     - <a class="btn-light">…</a> in raw HTML / templates
     - WP block editor: Button block → Styles → "Light" (registered
       via register_block_style in functions.php) */
.btn-light,
.wp-block-button.is-style-light .wp-block-button__link {
    display: inline-block;
    background-color: #ffffff;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    padding: 1rem 2.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: none;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-light:hover,
.btn-light:focus,
.wp-block-button.is-style-light .wp-block-button__link:hover,
.wp-block-button.is-style-light .wp-block-button__link:focus {
    background-color: #f0f0f0;
    color: #1a1a1a;
    text-decoration: none;
}

/* =========================================================
   Block: Gallery
   Force grid layout based on .columns-N — core's is-layout-flex
   needs theme.json registration which this classic theme doesn't ship.
   ========================================================= */
.entry-content .wp-block-gallery,
.post-content-body .wp-block-gallery {
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.entry-content .wp-block-gallery.has-nested-images:not(.eei-carousel),
.post-content-body .wp-block-gallery.has-nested-images:not(.eei-carousel) {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(var(--gallery-columns, 3), 1fr);
}

/* Galleries we leave as a grid (e.g. linkTo:custom navigation galleries
   like post 203's correlated collections) but where we want to disable
   WP core's `is-cropped` aspect-ratio squashing. Portrait images (book
   covers) need to stay un-cropped. */
.entry-content .wp-block-gallery.eei-no-crop figure.wp-block-image,
.post-content-body .wp-block-gallery.eei-no-crop figure.wp-block-image {
    aspect-ratio: auto;
    height: auto;
}
.entry-content .wp-block-gallery.eei-no-crop figure.wp-block-image img,
.post-content-body .wp-block-gallery.eei-no-crop figure.wp-block-image img {
    object-fit: contain;
    height: auto;
    width: 100%;
    aspect-ratio: auto;
}

/* =========================================================
   Block: Gallery — Squarespace-style carousel
   Activated by gallery-carousel.js on multi-image galleries.
   See assets/js/gallery-carousel.js for behaviour.
   ========================================================= */
.entry-content .wp-block-gallery.eei-carousel,
.post-content-body .wp-block-gallery.eei-carousel,
.entry-content .image-gallery-wrapper.eei-carousel,
.post-content-body .image-gallery-wrapper.eei-carousel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
    padding: 0;
}

.eei-carousel:focus-visible {
    outline: 2px solid var(--color-header-bg, #c00);
    outline-offset: 4px;
}

.eei-carousel__main {
    position: relative;
    background: var(--color-card-bg, #f5f5f5);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Locked height so swapping a tall portrait → short landscape (or
       vice versa) doesn't reflow content below. Images use
       object-fit: contain inside, letterboxing where needed. */
    height: 60vh;
    min-height: 240px;
    max-height: 720px;
}

.eei-carousel__main-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* fixes portrait-book-cover cropping */
    cursor: zoom-in;
    transition: opacity 200ms ease;
    display: block;
}

.eei-carousel__main-img.is-swapping { opacity: 0.4; }

.eei-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eei-carousel__nav svg {
    width: 18px;
    height: 18px;
    display: block;
}
.eei-carousel__nav--prev { left: 0.75rem; }
.eei-carousel__nav--next { right: 0.75rem; }
.eei-carousel__nav:hover { background: rgba(0, 0, 0, 0.8); }
.eei-carousel__nav:focus-visible {
    outline: 2px solid var(--color-header-bg, #c00);
    outline-offset: 2px;
}

.eei-carousel__thumbs {
    display: flex;
    /* Wrap to multiple rows instead of a single horizontally-scrolling
       strip. With 12-16 thumbs at 80 px the strip would otherwise run
       off the column and the macOS auto-hide scrollbar made it look
       like the carousel "размотало" in the wider gallery posts. */
    flex-wrap: wrap;
    gap: 0.5rem;
}

.eei-carousel__thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 0;
    background: var(--color-card-bg, #f5f5f5);
    cursor: pointer;
    transition: transform 150ms, border-color 150ms;
    overflow: hidden;
}

.eei-carousel__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* thumbs may crop — they're previews */
    display: block;
}

.eei-carousel__thumb.is-active {
    border-color: var(--color-header-bg, #c00);
    transform: scale(1.04);
}

.eei-carousel__thumb:focus-visible {
    outline: 2px solid var(--color-header-bg, #c00);
    outline-offset: 2px;
}

.eei-carousel__source { display: none !important; }

@media (max-width: 600px) {
    .eei-carousel__main     { height: 50vh; min-height: 200px; }
    .eei-carousel__thumb    { width: 64px; height: 64px; }
    .eei-carousel__nav      { width: 36px; height: 36px; }
    .eei-carousel__nav svg  { width: 14px; height: 14px; }
}

.entry-content .wp-block-gallery.columns-2,
.post-content-body .wp-block-gallery.columns-2 { --gallery-columns: 2; }

.entry-content .wp-block-gallery.columns-3,
.post-content-body .wp-block-gallery.columns-3 { --gallery-columns: 3; }

.entry-content .wp-block-gallery.columns-4,
.post-content-body .wp-block-gallery.columns-4 { --gallery-columns: 4; }

.entry-content .wp-block-gallery.columns-5,
.post-content-body .wp-block-gallery.columns-5 { --gallery-columns: 5; }

.entry-content .wp-block-gallery.columns-6,
.post-content-body .wp-block-gallery.columns-6 { --gallery-columns: 6; }

/* Override WP block-library widths intended for flex layout — we use grid,
   so figure should size to its cell. The :not(#individual-image) selector
   matches WP core's specificity tier so this rule wins via source order. */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image),
.post-content-body .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    width: auto;
}

.entry-content .wp-block-gallery .wp-block-image,
.post-content-body .wp-block-gallery .wp-block-image {
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    transition: transform 0.18s ease;
    aspect-ratio: 16 / 10;
}

.entry-content .wp-block-gallery .wp-block-image:hover,
.post-content-body .wp-block-gallery .wp-block-image:hover {
    transform: translateY(-2px);
}

.entry-content .wp-block-gallery .wp-block-image img,
.post-content-body .wp-block-gallery .wp-block-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .entry-content .wp-block-gallery.has-nested-images,
    .post-content-body .wp-block-gallery.has-nested-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .entry-content .wp-block-gallery.has-nested-images,
    .post-content-body .wp-block-gallery.has-nested-images {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Lightbox (vanilla JS — see assets/js/lightbox.js)
   ========================================================= */
.eei-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.eei-lightbox.is-open {
    display: flex;
    animation: eei-lightbox-fade 0.18s ease;
}

@keyframes eei-lightbox-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.eei-lightbox__figure {
    margin: 0;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eei-lightbox__img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    background: #1a1a1a;
}

.eei-lightbox__caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    text-align: center;
    max-width: 80vw;
    line-height: 1.4;
}

.eei-lightbox__close,
.eei-lightbox__prev,
.eei-lightbox__next {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    color: #fff;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s ease, transform 0.15s ease;
    font-family: -apple-system, system-ui, sans-serif;
}

.eei-lightbox__close:hover,
.eei-lightbox__prev:hover,
.eei-lightbox__next:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.eei-lightbox__close {
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.75rem;
}

.eei-lightbox__prev,
.eei-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.25rem;
}

.eei-lightbox__prev:hover,
.eei-lightbox__next:hover {
    transform: translateY(-50%) scale(1.05);
}

.eei-lightbox__prev { left: 1.5rem; }
.eei-lightbox__next { right: 1.5rem; }

.eei-lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.55);
    padding: 0.4rem 0.85rem;
    border-radius: 1rem;
    letter-spacing: 0.05em;
}

@media (max-width: 600px) {
    .eei-lightbox { padding: 1rem; }
    .eei-lightbox__close,
    .eei-lightbox__prev,
    .eei-lightbox__next {
        width: 2.5rem;
        height: 2.5rem;
    }
    .eei-lightbox__close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.4rem;
    }
    .eei-lightbox__prev { left: 0.5rem; font-size: 1.85rem; }
    .eei-lightbox__next { right: 0.5rem; font-size: 1.85rem; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
    .has-sidebar .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }

    .widget-area { position: static; }
}

@media (max-width: 768px) {
    :root { --container-padding: 16px; }

    .site-header .container { flex-wrap: nowrap; }

    .menu-toggle { display: block; }

    .main-navigation {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--color-header-bg);
        border-top: 1px solid rgba(255,255,255,0.1);
        padding: 12px 0;
    }

    .main-navigation.is-open { display: block; }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 0 16px;
    }

    .main-navigation a { padding: 12px 4px; font-size: 0.9375rem; }

    .main-navigation .sub-menu {
        display: none;
        position: static;
        background: rgba(255,255,255,0.05);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 4px 0 4px 16px;
        margin-top: 4px;
    }

    .main-navigation .menu-item-has-children.is-open > .sub-menu { display: flex; }

    .main-navigation .menu-item-has-children > a::after { float: right; }

    .post-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post-thumbnail { max-height: 220px; }

    .post-navigation { grid-template-columns: 1fr; }
    .nav-next { text-align: left; }

    .site-footer .container { flex-direction: column; align-items: center; text-align: center; }
    .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
    .site-main { padding: 32px 0 48px; }
    .post-item { padding: 24px 0; }
    .post-navigation { gap: 16px; }
}
