/* ═══════════════════════════════════════════════
   FIREZZ — Modern Theme Structural Overrides
   Nav layout, article detail grid, footer
   ═══════════════════════════════════════════════ */

body.theme-modern {
    --bg: #ffffff;
    --bg-alt: #f6f6f6;
    --text: #111;
    --text-secondary: #555;
    --text-muted: #999;
    --border: #e5e5e5;
    --border-light: #efefef;
    --accent: #111;
    --font-sans: 'DM Sans', -apple-system, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

/* ── Mobile overlay ── */
body.theme-modern .nav-overlay {
    display:none; position:fixed; inset:0; z-index:999;
    background:rgba(0,0,0,0.15); opacity:0;
    transition:opacity 0.35s ease; pointer-events:none;
}
body.theme-modern .nav-overlay.open { display:block; opacity:1; pointer-events:auto; }

/* ═══ MODERN NAV — Single unified bar: logo left · links right · animated ═══ */

body.theme-modern .top-bar { display:none; }

body.theme-modern .main-nav {
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s, backdrop-filter 0.3s;
}
body.theme-modern .main-nav.scrolled {
    box-shadow: 0 1px 20px rgba(0,0,0,0.04);
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.96);
}
body.theme-modern .main-nav .container-lg { padding: 0 32px; }
body.theme-modern .main-nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 2rem;
}
body.theme-modern .nav-logo { flex-shrink:0; display:flex; align-items:center; transition:opacity 0.25s; border:none; outline:none; }
body.theme-modern .nav-logo:hover { opacity:0.7; }
body.theme-modern .nav-logo img { height:48px; width:auto; display:block; border:none; outline:none; }
body.theme-modern .nav-toggle { display:none; }

body.theme-modern .nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.15rem;
    flex: 1;
    justify-content: center;
}
body.theme-modern .nav-link {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-secondary);
    padding: 0.45rem 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    height: 72px;
    position: relative;
    transition: color 0.3s ease;
}
body.theme-modern .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
body.theme-modern .nav-link:hover { color: var(--text); }
body.theme-modern .nav-link:hover::after { transform: scaleX(1); }
body.theme-modern .nav-link i { font-size: 0.8rem; color: var(--text-muted); transition: color 0.3s; }
body.theme-modern .nav-link:hover i { color: var(--black); }
body.theme-modern .nav-link .fa-chevron-down {
    font-size: 0.45rem !important;
    opacity: 0.3;
    margin-left: 0.05rem;
    transition: transform 0.35s ease;
}
body.theme-modern .nav-link:hover .fa-chevron-down { transform: rotate(-180deg); opacity:0.5; }

body.theme-modern .nav-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.theme-modern .lang-switcher {
    display:flex;
    align-items:center;
    gap:0.4rem;
    padding:0 0.3rem;
    border-right:1px solid var(--border);
    margin-right:0.2rem;
}
body.theme-modern .lang-sel {
    font-family:var(--font-sans);
    font-size:0.55rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:1px;
    color:var(--text-muted);
    text-decoration:none;
    transition:color 0.25s;
}
body.theme-modern .lang-sel:hover { color:var(--text); }
body.theme-modern .lang-sel.active { color:var(--text); }
body.theme-modern .lang-sel-divider {
    width:2px; height:2px;
    border-radius:50%;
    background:var(--gray-300);
    flex-shrink:0;
}
body.theme-modern .nav-actions .search-toggle {
    background: none; border: none; color: var(--text-muted);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.85rem;
    border-radius: 50%;
    transition: all 0.3s;
}
body.theme-modern .nav-actions .search-toggle:hover {
    color: var(--text);
    background: var(--bg-alt);
}

/* ── MEGAMENU — animated dropdown ── */
body.theme-modern .has-megamenu { position: relative; }
body.theme-modern .megamenu {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: 2px solid var(--text);
    box-shadow: 0 24px 56px rgba(0,0,0,0.06);
    min-width: 220px;
    padding: 0.5rem 0;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
    pointer-events: none;
}
body.theme-modern .has-megamenu:hover .megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
body.theme-modern .megamenu-grid { display:flex; flex-direction:column; gap:0; }
body.theme-modern .megamenu-col { display:flex; flex-direction:column; }
body.theme-modern .megamenu-link {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1.5rem 0.5rem 1.6rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    border-left: 2px solid transparent;
    position: relative;
}
body.theme-modern .megamenu-link::before {
    content: '';
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0;
    flex-shrink: 0;
    transition: all 0.25s ease;
}
body.theme-modern .megamenu-link:hover {
    color: var(--text);
    background: var(--bg-alt);
    border-left-color: var(--text);
    padding-left: 2rem;
}
body.theme-modern .megamenu-link:hover::before { opacity: 1; background: var(--text); }
body.theme-modern .megamenu-featured { display: none; }

