/* =====================================================
   InfoHub Theme — Main CSS
   Design Tokens + Components + Presets + Dark Mode
   ===================================================== */

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── Design Tokens (дефолти — перезаписуються з PHP) ── */
:root {
    --ih-color-primary:   #C0392B;
    --ih-color-secondary: #2C3E50;
    --ih-color-accent:    #E74C3C;
    --ih-color-bg:        #FFFFFF;
    --ih-color-text:      #1A1A1A;
    --ih-color-muted:     #666666;
    --ih-color-border:    rgba(0,0,0,0.1);
    --ih-color-surface:   #F5F5F5;
    --ih-font-heading:    'Playfair Display', Georgia, serif;
    --ih-font-body:       'Source Serif 4', system-ui, sans-serif;
    --ih-radius:          2px;
    --ih-shadow:          0 1px 3px rgba(0,0,0,0.12);
    --ih-spacing-xs:      0.25rem;
    --ih-spacing-sm:      0.5rem;
    --ih-spacing-md:      1rem;
    --ih-spacing-lg:      2rem;
    --ih-spacing-xl:      4rem;
    --ih-container:       1200px;
    --ih-sidebar-width:   320px;
    --ih-header-h:        64px;
    --ih-transition:      0.2s ease;
}

/* ── Preset Overrides ──────────────────────────────── */
.preset-tech {
    --ih-color-primary:   #6C63FF;
    --ih-color-secondary: #2D3748;
    --ih-color-accent:    #00D4FF;
    --ih-color-bg:        #0F1117;
    --ih-color-text:      #E2E8F0;
    --ih-color-muted:     #718096;
    --ih-color-surface:   #1A1F2E;
    --ih-color-border:    rgba(255,255,255,0.08);
    --ih-font-heading:    'Space Grotesk', sans-serif;
    --ih-font-body:       'JetBrains Mono', monospace;
    --ih-radius:          6px;
    --ih-shadow:          0 0 20px rgba(108,99,255,0.2);
}

.preset-medical {
    --ih-color-primary:   #0077B6;
    --ih-color-secondary: #023E8A;
    --ih-color-accent:    #00B4D8;
    --ih-color-bg:        #F8FAFB;
    --ih-color-text:      #1B2631;
    --ih-color-muted:     #5D6D7E;
    --ih-color-surface:   #EEF2F7;
    --ih-font-heading:    'DM Sans', sans-serif;
    --ih-font-body:       'DM Sans', sans-serif;
    --ih-radius:          8px;
}

.preset-mythology {
    --ih-color-primary:   #8B5E3C;
    --ih-color-secondary: #2C1810;
    --ih-color-accent:    #D4AF37;
    --ih-color-bg:        #1A0F0A;
    --ih-color-text:      #E8DCC8;
    --ih-color-muted:     #A0896A;
    --ih-color-surface:   #231510;
    --ih-color-border:    rgba(212,175,55,0.2);
    --ih-font-heading:    'Cinzel', serif;
    --ih-font-body:       'Crimson Text', serif;
    --ih-radius:          0px;
    --ih-shadow:          0 4px 20px rgba(212,175,55,0.15);
}

.preset-finance {
    --ih-color-primary:   #1B5E20;
    --ih-color-secondary: #212121;
    --ih-color-accent:    #43A047;
    --ih-color-bg:        #FAFAFA;
    --ih-color-text:      #212121;
    --ih-color-muted:     #757575;
    --ih-color-surface:   #F0F4F0;
    --ih-font-heading:    'Libre Baskerville', serif;
    --ih-font-body:       'IBM Plex Sans', sans-serif;
    --ih-radius:          4px;
}

/* ── Base Typography ───────────────────────────────── */
body {
    font-family: var(--ih-font-body);
    background: var(--ih-color-bg);
    color: var(--ih-color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ih-font-heading);
    line-height: 1.25;
    font-weight: 700;
    color: var(--ih-color-text);
}

h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: var(--ih-spacing-md); }

a:hover { color: var(--ih-color-primary); }

/* ── Layout ────────────────────────────────────────── */
.infohub-container {
    max-width: var(--ih-container);
    margin: 0 auto;
    padding: 0 var(--ih-spacing-md);
}

@media (min-width: 768px) {
    .infohub-container { padding: 0 var(--ih-spacing-lg); }
}

.infohub-main-wrap {
    display: grid;
    gap: var(--ih-spacing-lg);
    padding-top: var(--ih-spacing-lg);
    padding-bottom: var(--ih-spacing-xl);
}

.infohub-layout--sidebar-right  { grid-template-columns: 1fr; }
.infohub-layout--sidebar-left   { grid-template-columns: 1fr; }
.infohub-layout--full-width     { grid-template-columns: 1fr; }

@media (min-width: 1024px) {
    .infohub-layout--sidebar-right { grid-template-columns: 1fr var(--ih-sidebar-width); }
    .infohub-layout--sidebar-left  { grid-template-columns: var(--ih-sidebar-width) 1fr; }
    .infohub-layout--two-sidebars  { grid-template-columns: var(--ih-sidebar-width) 1fr var(--ih-sidebar-width); }
}

/* ── Header ────────────────────────────────────────── */
.infohub-header {
    background: var(--ih-color-bg);
    border-bottom: 1px solid var(--ih-color-border);
    transition: box-shadow var(--ih-transition), background var(--ih-transition);
    z-index: 100;
    position: relative;
}

.infohub-header--sticky {
    position: sticky;
    top: 0;
}

.infohub-header.is-scrolled {
    box-shadow: var(--ih-shadow);
}

.infohub-header__inner {
    display: flex;
    align-items: center;
    gap: var(--ih-spacing-md);
    height: var(--ih-header-h);
    flex-wrap: wrap;
}

.infohub-header__brand { display: flex; flex-direction: column; gap: 2px; }
.infohub-header__site-name {
    font-family: var(--ih-font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ih-color-primary);
}

.infohub-header__tagline {
    font-size: 0.75rem;
    color: var(--ih-color-muted);
}

/* Header Styles */
.infohub-header--dark {
    background: var(--ih-color-secondary);
    color: #fff;
    border-bottom-color: transparent;
}
.infohub-header--dark .infohub-header__site-name,
.infohub-header--dark a { color: #fff; }

.infohub-header--transparent {
    background: transparent;
    position: absolute;
    width: 100%;
    border-bottom-color: transparent;
}

.infohub-header--centered .infohub-header__inner { flex-direction: column; height: auto; padding: var(--ih-spacing-md) 0; text-align: center; }
.infohub-header--centered .infohub-nav { margin: 0 auto; }

/* ── Navigation ────────────────────────────────────── */
.infohub-nav { margin-left: auto; }

.infohub-nav__menu {
    display: flex;
    align-items: center;
    gap: var(--ih-spacing-xs);
}

.infohub-nav__menu > li { position: relative; }
.infohub-nav__menu > li > a {
    display: block;
    padding: var(--ih-spacing-xs) var(--ih-spacing-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--ih-radius);
    transition: background var(--ih-transition), color var(--ih-transition);
}

.infohub-nav__menu > li > a:hover,
.infohub-nav__menu > li.current-menu-item > a {
    background: var(--ih-color-primary);
    color: #fff;
}

/* Dropdown */
.infohub-nav__menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ih-color-bg);
    border: 1px solid var(--ih-color-border);
    border-radius: var(--ih-radius);
    box-shadow: var(--ih-shadow);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--ih-transition);
    z-index: 200;
}

.infohub-nav__menu > li:hover > .sub-menu,
.infohub-nav__menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.infohub-nav__menu .sub-menu a {
    display: block;
    padding: var(--ih-spacing-xs) var(--ih-spacing-md);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--ih-color-border);
    transition: background var(--ih-transition);
}

.infohub-nav__menu .sub-menu li:last-child a { border-bottom: none; }
.infohub-nav__menu .sub-menu a:hover { background: var(--ih-color-surface); }

/* ── Header Actions ────────────────────────────────── */
.infohub-header__actions {
    display: flex;
    align-items: center;
    gap: var(--ih-spacing-sm);
}

.infohub-search-toggle,
.infohub-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ih-color-text);
    padding: var(--ih-spacing-xs);
    border-radius: var(--ih-radius);
    transition: background var(--ih-transition), color var(--ih-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.infohub-search-toggle:hover { background: var(--ih-color-surface); color: var(--ih-color-primary); }

.infohub-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ih-header-text, var(--ih-color-text));
    border-radius: var(--ih-radius);
    flex-shrink: 0;
    transition: background var(--ih-transition);
    -webkit-tap-highlight-color: transparent;
}

.infohub-menu-toggle:hover { background: var(--ih-color-surface); }

.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Анімація X при відкритому меню */
.infohub-menu-toggle.is-active .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.infohub-menu-toggle.is-active .burger-line:nth-child(2) { opacity: 0; width: 0; }
.infohub-menu-toggle.is-active .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay під меню */
body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 90;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Кнопка підменю — тільки мобільна, на десктопі прихована */
.infohub-submenu-toggle { display: none; }