/* ── SEARCH ── */
body.theme-modern .search-dropdown {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.35s ease;
}
body.theme-modern .search-dropdown.open {
    max-height: 120px;
    opacity: 1;
}
body.theme-modern .search-form { display:flex; align-items:center; gap:0.5rem; padding:0.75rem 0; }
body.theme-modern .search-icon { color: var(--text-muted); font-size:0.85rem; }
body.theme-modern .search-input {
    flex:1; border:none; border-bottom:1px solid var(--border);
    border-radius:0; padding:0.4rem 0;
    font-family:var(--font-serif); font-size:1rem;
    background:transparent; outline:none;
    transition: border-color 0.3s;
}
body.theme-modern .search-input:focus { border-color: var(--text); }
body.theme-modern .search-submit {
    background: var(--text); color: var(--bg);
    border: none; padding: 0.5rem 1.5rem;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    border-radius: 0; cursor: pointer;
    transition: opacity 0.2s;
}
body.theme-modern .search-submit:hover { opacity:0.85; }

/* ── ARTICLE DETAIL — hero full-width, text + sidebar below ── */
body.theme-modern .article-hero {
    margin: 0;
    width: 100%;
    height: 55vh;
    min-height: 360px;
    max-height: 650px;
    overflow: hidden;
}
body.theme-modern .article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
body.theme-modern .article-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 28px;
}
body.theme-modern .article-detail-main { min-width: 0; }
body.theme-modern .article-detail-sidebar { border-left: 1px solid var(--border-light); padding-left: 1.5rem; }
body.theme-modern .sidebar-title { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; margin: 0 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
body.theme-modern .sidebar-article-card { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); text-decoration: none; transition: opacity 0.2s; align-items: center; }
body.theme-modern .sidebar-article-card:hover { opacity: 0.75; }
body.theme-modern .sidebar-article-card:last-child { border-bottom: none; }
body.theme-modern .sidebar-article-img { width: 60px; height: 60px; flex-shrink: 0; overflow: hidden; }
body.theme-modern .sidebar-article-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.theme-modern .sidebar-article-body { flex: 1; min-width: 0; }
body.theme-modern .sidebar-article-cat { font-family: var(--font-sans); font-size: 0.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); display: block; margin-bottom: 0.15rem; }
body.theme-modern .sidebar-article-title { font-family: var(--font-serif); font-size: 0.78rem; font-weight: 600; color: var(--text); margin: 0; line-height: 1.35; }
body.theme-modern .article-container { max-width: none; margin: 0; padding: 0; }
body.theme-modern .article-header { text-align: left; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
body.theme-modern .article-category { font-family: var(--font-sans); font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); display: inline-block; margin-bottom: 0.5rem; border-bottom: none; padding-bottom: 0; }
body.theme-modern .article-category a { color: var(--text-muted); text-decoration: none; }
body.theme-modern .article-category a:hover { color: var(--text); }
body.theme-modern .article-title { font-family: var(--font-serif); font-size: 2rem; margin: 0 0 0.5rem; }
body.theme-modern .article-summary { font-family: var(--font-serif); font-size: 1.05rem; color: var(--text-secondary); line-height: 1.6; font-style: italic; }
body.theme-modern .article-meta { font-family: var(--font-sans); font-size: 0.65rem; text-transform: uppercase; display: flex; gap: 1rem; align-items: center; border-bottom: 1px solid var(--border-light); padding-bottom: 1rem; margin-bottom: 1.5rem; }
body.theme-modern .article-body { font-size: 1.15rem; line-height: 1.85; }