@media (max-width: 768px) {

    /* Приховати desktop nav */
    .infohub-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100dvh;
        height: 100vh; /* fallback */
        background: var(--ih-color-bg);
        box-shadow: -4px 0 24px rgba(0,0,0,0.15);
        z-index: 999;
        overflow-y: auto;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: var(--ih-header-h, 64px);
    }

    /* Відкрите меню — виїжджає зліва */
    .infohub-nav.is-open {
        right: 0;
    }

    /* ── Список меню ── */
    .infohub-nav__menu {
        display: flex;
        flex-direction: column;
        padding: 0;
        margin: 0;
        gap: 0;
        list-style: none;
    }

    /* Пункти першого рівня */
    .infohub-nav__menu > li {
        border-bottom: 1px solid var(--ih-color-border);
    }

    /* Пункт з підменю — flexbox щоб посилання і кнопка в один рядок */
    .infohub-nav__menu > li.menu-item-has-children {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }

    /* Посилання першого рівня */
    .infohub-nav__menu > li > a {
        display: flex;
        align-items: center;
        flex: 1;
        padding: 15px var(--ih-spacing-md);
        font-size: 1rem;
        font-weight: 600;
        color: var(--ih-color-text);
        background: none;
        border-radius: 0;
        text-decoration: none;
        line-height: 1.3;
        min-height: 52px;
        transition: background var(--ih-transition), color var(--ih-transition);
    }

    .infohub-nav__menu > li > a:hover,
    .infohub-nav__menu > li.current-menu-item > a {
        background: var(--ih-color-surface);
        color: var(--ih-color-primary);
    }

    /* Кнопка стрілки — flex item поряд з посиланням */
    .infohub-submenu-toggle {
        flex-shrink: 0;
        width: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        border-left: 1px solid var(--ih-color-border);
        cursor: pointer;
        color: var(--ih-color-muted);
        -webkit-tap-highlight-color: transparent;
        transition: background var(--ih-transition), color var(--ih-transition);
    }

    .infohub-submenu-toggle svg {
        transition: transform 0.25s ease;
        display: block;
        pointer-events: none;
    }

    .infohub-submenu-toggle:hover,
    .menu-item-has-children.is-open > .infohub-submenu-toggle {
        color: var(--ih-color-primary);
        background: var(--ih-color-surface);
    }

    .menu-item-has-children.is-open > .infohub-submenu-toggle svg {
        transform: rotate(180deg);
    }

    /* Підменю — full width усередині flex-wrap */
    .infohub-nav__menu .sub-menu {
        display: none;
        flex-basis: 100%;
        position: static !important;
        box-shadow: none !important;
        border: none;
        border-top: 1px solid var(--ih-color-border);
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: var(--ih-color-surface);
        padding: 0;
        min-width: 0;
        border-radius: 0;
        width: 100%;
    }

    .infohub-nav__menu .sub-menu.is-open {
        display: block;
        animation: mobileSubSlide 0.2s ease;
    }

    @keyframes mobileSubSlide {
        from { opacity: 0; transform: translateY(-4px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Пункти підменю */
    .infohub-nav__menu .sub-menu li {
        border-bottom: 1px solid color-mix(in srgb, var(--ih-color-border) 60%, transparent);
    }

    .infohub-nav__menu .sub-menu li:last-child {
        border-bottom: none;
    }

    /* Посилання підменю */
    .infohub-nav__menu .sub-menu a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 11px var(--ih-spacing-md) 11px calc(var(--ih-spacing-md) + 12px);
        font-size: 0.9rem;
        font-weight: 400;
        color: var(--ih-color-text);
        text-decoration: none;
        border-bottom: none;
        transition: background var(--ih-transition), color var(--ih-transition);
    }

    .infohub-nav__menu .sub-menu a::before {
        content: "›";
        color: var(--ih-color-primary);
        font-size: 1.2rem;
        line-height: 1;
        flex-shrink: 0;
    }

    .infohub-nav__menu .sub-menu a:hover {
        background: var(--ih-color-bg);
        color: var(--ih-color-primary);
    }

    /* Показати бургер на мобільному */
    .infohub-menu-toggle { display: flex; }

    /* Показати кнопку підменю на мобільному */
    .infohub-submenu-toggle { display: flex; }

    /* Centered header на мобільному */
    .infohub-header--centered .infohub-header__inner--centered { flex-wrap: nowrap; }
    .infohub-header__centered-nav { display: none; }
}

/* Search drawer */
.infohub-search-drawer { padding: var(--ih-spacing-md) 0; background: var(--ih-color-surface); border-top: 1px solid var(--ih-color-border); }
.infohub-search-drawer .search-form { display: flex; gap: var(--ih-spacing-sm); }
.infohub-search-drawer .search-field { flex: 1; padding: var(--ih-spacing-sm) var(--ih-spacing-md); border: 1px solid var(--ih-color-border); border-radius: var(--ih-radius); background: var(--ih-color-bg); color: var(--ih-color-text); font-family: var(--ih-font-body); }
.infohub-search-drawer .search-submit { padding: var(--ih-spacing-sm) var(--ih-spacing-md); background: var(--ih-color-primary); color: #fff; border: none; border-radius: var(--ih-radius); cursor: pointer; }

/* ── Post Cards ────────────────────────────────────── */
.infohub-posts-grid { display: grid; gap: var(--ih-spacing-lg); }

.infohub-posts-grid--grid-3 { grid-template-columns: 1fr; }
.infohub-posts-grid--grid-2 { grid-template-columns: 1fr; }
.infohub-posts-grid--list   { grid-template-columns: 1fr; }

@media (min-width: 640px) {
    .infohub-posts-grid--grid-3 { grid-template-columns: repeat(2, 1fr); }
    .infohub-posts-grid--grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .infohub-posts-grid--grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Card: Default */
.infohub-card {
    background: var(--ih-color-bg);
    border: 1px solid var(--ih-color-border);
    border-radius: var(--ih-radius);
    overflow: hidden;
    box-shadow: var(--ih-shadow);
    transition: transform var(--ih-transition), box-shadow var(--ih-transition);
}

.infohub-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.infohub-card__img-wrap { display: block; aspect-ratio: 16/9; overflow: hidden; }
.infohub-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.infohub-card:hover .infohub-card__img { transform: scale(1.04); }

.infohub-card__body { padding: var(--ih-spacing-md); }
.infohub-card__cat {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--ih-color-primary);
    margin-bottom: var(--ih-spacing-xs);
}

.infohub-card__title { font-size: 1.1rem; margin-bottom: var(--ih-spacing-xs); line-height: 1.35; }
.infohub-card__title a:hover { color: var(--ih-color-primary); }
.infohub-card__excerpt { font-size: 0.875rem; color: var(--ih-color-muted); margin-bottom: var(--ih-spacing-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.infohub-card__footer { display: flex; align-items: center; gap: var(--ih-spacing-sm); font-size: 0.75rem; color: var(--ih-color-muted); margin-top: var(--ih-spacing-sm); }
.infohub-card__read-time::before { content: '·'; margin-right: var(--ih-spacing-xs); }

/* Card: Horizontal */
.infohub-card--horizontal { display: grid; grid-template-columns: 200px 1fr; }
.infohub-card--horizontal .infohub-card__img-wrap { aspect-ratio: auto; height: 100%; }

/* Card: Overlay */
.infohub-card--overlay { position: relative; }
.infohub-card--overlay .infohub-card__img-wrap { aspect-ratio: 4/3; }
.infohub-card--overlay .infohub-card__body { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%); color: #fff; padding: var(--ih-spacing-lg) var(--ih-spacing-md) var(--ih-spacing-md); }
.infohub-card--overlay .infohub-card__title a,
.infohub-card--overlay .infohub-card__footer { color: #fff; }
.infohub-card--overlay .infohub-card__cat { color: var(--ih-color-accent); }

/* Card: Minimal */
.infohub-card--minimal { border: none; box-shadow: none; border-bottom: 1px solid var(--ih-color-border); border-radius: 0; padding: var(--ih-spacing-md) 0; }
.infohub-card--minimal:hover { transform: none; box-shadow: none; }
.infohub-card--minimal .infohub-card__body { padding: 0; }

/* ── Article ───────────────────────────────────────── */
.infohub-article__header { margin-bottom: var(--ih-spacing-lg); }
.infohub-article__cats { display: flex; gap: var(--ih-spacing-xs); flex-wrap: wrap; margin-bottom: var(--ih-spacing-sm); }
.infohub-article__cat {
    display: inline-block;
    padding: 2px 10px;
    background: var(--ih-color-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--ih-radius);
}

.infohub-article__title { font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.2; margin-bottom: var(--ih-spacing-md); }

.infohub-article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ih-spacing-md); font-size: 0.85rem; color: var(--ih-color-muted); padding-bottom: var(--ih-spacing-md); border-bottom: 1px solid var(--ih-color-border); }
.infohub-article__author a { color: var(--ih-color-primary); font-weight: 600; }
.infohub-article__read-time { margin-left: auto; }

.infohub-article__thumbnail { margin-bottom: var(--ih-spacing-lg); border-radius: var(--ih-radius); overflow: hidden; }
.infohub-article__thumbnail img { width: 100%; max-height: 520px; object-fit: cover; }
.infohub-article__caption { font-size: 0.8rem; color: var(--ih-color-muted); padding: var(--ih-spacing-xs) 0; text-align: center; font-style: italic; }

/* Article Content */
.infohub-article__content {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 72ch;
}

.infohub-article__content h2 { font-size: 1.6rem; margin: var(--ih-spacing-lg) 0 var(--ih-spacing-sm); padding-bottom: var(--ih-spacing-xs); border-bottom: 2px solid var(--ih-color-primary); }
.infohub-article__content h3 { font-size: 1.25rem; margin: var(--ih-spacing-lg) 0 var(--ih-spacing-sm); }
.infohub-article__content h4 { font-size: 1.1rem; margin: var(--ih-spacing-md) 0 var(--ih-spacing-xs); }

.infohub-article__content a { color: var(--ih-color-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.infohub-article__content a:hover { text-decoration: none; }

.infohub-article__content blockquote {
    border-left: 4px solid var(--ih-color-primary);
    padding: var(--ih-spacing-md) var(--ih-spacing-lg);
    background: var(--ih-color-surface);
    border-radius: 0 var(--ih-radius) var(--ih-radius) 0;
    margin: var(--ih-spacing-lg) 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ih-color-secondary);
}

.infohub-article__content ul, .infohub-article__content ol { padding-left: var(--ih-spacing-lg); margin-bottom: var(--ih-spacing-md); }
.infohub-article__content li { margin-bottom: var(--ih-spacing-xs); }
.infohub-article__content ul li { list-style: disc; }
.infohub-article__content ol li { list-style: decimal; }

.infohub-article__content table { width: 100%; border-collapse: collapse; margin-bottom: var(--ih-spacing-md); font-size: 0.9rem; }
.infohub-article__content th, .infohub-article__content td { padding: var(--ih-spacing-xs) var(--ih-spacing-sm); border: 1px solid var(--ih-color-border); text-align: left; }
.infohub-article__content th { background: var(--ih-color-surface); font-weight: 700; }
.infohub-article__content tr:nth-child(even) { background: var(--ih-color-surface); }

.infohub-article__content code { background: var(--ih-color-surface); padding: 2px 6px; border-radius: 3px; font-size: 0.875em; font-family: 'JetBrains Mono', monospace; }
.infohub-article__content pre { background: var(--ih-color-secondary); color: #e2e8f0; padding: var(--ih-spacing-md); border-radius: var(--ih-radius); overflow-x: auto; margin-bottom: var(--ih-spacing-md); }
.infohub-article__content pre code { background: none; padding: 0; }

/* ── Article Tags ──────────────────────────────────── */
.infohub-article__tags { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ih-spacing-xs); margin-top: var(--ih-spacing-lg); padding-top: var(--ih-spacing-md); border-top: 1px solid var(--ih-color-border); }
.infohub-article__tags-label { font-size: 0.85rem; font-weight: 700; color: var(--ih-color-muted); }
.infohub-tag { display: inline-block; padding: 3px 10px; border: 1px solid var(--ih-color-border); border-radius: var(--ih-radius); font-size: 0.8rem; transition: all var(--ih-transition); }
.infohub-tag:hover { background: var(--ih-color-primary); color: #fff; border-color: var(--ih-color-primary); }

/* ── Related Posts ─────────────────────────────────── */
.infohub-related { margin-top: var(--ih-spacing-xl); padding-top: var(--ih-spacing-lg); border-top: 2px solid var(--ih-color-primary); }
.infohub-related__title { font-size: 1.3rem; margin-bottom: var(--ih-spacing-lg); }
.infohub-related__grid { display: grid; gap: var(--ih-spacing-md); grid-template-columns: 1fr; }
@media (min-width: 600px) { .infohub-related__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .infohub-related__grid { grid-template-columns: repeat(4, 1fr); } }

.infohub-related__card { display: flex; flex-direction: column; gap: var(--ih-spacing-xs); }
.infohub-related__img { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--ih-radius); }
.infohub-related__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.infohub-related__card:hover .infohub-related__img img { transform: scale(1.05); }
.infohub-related__cat { font-size: 0.7rem; color: var(--ih-color-primary); font-weight: 700; text-transform: uppercase; }
.infohub-related__post-title { font-size: 0.9rem; font-family: var(--ih-font-heading); line-height: 1.3; }
.infohub-related__post-title a:hover { color: var(--ih-color-primary); }
.infohub-related__date { font-size: 0.75rem; color: var(--ih-color-muted); }

/* ── Read Also ─────────────────────────────────────── */
.infohub-read-also {
    background: var(--ih-color-surface);
    border-left: 4px solid var(--ih-color-accent);
    padding: var(--ih-spacing-md);
    margin: var(--ih-spacing-lg) 0;
    border-radius: 0 var(--ih-radius) var(--ih-radius) 0;
}
.infohub-read-also__label { display: block; font-weight: 700; margin-bottom: var(--ih-spacing-xs); font-size: 0.9rem; }
.infohub-read-also__list { display: flex; flex-direction: column; gap: var(--ih-spacing-xs); }
.infohub-read-also__list a { color: var(--ih-color-primary); text-decoration: underline; font-size: 0.9rem; }
.infohub-read-also__list a:hover { text-decoration: none; }

/* ── Post Navigation ───────────────────────────────── */
.infohub-post-nav { display: grid; gap: var(--ih-spacing-md); margin-top: var(--ih-spacing-lg); }
@media (min-width: 640px) { .infohub-post-nav { grid-template-columns: 1fr 1fr; } }
.infohub-post-nav__link { display: flex; flex-direction: column; gap: 4px; padding: var(--ih-spacing-md); background: var(--ih-color-surface); border-radius: var(--ih-radius); border: 1px solid var(--ih-color-border); transition: border-color var(--ih-transition); }
.infohub-post-nav__link:hover { border-color: var(--ih-color-primary); }
.infohub-post-nav__link--next { text-align: right; }
.infohub-post-nav__label { font-size: 0.75rem; color: var(--ih-color-muted); font-weight: 700; text-transform: uppercase; }
.infohub-post-nav__title { font-family: var(--ih-font-heading); font-size: 0.95rem; line-height: 1.3; }

/* ── Breadcrumbs ───────────────────────────────────── */
.infohub-breadcrumbs { font-size: 0.8rem; color: var(--ih-color-muted); margin-bottom: var(--ih-spacing-md); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.infohub-breadcrumbs a { color: var(--ih-color-primary); }
.infohub-breadcrumbs span { color: var(--ih-color-text); }
.breadcrumb-sep { color: var(--ih-color-muted); }

/* ── Sidebar ───────────────────────────────────────── */
.infohub-sidebar { display: flex; flex-direction: column; gap: var(--ih-spacing-md); }
.infohub-sidebar--sticky { position: sticky; top: calc(var(--ih-header-h) + var(--ih-spacing-md)); align-self: start; max-height: calc(100vh - var(--ih-header-h) - var(--ih-spacing-xl)); overflow-y: auto; }

.infohub-widget { background: var(--ih-color-surface); border-radius: var(--ih-radius); padding: var(--ih-spacing-md); }
.infohub-widget__title { font-size: 1rem; font-family: var(--ih-font-heading); font-weight: 700; margin-bottom: var(--ih-spacing-md); padding-bottom: var(--ih-spacing-sm); border-bottom: 2px solid var(--ih-color-primary); }

.infohub-recent-posts { display: flex; flex-direction: column; }
.infohub-recent-posts__item { display: flex; flex-direction: column; gap: 2px; padding: var(--ih-spacing-xs) 0; border-bottom: 1px solid var(--ih-color-border); }
.infohub-recent-posts__item:last-child { border-bottom: none; }
.infohub-recent-posts__item a { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.infohub-recent-posts__item a:hover { color: var(--ih-color-primary); }
.infohub-recent-posts__date { font-size: 0.75rem; color: var(--ih-color-muted); }

.infohub-cat-list li { border-bottom: 1px solid var(--ih-color-border); }
.infohub-cat-list a { display: flex; justify-content: space-between; padding: var(--ih-spacing-xs) 0; font-size: 0.875rem; transition: color var(--ih-transition); }
.infohub-cat-list a:hover { color: var(--ih-color-primary); }

/* ── Footer ────────────────────────────────────────── */
.infohub-footer { background: var(--ih-color-secondary); color: rgba(255,255,255,0.8); margin-top: var(--ih-spacing-xl); }
.infohub-footer__widgets { padding: var(--ih-spacing-xl) 0 var(--ih-spacing-lg); }

.infohub-footer__widgets-inner { display: grid; gap: var(--ih-spacing-lg); }
.infohub-footer__widgets--cols-1 { grid-template-columns: 1fr; }
.infohub-footer__widgets--cols-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.infohub-footer__widgets--cols-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.infohub-footer__widgets--cols-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.infohub-footer .infohub-widget { background: rgba(255,255,255,0.05); }
.infohub-footer .infohub-widget__title { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }

.infohub-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: var(--ih-spacing-md) 0; }
.infohub-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--ih-spacing-md); }
.infohub-footer__copyright { font-size: 0.85rem; }
.infohub-footer__menu { display: flex; gap: var(--ih-spacing-md); }
.infohub-footer__menu a { font-size: 0.85rem; opacity: 0.7; transition: opacity var(--ih-transition); }
.infohub-footer__menu a:hover { opacity: 1; }

/* ── Pagination ────────────────────────────────────── */
.infohub-pagination .page-numbers { display: flex; gap: var(--ih-spacing-xs); flex-wrap: wrap; margin-top: var(--ih-spacing-lg); }
.infohub-pagination .page-numbers li a,
.infohub-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--ih-spacing-sm);
    border: 1px solid var(--ih-color-border);
    border-radius: var(--ih-radius);
    font-size: 0.875rem;
    transition: all var(--ih-transition);
}
.infohub-pagination .page-numbers li .current { background: var(--ih-color-primary); color: #fff; border-color: var(--ih-color-primary); }
.infohub-pagination .page-numbers li a:hover { border-color: var(--ih-color-primary); color: var(--ih-color-primary); }

/* ── Archive Header ────────────────────────────────── */
.infohub-archive-header { margin-bottom: var(--ih-spacing-lg); padding-bottom: var(--ih-spacing-md); border-bottom: 2px solid var(--ih-color-primary); }
.infohub-archive-header__title { font-size: 2rem; }
.infohub-archive-header__desc { color: var(--ih-color-muted); margin-top: var(--ih-spacing-sm); }

/* ── Buttons ───────────────────────────────────────── */
.infohub-btn, .wp-block-button__link, button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: var(--ih-spacing-xs);
    padding: var(--ih-spacing-sm) var(--ih-spacing-lg);
    background: var(--ih-color-primary);
    color: #fff;
    border: 2px solid var(--ih-color-primary);
    border-radius: var(--ih-radius);
    font-family: var(--ih-font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--ih-transition);
    text-decoration: none;
}

.infohub-btn:hover { background: var(--ih-color-accent); border-color: var(--ih-color-accent); color: #fff; }

/* Button styles */
.layout-sidebar-right .infohub-btn--outlined,
.infohub-btn--outlined { background: transparent; color: var(--ih-color-primary); }
.infohub-btn--outlined:hover { background: var(--ih-color-primary); color: #fff; }

.infohub-btn--flat { border: none; background: var(--ih-color-surface); color: var(--ih-color-text); }
.infohub-btn--flat:hover { background: var(--ih-color-primary); color: #fff; }

/* ── Ad Slots ──────────────────────────────────────── */
.infohub-ad-slot { text-align: center; padding: var(--ih-spacing-sm) 0; min-height: 90px; display: flex; align-items: center; justify-content: center; background: var(--ih-color-surface); border-radius: var(--ih-radius); border: 1px dashed var(--ih-color-border); }
.infohub-ad-slot:empty::before { content: attr(data-label); font-size: 0.75rem; color: var(--ih-color-muted); }

/* ── Admin UI ──────────────────────────────────────── */
.infohub-presets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-top: 20px; }
.infohub-preset-card { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; }
.preset-preview { min-height: 100px; }
.infohub-io-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.infohub-io-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; }
.infohub-io-danger { border-color: #dc3232; }
.infohub-io-info { border-color: #00a0d2; background: #f0f8ff; }
.infohub-io-card h2 { font-size: 1.2rem; margin-bottom: 10px; }
.infohub-io-card ol { padding-left: 20px; }
.infohub-io-card ol li { list-style: decimal; margin-bottom: 6px; }

/* ── Utilities ─────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.infohub-no-posts { text-align: center; padding: var(--ih-spacing-xl); color: var(--ih-color-muted); }

/* ── Focus Styles ──────────────────────────────────── */
:focus-visible { outline: 2px solid var(--ih-color-primary); outline-offset: 2px; }

/* ── Print ─────────────────────────────────────────── */
@media print {
    .infohub-header, .infohub-sidebar, .infohub-footer, .infohub-related, .infohub-post-nav { display: none !important; }
    .infohub-main-wrap { display: block; }
    .infohub-article__content { max-width: none; }
}

/* ── Share Buttons ─────────────────────────────────── */
.infohub-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ih-spacing-xs);
    padding: var(--ih-spacing-md) 0;
    border-top: 1px solid var(--ih-color-border);
    border-bottom: 1px solid var(--ih-color-border);
    margin: var(--ih-spacing-lg) 0;
}

.infohub-share__label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ih-color-muted);
    margin-right: var(--ih-spacing-xs);
}

.infohub-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--share-color, var(--ih-color-border));
    border-radius: var(--ih-radius);
    color: var(--share-color, var(--ih-color-text));
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--ih-transition);
    text-decoration: none;
}

.infohub-share__btn:hover {
    background: var(--share-color);
    color: #fff;
}

.infohub-share__btn.copied {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
}

/* ── Back to Top ───────────────────────────────────── */
.infohub-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--ih-color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.infohub-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.infohub-back-to-top[hidden] { display: none; }

/* ── Reading Progress Bar ──────────────────────────── */
.infohub-progress-bar {
    position: fixed;
    left: 0;
    height: 3px;
    background: var(--ih-color-primary);
    z-index: 9999;
    width: 0;
    transition: width 0.1s linear;
    pointer-events: none;
}

.infohub-progress-bar--top    { top: 0; }
.infohub-progress-bar--bottom { bottom: 0; }

/* ── Table of Contents ─────────────────────────────── */
.infohub-toc {
    background: var(--ih-color-surface);
    border: 1px solid var(--ih-color-border);
    border-left: 4px solid var(--ih-color-primary);
    border-radius: 0 var(--ih-radius) var(--ih-radius) 0;
    padding: var(--ih-spacing-md);
    margin: var(--ih-spacing-lg) 0;
    font-size: 0.9rem;
}