body.theme-modern .article-body blockquote { border-left: 2px solid var(--text); margin: 1.5rem 0; padding: 0.5rem 0 0.5rem 1.25rem; font-family: var(--font-serif); font-size: 1.1rem; font-style: italic; color: var(--text-secondary); }
body.theme-modern .article-body img { width: 100%; height: auto; margin: 1.5rem 0; border-radius: 0; }
body.theme-modern .author-bio-card { background: var(--bg-alt); padding: 1.5rem; margin: 2rem 0; text-align: left; border: none; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; }
body.theme-modern .author-bio-card img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
body.theme-modern .author-bio-text { display: flex; flex-direction: column; justify-content: center; }
body.theme-modern .author-bio-card h5 { font-family: var(--font-serif); font-size: 0.85rem; font-weight: 700; margin: 0 0 0.15rem; }
body.theme-modern .author-bio-card p { font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-secondary); margin: 0; }
body.theme-modern .share-buttons { border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); margin: 1.5rem 0; padding: 1.25rem 0; }
body.theme-modern .share-label { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-right: 0.5rem; }
body.theme-modern .share-btn { width: 34px; height: 34px; color: var(--text-muted); border: 1px solid var(--border); font-size: 0.75rem; }
body.theme-modern .share-btn:hover { color: var(--text); border-color: var(--text); background: var(--bg-alt); }

/* ── COMMENTS ── */
body.theme-modern .comments-section { margin: 2.5rem 0; }
body.theme-modern .comments-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; margin-bottom: 1.5rem; padding-bottom: 0.5rem; }
body.theme-modern .comment-item { border: none; border-bottom: 1px solid var(--border-light); padding: 1.25rem 0; border-radius: 0; background: none; }
body.theme-modern .comment-submit { background: var(--text); border: 1px solid var(--text); border-radius: 0; font-family: var(--font-sans); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--bg); padding: 0.6rem 2rem; cursor: pointer; transition: all 0.2s; }
body.theme-modern .comment-submit:hover { background: transparent; color: var(--text); }

/* ── PAGE HEADER ── */
body.theme-modern .page-header { padding: 3.5rem 0 2rem; text-align: left; border: none; margin-bottom: 1rem; background: none; }
body.theme-modern .page-title { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
body.theme-modern .page-subtitle { font-family: var(--font-sans); font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.5rem; max-width: 500px; }

/* ── FOOTER ── */
body.theme-modern .site-footer,
body.theme-modern footer.site-footer {
    background: var(--bg) !important;
    color: var(--text);
    margin-top: 3rem;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border-light);
}
body.theme-modern .footer-nav a {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}
body.theme-modern .footer-nav a:hover { color: var(--text); }
body.theme-modern .footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
body.theme-modern .footer-social a:hover { border-color: var(--text); color: var(--text); }
body.theme-modern .footer-editorial {
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
    padding: 1.5rem 0;
}
body.theme-modern .footer-editorial-title {
    color: var(--text) !important;
    opacity: 0.55;
}
body.theme-modern .footer-editorial-text {
    color: var(--text-secondary) !important;
}
body.theme-modern .footer-bottom {
    text-align: center;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-light);
    font-size: 0.6rem;
    color: var(--text-muted) !important;
}