.infohub-toc__title {
    font-family: var(--ih-font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--ih-spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.infohub-toc__toggle {
    font-size: 0.75rem;
    color: var(--ih-color-primary);
    font-family: var(--ih-font-body);
    font-weight: 400;
}

.infohub-toc__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.infohub-toc__list a {
    color: var(--ih-color-text);
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 1px dashed transparent;
    transition: color var(--ih-transition), border-color var(--ih-transition);
}

.infohub-toc__list a:hover,
.infohub-toc__list a.is-active {
    color: var(--ih-color-primary);
    border-bottom-color: var(--ih-color-primary);
}

.infohub-toc__list .toc-h3 {
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--ih-color-muted);
}

/* ── Copy Code Button ──────────────────────────────── */
.infohub-article__content pre {
    position: relative;
}

.infohub-copy-code {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--ih-font-body);
}

.infohub-copy-code:hover { background: rgba(255,255,255,0.2); color: #fff; }
.infohub-copy-code.copied { background: #27ae60; border-color: #27ae60; color: #fff; }

/* ── Per-post hero styles ──────────────────────────── */
.infohub-article__thumbnail--wide  { aspect-ratio: 21/9; overflow: hidden; }
.infohub-article__thumbnail--wide img  { width: 100%; height: 100%; object-fit: cover; }
.infohub-article__thumbnail--square { aspect-ratio: 1/1; overflow: hidden; max-width: 560px; }
.infohub-article__thumbnail--square img { width: 100%; height: 100%; object-fit: cover; }

/* Full-screen hero */
.infohub-article__hero-fullscreen {
    position: relative;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: var(--ih-spacing-lg);
    border-radius: var(--ih-radius);
    overflow: hidden;
}

.infohub-article__hero-fullscreen-overlay {
    width: 100%;
    padding: var(--ih-spacing-xl) var(--ih-spacing-lg) var(--ih-spacing-lg);
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    color: #fff;
}

.infohub-article__title--on-image {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.infohub-article__hero-fullscreen-overlay .infohub-article__meta { color: rgba(255,255,255,0.8); margin-top: var(--ih-spacing-sm); }
.infohub-article__hero-fullscreen-overlay .infohub-article__cat { background: var(--ih-color-primary); }

/* Narrow layout */
.infohub-main--narrow .infohub-article__content,
.infohub-main--narrow .infohub-article__header,
.infohub-main--narrow .infohub-article__thumbnail { max-width: 680px; margin-left: auto; margin-right: auto; }

/* Custom label */
.infohub-article__custom-label {
    display: inline-block;
    padding: 3px 12px;
    background: var(--ih-color-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--ih-radius);
    margin-bottom: var(--ih-spacing-sm);
}

/* ── New Header Styles ─────────────────────────────── */
/* Breaking Bar */
.infohub-breaking-bar {
    background: var(--ih-color-primary);
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.infohub-breaking-bar__label {
    background: rgba(0,0,0,0.25);
    padding: 6px 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
}

.infohub-breaking-bar__ticker {
    display: flex;
    gap: 2rem;
    padding: 6px 16px;
    overflow: hidden;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

.infohub-breaking-bar__ticker a { color: #fff; text-decoration: none; }
.infohub-breaking-bar__ticker a::after { content: ' •'; margin-left: 2rem; opacity: 0.5; }
.infohub-breaking-bar__ticker a:last-child::after { display: none; }

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Header Clean */
.infohub-header--clean {
    border-bottom: none;
    box-shadow: 0 1px 0 var(--ih-color-border);
}

.infohub-header--clean .infohub-header__site-name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Header Centered — меню під логотипом */
.infohub-header--centered .infohub-header__inner--centered {
    justify-content: space-between;
}

.infohub-header__centered-nav {
    border-top: 1px solid var(--ih-color-border);
    display: flex;
    justify-content: center;
}

.infohub-nav__menu--centered {
    justify-content: center;
}

/* Mega Menu */
.infohub-nav--mega .sub-menu {
    min-width: 500px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.infohub-nav--mega .sub-menu li { border-bottom: none; }

/* ── Dynamic vars from new settings ───────────────── */
body {
    font-size: var(--ih-font-size-base, 16px);
    line-height: var(--ih-line-height-body, 170%);
}

h1 { font-size: var(--ih-font-size-h1, 40px); font-weight: var(--ih-heading-weight, 700); text-transform: var(--ih-heading-transform, none); line-height: var(--ih-line-height-heading, 120%); }
h2 { font-size: var(--ih-font-size-h2, 28px); font-weight: var(--ih-heading-weight, 700); text-transform: var(--ih-heading-transform, none); line-height: var(--ih-line-height-heading, 120%); }
h3 { font-size: var(--ih-font-size-h3, 22px); font-weight: var(--ih-heading-weight, 700); text-transform: var(--ih-heading-transform, none); }

.infohub-article__content { font-size: var(--ih-article-fs, 105%); line-height: var(--ih-article-lh, 180%); max-width: var(--ih-article-width, 72ch); }
.infohub-article__content p { margin-bottom: calc(var(--ih-paragraph-spacing, 100%) * 0.01 * var(--ih-font-size-base, 16px)); }

/* Посилання з кастомними кольорами */
.infohub-article__content a { color: var(--ih-color-link, var(--ih-color-primary)); }
.infohub-article__content a:hover { color: var(--ih-color-link-hover, var(--ih-color-accent)); }

/* Хедер з кастомними кольорами */
.infohub-header { background: var(--ih-header-bg, var(--ih-color-bg)); color: var(--ih-header-text, var(--ih-color-text)); height: var(--ih-header-h, 64px); }
.infohub-header .infohub-custom-logo-link img,
.infohub-header .custom-logo { max-width: var(--ih-logo-max-width, 200px); height: auto; }

/* Футер з кастомними кольорами */
.infohub-footer { background: var(--ih-footer-bg, var(--ih-color-secondary)); color: var(--ih-footer-text, rgba(255,255,255,0.8)); }
.infohub-footer a { color: var(--ih-footer-text, rgba(255,255,255,0.8)); }

/* Кнопки — transform */
.infohub-btn, .wp-block-button__link { text-transform: var(--ih-btn-transform, none); border-width: var(--ih-border-width, 1px); }

/* Card image ratio */
.infohub-card__img-wrap { aspect-ratio: var(--ih-card-ratio, 16/9); }
.infohub-card__excerpt { -webkit-line-clamp: var(--ih-card-lines, 3); }

/* Header border bottom */
.infohub-header { border-bottom: var(--ih-border-width, 1px) solid var(--ih-color-border); }

/* Nav styles via data attr */
.infohub-header--nav-underline .infohub-nav__menu > li > a:hover { background: none; color: var(--ih-color-primary); text-decoration: underline; }
.infohub-header--nav-dot-below .infohub-nav__menu > li > a { position: relative; }
.infohub-header--nav-dot-below .infohub-nav__menu > li.current-menu-item > a::after { content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--ih-color-primary); }
.infohub-header--nav-bordered .infohub-nav__menu > li > a { border: 1px solid transparent; }
.infohub-header--nav-bordered .infohub-nav__menu > li > a:hover { border-color: var(--ih-color-primary); background: none; color: var(--ih-color-primary); }

/* Footer styles */
.infohub-footer--light { background: var(--ih-color-surface); color: var(--ih-color-text); }
.infohub-footer--minimal { padding: var(--ih-spacing-md) 0; }
.infohub-footer--minimal .infohub-footer__widgets { display: none; }
.infohub-footer--colored { background: var(--ih-color-primary); }

/* Card hover effects */
.infohub-card--hover-shadow:hover { transform: none; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.infohub-card--hover-border:hover { transform: none; box-shadow: none; border-color: var(--ih-color-primary); border-width: 2px; }
.infohub-card--hover-overlay::after { content: ''; position: absolute; inset: 0; background: var(--ih-color-primary); opacity: 0; transition: opacity 0.3s; border-radius: var(--ih-radius); }
.infohub-card--hover-overlay:hover::after { opacity: 0.08; }
.infohub-card { position: relative; }

/* No zoom on image when disabled */
.infohub-card--no-zoom:hover .infohub-card__img { transform: none; }

/* ── Read Also — стилі блоків ──────────────────────── */

/* Box стиль */
.infohub-read-also--box {
    background: var(--ih-color-surface);
    border-left: 4px solid var(--ih-color-primary);
    padding: var(--ih-spacing-md) var(--ih-spacing-lg);
    margin: var(--ih-spacing-lg) 0;
    border-radius: 0 var(--ih-radius) var(--ih-radius) 0;
}

.infohub-read-also--box .infohub-read-also__label {
    font-family: var(--ih-font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ih-color-primary);
    margin: 0 0 var(--ih-spacing-sm);
    display: block;
}

.infohub-read-also--box .infohub-read-also__list { display: flex; flex-direction: column; gap: 6px; }
.infohub-read-also--box .infohub-read-also__list li { display: flex; align-items: baseline; gap: 6px; }
.infohub-read-also--box .infohub-read-also__cat { font-size: 0.7rem; font-weight: 700; color: var(--ih-color-primary); text-transform: uppercase; white-space: nowrap; }
.infohub-read-also--box .infohub-read-also__list a { font-size: 0.9rem; color: var(--ih-color-text); text-decoration: underline; text-underline-offset: 3px; }
.infohub-read-also--box .infohub-read-also__list a:hover { color: var(--ih-color-primary); }

/* Cards стиль */
.infohub-read-also--cards {
    border: 1px solid var(--ih-color-border);
    border-radius: var(--ih-radius);
    padding: var(--ih-spacing-md);
    margin: var(--ih-spacing-lg) 0;
    background: var(--ih-color-surface);
}

.infohub-read-also--cards .infohub-read-also__label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ih-color-muted);
    margin: 0 0 var(--ih-spacing-sm);
}

.infohub-read-also__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--ih-spacing-sm);
}

.infohub-read-also__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--ih-color-text);
    border-radius: var(--ih-radius);
    overflow: hidden;
    transition: opacity var(--ih-transition);
}

.infohub-read-also__card:hover { opacity: 0.8; color: var(--ih-color-primary); }
.infohub-read-also__card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--ih-color-border); border-radius: var(--ih-radius); }
.infohub-read-also__card-img img { width: 100%; height: 100%; object-fit: cover; }
.infohub-read-also__no-img { width: 100%; height: 100%; background: var(--ih-color-border); }
.infohub-read-also__card-title { font-size: 0.85rem; font-weight: 600; line-height: 1.3; }

/* ── Mobile Menu — Drawer ──────────────────────────── */

/* Кнопка закрити — тільки для мобільного (додається через JS) */
.infohub-nav__close {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 14px var(--ih-spacing-md);
    background: var(--ih-color-primary);
    color: #fff;
    border: none;
    font-family: var(--ih-font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .infohub-nav__close {
        display: flex;
    }

    /* Header z-index */
    .infohub-header {
        z-index: 100;
    }

    /* Прибираємо desktop centered nav */
    #centered-nav-desktop {
        display: none;
    }
}