/* ── PAGINATION ── */
body.theme-modern .pagination-wrap a,
body.theme-modern .pagination-wrap span {
    border: 1px solid var(--border); border-radius: 0; padding: 0.4rem 0.9rem;
    font-family: var(--font-sans); font-size: 0.75rem; color: var(--text-secondary);
    background: var(--bg); text-decoration: none; transition: all 0.2s;
}
body.theme-modern .pagination-wrap a:hover { border-color: var(--text); color: var(--text); }
body.theme-modern .pagination-wrap .active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
    body.theme-modern .article-detail-layout { grid-template-columns: 1fr; padding: 0 20px; }
    body.theme-modern .article-detail-sidebar { border-left: none; padding-left: 0; border-top: 1px solid var(--border-light); padding-top: 1.5rem; margin-top: 1rem; }
    body.theme-modern .article-hero { height: 45vh; min-height: 300px; max-height: 500px; }
    body.theme-modern .article-title { font-size: 1.6rem; }
    body.theme-modern .page-title { font-size: 1.8rem; }
}
@media (max-width: 768px) {
    body.theme-modern .main-nav .container-lg { padding: 0 16px; }
    body.theme-modern .main-nav .nav-inner {
        height: 64px;
        display:flex;
        align-items:center;
        justify-content:center;
        position:relative;
    }
    body.theme-modern .nav-logo {
        position:absolute;
        left:50%;
        top:50%;
        transform:translate(calc(-50% - 20px),-50%);
    }
    body.theme-modern .nav-logo img { height: 44px; }
    body.theme-modern .nav-toggle {
        display: flex; flex-direction:column; gap:5px; cursor:pointer;
        background:none; border:none; padding:6px; position:absolute;
        left:0; top:50%; transform:translateY(-50%); z-index:1101;
    }
    body.theme-modern .nav-toggle span {
        display:block; width:22px; height:1.5px; background:var(--text);
        transition:all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
        transform-origin:center;
    }
    body.theme-modern .nav-toggle.open span:nth-child(1) { transform:translateY(6.5px) rotate(45deg); }
    body.theme-modern .nav-toggle.open span:nth-child(2) { opacity:0; transform:scaleX(0); }
    body.theme-modern .nav-toggle.open span:nth-child(3) { transform:translateY(-6.5px) rotate(-45deg); }
    body.theme-modern .nav-menu {
        position:fixed; top:0; right:-300px; width:300px; height:100vh;
        background:var(--bg); flex-direction:column; padding:5.5rem 0 2rem;
        z-index:1100; gap:0;
        opacity:0;
        transition:right 0.4s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.35s ease;
        box-shadow:-8px 0 32px rgba(0,0,0,0.04);
        overflow-y:auto; justify-content:flex-start;
        pointer-events:none;
    }
    body.theme-modern .nav-menu.open {
        right:0; opacity:1; pointer-events:auto;
    }
    body.theme-modern .nav-item { width:100%; }
    body.theme-modern .nav-actions {
        position:absolute;
        right:0;
        top:50%;
        transform:translateY(-50%);
    }

    body.theme-modern .nav-link {
        height:auto; padding:0.85rem 1.5rem; font-size:0.78rem;
        justify-content:flex-start; border-bottom:1px solid var(--border-light);
    }
    body.theme-modern .nav-link::after { display:none; }
    body.theme-modern .nav-link:hover { background:var(--bg-alt); }
    body.theme-modern .has-megamenu:hover .megamenu { opacity:0; visibility:hidden; transform:none; }
    body.theme-modern .has-megamenu.open .megamenu { opacity:1; visibility:visible; position:static; transform:none; }
    body.theme-modern .megamenu {
        position:static; box-shadow:none; border:none; border-top:1px solid var(--border);
        background:var(--bg-alt); min-width:auto; transform:none; margin:0;
        padding:0; opacity:1; visibility:visible;
        transition:max-height 0.35s ease; max-height:0; overflow:hidden;
    }
    body.theme-modern .has-megamenu.open .megamenu { max-height:800px; }
    body.theme-modern .megamenu-link { padding:0.6rem 1.5rem 0.6rem 2.8rem; font-size:0.78rem; }
    body.theme-modern .megamenu-link::before { display:none; }
    body.theme-modern .article-title { font-size: 1.5rem; }
    body.theme-modern .page-title { font-size: 1.5rem; }
    body.theme-modern .article-body { font-size: 1.05rem; }
    body.theme-modern .article-hero { height: 35vh; min-height: 220px; max-height: 380px; }
}
@media (max-width: 576px) {
    body.theme-modern .main-nav .nav-inner { height: 56px; }
    body.theme-modern .nav-logo img { height: 36px; }
    body.theme-modern .nav-menu { width:100%; right:-100%; }
    body.theme-modern .nav-menu.open { right:0; }
    body.theme-modern .nav-link { font-size:0.72rem; padding:0.75rem 1.25rem; }
    body.theme-modern .article-title { font-size: 1.3rem; }
    body.theme-modern .page-title { font-size: 1.5rem; }
}
/* Landscape mobile — prevent overflow */
@media (max-height: 480px) and (orientation: landscape) {
    body.theme-modern .main-nav .nav-inner { height: 52px; }
    body.theme-modern .nav-logo img { height: 32px; }
    body.theme-modern .article-hero { height: 50vh; min-height: 200px; max-height: 300px; }
    body.theme-modern .article-title { font-size: 1.1rem; }
    body.theme-modern .article-summary { font-size: 0.85rem; }
    body.theme-modern .article-body { font-size: 0.95rem; }
    body.theme-modern .article-detail-layout { padding: 0 16px; margin: 1rem auto; }
    body.theme-modern .author-bio-card { padding: 1rem; }
    body.theme-modern .share-buttons { padding: 0.75rem 0; }
    body.theme-modern .page-title { font-size: 1.2rem; }
    body.theme-modern .page-header { padding: 1.5rem 0 1rem; }
    body.theme-modern .main-nav .container-lg { padding: 0 12px; }
}
