/* =============================================================================
   LEMAZOU - Business News Template
   Pure CSS — No external framework, no CDN, no Bootstrap, no jQuery
   Font: Montserrat (local woff2 only)
   Deferred stylesheet — critical above-the-fold CSS is inlined per page
   Version: 2026-03-09
   =============================================================================
   TABLE OF CONTENTS
   01. @font-face
   02. :root CSS Custom Properties
   03. Reset & Base
   04. Typography
   05. Layout (container, content-grid, content-wrapper)
   06. Header & Navigation
   07. Trending Ticker Section
   08. Hero / Featured Section
   09. Article Cards
   10. Category Page
   11. Article Page
   12. Author Page
   13. Static Pages (legal, contact, 404)
   14. Sidebar & Widgets
   15. Breadcrumb
   16. Footer
   17. Components (pagination, back-to-top, search-overlay)
   18. Media Queries
   ============================================================================= */


/* =============================================================================
   01. @FONT-FACE
   ============================================================================= */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/templates/lemazou/montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/templates/lemazou/montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/templates/lemazou/montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/templates/lemazou/montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/templates/lemazou/montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* =============================================================================
   02. CSS CUSTOM PROPERTIES
   ============================================================================= */

:root {
    /* Brand */
    --primary:          #FFCC00;
    --primary-hover:    #E6B800;
    --secondary:        #31404B;
    --dark:             #1E2024;

    /* Text */
    --text-dark:        #1E2024;
    --text-title:       #1E2024;
    --text-body:        #6c757d;
    --text-meta:        #9A9DA2;
    --text-light:       #fff;

    /* Backgrounds */
    --bg-body:          #EDEFF4;
    --bg-white:         #fff;
    --bg-light:         #f8f9fa;
    --bg-dark:          #1E2024;
    --bg-darker:        #15171a;

    /* Borders */
    --border-light:     #e0e0e0;
    --border-gray:      #ddd;

    /* Typography */
    --font-main:        'Montserrat', sans-serif;
    --fs-xs:            11px;
    --fs-sm:            12px;
    --fs-base:          14px;
    --fs-md:            15px;
    --fs-lg:            17px;
    --fs-xl:            21px;
    --fs-2xl:           26px;
    --fs-3xl:           32px;
    --fs-hero:          36px;

    /* Layout */
    --container-width:  1200px;
    --sidebar-width:    300px;

    /* Spacing */
    --gap-xs:           5px;
    --gap-sm:           10px;
    --gap-md:           15px;
    --gap-lg:           20px;
    --gap-xl:           30px;
    --gap-2xl:          40px;

    /* Effects */
    --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:        0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg:        0 6px 24px rgba(0,0,0,0.16);
    --transition:       0.3s ease;
}


/* =============================================================================
   03. RESET & BASE
   ============================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--text-dark);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.search-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: var(--font-main);
}

input,
textarea,
select {
    font-family: var(--font-main);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-title);
}

p {
    margin-bottom: 0;
}

figure {
    margin: 0;
}

.page-main {
    flex: 1;
}

main {
    flex: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


/* =============================================================================
   04. TYPOGRAPHY
   ============================================================================= */

/* Section title — bold yellow left border, uppercase */
.section-title {
    font-size: var(--fs-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-title);
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    margin-bottom: var(--gap-lg);
    line-height: 1.4;
}

/* Category badge — yellow pill */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary);
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
    text-decoration: none;
    transition: background-color var(--transition);
    line-height: 1.6;
}

.category-badge:hover {
    background-color: var(--primary-hover);
    color: var(--text-dark);
}

/* Dot separator in meta lines */
.dot {
    color: var(--border-light);
    line-height: 1;
}

/* Utility spacing */
.section-mt  { margin-top: var(--gap-xl); }
.section-mb  { margin-bottom: var(--gap-xl); }
.mt-0        { margin-top: 0 !important; }


/* =============================================================================
   05. LAYOUT
   ============================================================================= */

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
}

/* Two-column layout: main + sidebar */
.content-grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap-xl);
    align-items: start;
}

/* Article page layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap-xl);
    align-items: start;
    padding: var(--gap-xl) 0 60px;
}

.content-main {
    min-width: 0;
}

/* Full-width (no sidebar) */
.content-wrapper--full .content-main {
    grid-column: 1 / -1;
}

.page-main {
    padding-bottom: 60px;
}

.page-section {
    padding: var(--gap-xl) 0;
}


/* =============================================================================
   06. HEADER & NAVIGATION
   ============================================================================= */

/* ---- Topbar ---- */
.topbar {
    background-color: var(--bg-dark);
    color: rgba(255,255,255,0.65);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar-content,
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-date {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.5);
}

.topbar-date svg {
    flex-shrink: 0;
    color: var(--primary);
}

.topbar-link {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity var(--transition);
}

.topbar-link:hover {
    opacity: 0.8;
    color: var(--primary);
}

.topbar-cats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-cats a {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,0.55);
    transition: color var(--transition);
}

.topbar-cats a:hover {
    color: var(--primary);
}

/* ---- Site Header ---- */
.site-header {
    background-color: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 500;
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

.site-header.hidden {
    transform: translateY(-100%);
    transition: transform 0.35s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 1.5rem;
}

/* ---- Logo ---- */
.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.site-logo img {
    height: 44px;
    width: auto;
    display: block;
}

.logo-svg {
    display: flex;
    align-items: center;
}

.logo-svg svg {
    max-height: 50px;
    width: auto;
}

.logo-primary {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-word-accent { color: var(--primary); }
.logo-word-rest   { color: var(--text-light); }

.logo-text {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    white-space: nowrap;
}

.logo-text .logo-name {
    display: block;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

.logo-text .logo-tagline {
    display: block;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

.header-actions,
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ---- Main Navigation (secondary bar below header) ---- */
.main-nav {
    background-color: var(--secondary);
    border-top: 1px solid rgba(255,255,255,0.07);
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 11px 14px;
    color: rgba(255,255,255,0.8);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
    transition: color var(--transition);
}

.nav-item > a:hover {
    color: var(--primary);
}

.nav-item.active > a {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* ---- Dropdown ---- */
.dropdown-arrow {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    transition: transform var(--transition);
}

.nav-item.has-dropdown:hover .dropdown-arrow,
.nav-item.has-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-dark);
    min-width: 200px;
    border-top: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 18px;
    color: rgba(255,255,255,0.75);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition), padding-left var(--transition);
}

.dropdown-menu li a:hover {
    color: var(--primary);
    padding-left: 24px;
}

/* ---- Search toggle ---- */
.search-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.search-toggle:hover {
    color: var(--primary);
}

.nav-search {
    display: flex;
    align-items: center;
}

/* ---- Hamburger button ---- */
.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =============================================================================
   07. TRENDING TICKER SECTION
   ============================================================================= */

/* Yellow (#FFCC00) background bar with dark label */
.trending-section {
    background-color: var(--primary);
    color: var(--text-dark);
    overflow: hidden;
}

.trending-inner {
    display: flex;
    align-items: stretch;
    min-height: 40px;
}

/* "TRENDING" dark label */
.trending-label {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 2px solid var(--primary);
}

/* Ticker track */
.trending-ticker {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 16px;
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.trending-ticker-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: lm-ticker-scroll 30s linear infinite;
}

.trending-ticker-inner:hover {
    animation-play-state: paused;
}

.trending-ticker-inner a,
.trending-ticker-inner span {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-dark);
    padding-right: 50px;
    transition: opacity var(--transition);
}

.trending-ticker-inner a:hover {
    opacity: 0.7;
}

.trending-ticker-inner .ticker-sep {
    color: rgba(30,32,36,0.4);
    font-weight: 800;
    padding-right: 50px;
}

.trending-arrow {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--text-dark);
    flex-shrink: 0;
    transition: opacity var(--transition);
}

.trending-arrow:hover {
    opacity: 0.7;
}

@keyframes lm-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* =============================================================================
   08. HERO / FEATURED SECTION
   ============================================================================= */

.hero-section {
    background-color: var(--bg-dark);
    padding: 20px 0 0;
}

/* Two-column: large left + 2x2 right */
.hero-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 4px;
    min-height: 500px;
}

.hero-main {
    height: 100%;
}

.hero-grid__right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

/* ---- Hero card ---- */
.hero-card {
    position: relative;
    overflow: hidden;
    display: block;
    background-color: #2A2D33;
}

.hero-card__link {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.hero-card:hover .hero-card__img {
    transform: scale(1.05);
}

.hero-card--large { height: 500px; }
.hero-card--small { height: 248px; }

/* Gradient overlay */
.hero-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 20px 20px 24px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.55) 50%,
        rgba(0,0,0,0) 100%
    );
}

.hero-card__meta {
    margin-bottom: 8px;
}

.hero-card__title {
    font-size: var(--fs-xl);
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.hero-card__title a {
    color: var(--text-light);
    transition: color var(--transition);
}

.hero-card__title a:hover {
    color: var(--primary);
}

.hero-card__title--sm {
    font-size: var(--fs-base);
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card__excerpt {
    font-size: var(--fs-base);
    color: rgba(255,255,255,0.75);
    line-height: 1.55;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card__footer {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    margin-top: 8px;
}

.hero-card__author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: color var(--transition);
}

.hero-card__author:hover {
    color: var(--primary);
}

.hero-card__author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* Homepage body layout */
.homepage-body {
    padding: var(--gap-xl) 0 60px;
}

.homepage-grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap-xl);
    align-items: start;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-lg);
    margin-bottom: var(--gap-xl);
}


/* =============================================================================
   09. ARTICLE CARDS
   ============================================================================= */

/* ---- Standard news card (sharp corners, white bg, thin border) ---- */
.article-card,
.news-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}

.article-card:hover,
.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Image wrapper */
.card-image,
.card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-body);
    flex-shrink: 0;
}

.card-image img,
.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.article-card:hover .card-image img,
.news-card:hover .card-img-wrap img {
    transform: scale(1.04);
}

/* Category badge overlay */
.card-badge,
.card-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: var(--text-dark);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    line-height: 1.6;
    z-index: 1;
    transition: background-color var(--transition);
}

.card-badge:hover,
.card-cat-badge:hover {
    background-color: var(--primary-hover);
}

/* Card content area */
.card-content,
.card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    flex-wrap: wrap;
}

.card-meta .dot {
    color: var(--border-light);
}

.card-title {
    font-size: var(--fs-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    color: var(--text-title);
    margin-bottom: 8px;
    flex: 1;
}

.card-title a {
    color: var(--text-title);
    transition: color var(--transition);
}

.card-title a:hover {
    color: var(--secondary);
}

.card-excerpt {
    font-size: var(--fs-sm);
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-author,
.card-footer {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-meta);
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
    margin-top: auto;
}

.card-author a,
.card-footer a {
    color: var(--text-dark);
    transition: color var(--transition);
}

.card-author a:hover,
.card-footer a:hover {
    color: var(--secondary);
}

/* ---- Featured article card ---- */
.featured-article {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}

.featured-article:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.featured-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-body);
}

.featured-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.featured-article:hover .featured-img-wrap img {
    transform: scale(1.03);
}

.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary);
    color: var(--text-dark);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    z-index: 1;
    transition: background-color var(--transition);
}

.featured-badge:hover {
    background-color: var(--primary-hover);
}

.featured-body {
    padding: 24px;
}

.featured-meta {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.featured-title {
    font-size: var(--fs-xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.25;
    color: var(--text-title);
    margin-bottom: 12px;
}

.featured-title a {
    color: var(--text-title);
    transition: color var(--transition);
}

.featured-title a:hover {
    color: var(--secondary);
}

.featured-excerpt {
    font-size: var(--fs-base);
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 14px;
}

.featured-author {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-meta);
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}

.featured-author a {
    color: var(--text-dark);
    transition: color var(--transition);
}

.featured-author a:hover {
    color: var(--secondary);
}

/* ---- Articles grid ---- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-lg);
    margin-bottom: 28px;
}

/* ---- Empty state ---- */
.no-articles {
    background-color: var(--bg-white);
    border: 1px dashed var(--border-light);
    padding: 60px 24px;
    text-align: center;
    color: var(--text-body);
    font-size: var(--fs-md);
    margin-bottom: 28px;
}


/* =============================================================================
   10. CATEGORY PAGE
   ============================================================================= */

.category-header {
    background-color: var(--bg-dark);
    padding: 40px 0;
    margin-bottom: 32px;
}

.category-label {
    display: inline-block;
    background-color: var(--primary);
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    margin-bottom: 14px;
}

.category-title {
    font-size: var(--fs-hero);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    line-height: 1.15;
    margin-bottom: 12px;
}

.category-desc {
    font-size: var(--fs-md);
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: 14px;
}

.category-count {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
}

/* Horizontal featured card */
.category-featured {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: row;
    margin-bottom: 28px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.category-featured:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-featured__img {
    width: 45%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-body);
}

.category-featured__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-featured:hover .category-featured__img img {
    transform: scale(1.04);
}

.category-featured__body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-featured__meta {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.category-featured__title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    color: var(--text-title);
    margin-bottom: 14px;
}

.category-featured__title a {
    color: var(--text-title);
    transition: color var(--transition);
}

.category-featured__title a:hover {
    color: var(--secondary);
}

.category-featured__excerpt {
    font-size: var(--fs-base);
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 16px;
}


/* =============================================================================
   11. ARTICLE PAGE
   ============================================================================= */

/* Article dark header */
.article-header {
    background-color: var(--bg-dark);
    padding: 40px 0 36px;
}

.article-header .category-badge {
    margin-bottom: 16px;
}

.article-title {
    font-size: var(--fs-3xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.15;
    color: var(--text-light);
    margin-bottom: 20px;
    max-width: 820px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--gap-md);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
}

.article-meta .dot {
    color: rgba(255,255,255,0.3);
}

.article-meta a {
    color: rgba(255,255,255,0.75);
    transition: color var(--transition);
}

.article-meta a:hover {
    color: var(--primary);
}

.article-meta .meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta .meta-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
}

/* Featured image */
.article-featured-img {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    display: block;
    background-color: var(--bg-dark);
}

.article-img-caption {
    background-color: var(--bg-light);
    border-left: 3px solid var(--primary);
    padding: 8px 14px;
    font-size: var(--fs-xs);
    font-style: italic;
    color: var(--text-meta);
    margin-bottom: var(--gap-xl);
}

/* ---- Article body typography ---- */
.article-content {
    font-size: var(--fs-md);
    line-height: 1.8;
    color: var(--text-body);
    word-break: break-word;
    overflow-wrap: break-word;
}

.article-content h2 {
    font-size: var(--fs-2xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-title);
    margin-top: 36px;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    line-height: 1.25;
}

.article-content h3 {
    font-size: var(--fs-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    color: var(--text-title);
    margin-top: 30px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.article-content h4 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-title);
    margin-top: 24px;
    margin-bottom: 10px;
}

.article-content h5,
.article-content h6 {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text-title);
    margin-top: 20px;
    margin-bottom: 8px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.article-content a:hover {
    color: var(--primary-hover);
}

.article-content ul,
.article-content ol {
    list-style: revert;
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-content li {
    margin-bottom: 6px;
    color: var(--text-body);
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    background-color: var(--bg-light);
    margin: 28px 0;
    padding: 20px 24px;
    font-size: var(--fs-lg);
    font-weight: 600;
    font-style: italic;
    color: var(--text-title);
    line-height: 1.6;
}

.article-content blockquote p {
    margin-bottom: 0;
}

.article-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: var(--fs-sm);
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-hover);
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px auto;
}

.article-content figure {
    margin: 24px 0;
}

.article-content figcaption {
    text-align: center;
    font-size: var(--fs-xs);
    font-style: italic;
    color: var(--text-meta);
    margin-top: 8px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: var(--fs-sm);
}

.article-content table th {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
}

.article-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-body);
    vertical-align: top;
}

.article-content table tr:nth-child(even) td {
    background-color: var(--bg-light);
}

.article-content pre {
    background-color: #1a1e22;
    color: #abb2bf;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 13px;
    line-height: 1.6;
    border-left: 4px solid var(--primary);
}

.article-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    background-color: rgba(255,204,0,0.12);
    color: var(--secondary);
    padding: 2px 6px;
    border-radius: 2px;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.article-content hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 32px 0;
}

/* TOC */
.article-toc {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    margin-bottom: 28px;
}

.article-toc__title {
    font-size: var(--fs-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-title);
    margin-bottom: 12px;
}

.article-toc ol,
.article-toc ul {
    list-style: revert;
    padding-left: 20px;
    margin-bottom: 0;
}

.article-toc li {
    margin-bottom: 4px;
}

.article-toc a {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-body);
    text-decoration: none;
    transition: color var(--transition);
}

.article-toc a:hover {
    color: var(--primary-hover);
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gap-xs);
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.article-tags__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-title);
    margin-right: 6px;
}

.article-tag {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--text-body);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border: 1px solid var(--border-light);
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.article-tag:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    border-color: var(--primary);
}

/* Social share */
.social-share {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.social-share__title {
    font-size: var(--fs-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-title);
    margin-bottom: 12px;
}

.social-share__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border: none;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
    text-decoration: none;
    line-height: 1;
}

.share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: var(--text-light);
}

/* Colored social share buttons */
.share-btn--twitter   { background-color: #1da1f2; }
.share-btn--facebook  { background-color: #3b5998; }
.share-btn--linkedin  { background-color: #0077b5; }
.share-btn--whatsapp  { background-color: #25d366; }
.share-btn--copy      { background-color: var(--secondary); }

/* Author box */
.author-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    padding: 28px;
    margin-top: 32px;
    display: flex;
    gap: var(--gap-lg);
    align-items: flex-start;
}

.author-box__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--primary);
}

.author-box__avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid var(--primary);
    color: var(--text-light);
    font-size: var(--fs-xl);
    font-weight: 800;
    text-transform: uppercase;
}

.author-box__body {
    flex: 1;
}

.author-box__label {
    font-size: var(--fs-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-hover);
    margin-bottom: 4px;
}

.author-box__name {
    font-size: var(--fs-lg);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-title);
    margin-bottom: 8px;
}

.author-box__name a {
    color: var(--text-title);
    transition: color var(--transition);
}

.author-box__name a:hover {
    color: var(--secondary);
}

.author-box__bio {
    font-size: var(--fs-sm);
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 12px;
}

.author-box__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    transition: color var(--transition);
}

.author-box__link:hover {
    color: var(--primary-hover);
}

/* Related articles */
.related-articles {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid var(--border-light);
}

.related-articles .section-title {
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-md);
}

.related-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}

.related-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.related-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-body);
}

.related-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover .related-card__img img {
    transform: scale(1.05);
}

.related-card__body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-card__cat {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-hover);
    margin-bottom: 6px;
}

.related-card__title {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.35;
    color: var(--text-title);
    flex: 1;
}

.related-card__title a {
    color: var(--text-title);
    transition: color var(--transition);
}

.related-card__title a:hover {
    color: var(--secondary);
}

.related-card__date {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-meta);
    margin-top: 8px;
}


/* =============================================================================
   12. AUTHOR PAGE
   ============================================================================= */

.author-profile {
    background-color: var(--bg-dark);
    padding: 48px 0 40px;
    margin-bottom: 32px;
}

.author-profile__inner {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-xl);
}

.author-profile__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 4px solid var(--primary);
}

.author-profile__avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 4px solid var(--primary);
    color: var(--text-light);
    font-size: var(--fs-2xl);
    font-weight: 800;
    text-transform: uppercase;
}

.author-profile__body {
    flex: 1;
}

.author-profile__label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 6px;
}

.author-profile__name {
    font-size: var(--fs-hero);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.15;
}

.author-profile__bio {
    font-size: var(--fs-base);
    color: rgba(255,255,255,0.65);
    line-height: 1.75;
    max-width: 680px;
    margin-bottom: 16px;
}

.author-profile__meta {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
    flex-wrap: wrap;
}

.author-profile__stat {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
}

.author-profile__stat strong {
    color: var(--primary);
    font-weight: 800;
    font-size: var(--fs-sm);
}

.author-social {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    margin-top: 14px;
}

.author-social__link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: background-color var(--transition), color var(--transition);
}

.author-social__link:hover {
    background-color: var(--primary);
    color: var(--text-dark);
}

.author-articles-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =============================================================================
   13. STATIC PAGES (legal, contact, 404)
   ============================================================================= */

/* Generic static page */
.page-content {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 40px;
    margin-bottom: 28px;
}

.page-content h1 {
    font-size: var(--fs-3xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-title);
    margin-bottom: 8px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
    line-height: 1.2;
}

.page-content .page-date {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    margin-bottom: 28px;
    margin-top: 8px;
    padding-left: 14px;
}

.page-content h2 {
    font-size: var(--fs-xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-title);
    margin-top: 32px;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}

.page-content h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-title);
    margin-top: 24px;
    margin-bottom: 10px;
}

.page-content p {
    font-size: var(--fs-base);
    color: var(--text-body);
    line-height: 1.75;
    margin-bottom: 16px;
}

.page-content ul,
.page-content ol {
    list-style: revert;
    padding-left: 24px;
    margin-bottom: 16px;
}

.page-content li {
    font-size: var(--fs-base);
    color: var(--text-body);
    margin-bottom: 6px;
    line-height: 1.65;
}

.page-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.page-content a:hover {
    color: var(--primary-hover);
}

/* Contact page */
.contact-page {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 48px 40px;
    margin-bottom: 28px;
}

.contact-page__header {
    margin-bottom: 28px;
}

.contact-page__title {
    font-size: var(--fs-3xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-title);
    margin-bottom: 10px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
    line-height: 1.2;
}

.contact-page__intro {
    font-size: var(--fs-base);
    color: var(--text-body);
    line-height: 1.75;
    max-width: 600px;
}

/* Email contact box */
.contact-email-box {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-md);
    background-color: var(--bg-dark);
    padding: 20px 28px;
    margin-top: 24px;
    text-decoration: none;
    transition: background-color var(--transition);
}

.contact-email-box:hover {
    background-color: var(--secondary);
}

.contact-email-box__icon {
    color: var(--primary);
    flex-shrink: 0;
}

.contact-email-box__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.55);
    display: block;
    margin-bottom: 2px;
}

.contact-email-box__email {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
}

/* 404 Error page */
.error-page {
    padding: 80px 20px;
    text-align: center;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-page__code {
    font-size: 120px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
    letter-spacing: -4px;
    margin-bottom: 8px;
}

.error-page__title {
    font-size: var(--fs-3xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-title);
    margin-bottom: 16px;
}

.error-page__text {
    font-size: var(--fs-md);
    color: var(--text-body);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 28px;
}

/* Yellow accent button */
.error-page__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: var(--text-dark);
    font-size: var(--fs-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 28px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
    text-decoration: none;
}

.error-page__btn:hover {
    background-color: var(--primary-hover);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.error-page__divider {
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin: 24px auto;
}


/* =============================================================================
   14. SIDEBAR & WIDGETS
   ============================================================================= */

.sidebar {
    position: sticky;
    top: 80px;
    min-width: 0;
}

/* Base widget — white card, thin border */
.widget {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 22px;
    margin-bottom: 22px;
}

/* Widget title — yellow left border, like section-title */
.widget-title {
    font-size: var(--fs-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-title);
    padding-left: 10px;
    border-left: 4px solid var(--primary);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ---- Widget: social stats ---- */
.widget-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-sm);
}

.social-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    color: var(--text-light);
    text-align: center;
    transition: opacity var(--transition);
    text-decoration: none;
}

.social-stat:hover {
    opacity: 0.88;
    color: var(--text-light);
}

/* Social brand colors */
.social-stat--facebook  { background-color: #3b5998; }
.social-stat--twitter   { background-color: #1da1f2; }
.social-stat--instagram { background-color: #e4405f; }
.social-stat--youtube   { background-color: #ff0000; }
.social-stat--linkedin  { background-color: #0077b5; }
.social-stat--pinterest { background-color: #e60023; }

.social-stat__count {
    font-size: var(--fs-lg);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 3px;
}

.social-stat__label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.85;
}

.social-stat__icon {
    margin-bottom: 4px;
}

/* ---- Widget: newsletter ---- */
.widget-newsletter {
    background-color: var(--bg-dark);
    border-color: var(--bg-dark);
    padding: 24px;
}

.widget-newsletter .widget-title {
    color: var(--text-light);
    border-left-color: var(--primary);
}

.widget-newsletter__text {
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    margin-bottom: 16px;
}

.widget-newsletter__form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.widget-newsletter__input {
    width: 100%;
    padding: 11px 14px;
    background-color: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-light);
    font-size: var(--fs-sm);
    font-weight: 500;
    outline: none;
    transition: border-color var(--transition);
}

.widget-newsletter__input::placeholder {
    color: rgba(255,255,255,0.35);
}

.widget-newsletter__input:focus {
    border-color: var(--primary);
}

/* Newsletter button — yellow bg, dark text */
.widget-newsletter button,
.widget-newsletter__btn {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--primary);
    color: var(--text-dark);
    border: none;
    font-family: var(--font-main);
    font-size: var(--fs-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background-color var(--transition);
}

.widget-newsletter button:hover,
.widget-newsletter__btn:hover {
    background-color: var(--primary-hover);
}

/* ---- Widget: popular posts ---- */
.sidebar-post {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-post:first-child {
    padding-top: 0;
}

.sidebar-post-rank {
    width: 28px;
    height: 28px;
    background-color: var(--primary);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.sidebar-post-img {
    width: 72px;
    height: 54px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: var(--bg-body);
}

.sidebar-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.sidebar-post:hover .sidebar-post-img img {
    transform: scale(1.06);
}

.sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.sidebar-post-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-title a {
    color: var(--text-dark);
    transition: color var(--transition);
}

.sidebar-post-title a:hover {
    color: var(--secondary);
}

.sidebar-post-date {
    font-size: var(--fs-xs);
    color: var(--text-meta);
    font-weight: 500;
}

/* ---- Widget: categories ---- */
.widget-cats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-cats li {
    border-bottom: 1px solid var(--border-light);
}

.widget-cats li:last-child {
    border-bottom: none;
}

.widget-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 0;
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-dark);
    transition: color var(--transition), padding-left var(--transition);
}

.widget-cats a:hover {
    color: var(--secondary);
    padding-left: 6px;
}

.widget-cats a.active {
    color: var(--secondary);
    font-weight: 800;
}

.widget-cats svg {
    flex-shrink: 0;
    color: var(--primary);
}

.widget-cats .cat-count {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-meta);
    background-color: var(--bg-light);
    padding: 2px 7px;
    margin-left: auto;
}

/* ---- Widget: tag cloud ---- */
.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-xs);
    padding: 0;
}

.widget-tag {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--text-body);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 5px 12px;
    border: 1px solid var(--border-light);
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.widget-tag:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    border-color: var(--primary);
}

/* ---- Widget: ad / banner ---- */
.widget-ad {
    padding: 0;
    overflow: hidden;
    border: none;
    background: transparent;
}

.widget-ad img {
    width: 100%;
    height: auto;
    display: block;
}


/* =============================================================================
   15. BREADCRUMB
   ============================================================================= */

.breadcrumb-bar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
    padding: 12px 0;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-meta);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '\203A';
    margin-right: 4px;
    color: var(--border-light);
    font-size: 14px;
    line-height: 1;
}

.breadcrumb-item a {
    color: var(--text-meta);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: color var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
}

.breadcrumb-item.active {
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}


/* =============================================================================
   16. FOOTER
   ============================================================================= */

/* Dark footer with yellow accents */
.site-footer {
    background-color: var(--bg-dark);
    color: rgba(255,255,255,0.6);
    padding: 56px 0 0;
    margin-top: 20px;
}

/* 4-column grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-section h3,
.footer-section .footer-col-title {
    font-size: var(--fs-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-description,
.footer-section p {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
    margin-bottom: 14px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
}

.footer-logo span {
    color: var(--primary);
}

/* Footer links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.55);
    transition: color var(--transition), padding-left var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a::before {
    content: '›';
    color: var(--primary);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

/* Footer recent posts */
.footer-recent-post {
    display: flex;
    gap: var(--gap-sm);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
}

.footer-recent-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.footer-recent-post__img {
    width: 60px;
    height: 45px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: var(--secondary);
}

.footer-recent-post__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.footer-recent-post:hover .footer-recent-post__img img {
    transform: scale(1.06);
}

.footer-recent-post__title {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.35;
    color: rgba(255,255,255,0.65);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.footer-recent-post:hover .footer-recent-post__title {
    color: var(--primary);
}

/* Footer social icons */
.footer-social {
    display: flex;
    gap: var(--gap-sm);
    margin-top: 14px;
    flex-wrap: wrap;
}

.footer-social__link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.65);
    transition: background-color var(--transition), color var(--transition);
    text-decoration: none;
}

.footer-social__link:hover {
    background-color: var(--primary);
    color: var(--text-dark);
}

/* Footer bottom bar */
.footer-bottom {
    padding: 18px 0;
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.28);
    text-align: center;
}

.footer-bottom a {
    color: rgba(255,255,255,0.45);
    transition: color var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary);
}

.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}


/* =============================================================================
   17. COMPONENTS
   ============================================================================= */

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.pagination__controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination__link,
.pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.pagination__link:hover,
.pagination__page:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-dark);
}

/* Active page — yellow */
.pagination__page--current {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-dark);
}

.pagination__link--disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.pagination__link-text {
    display: none;
}

/* ---- Back to top — yellow circle ---- */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 42px;
    height: 42px;
    background-color: var(--primary);
    color: var(--text-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition),
                background-color var(--transition), transform var(--transition);
    z-index: 999;
    text-decoration: none;
    border-radius: 0;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    color: var(--text-dark);
}

/* ---- Search overlay — full-screen dark ---- */
.search-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(30,32,36,0.97);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 90%;
    max-width: 620px;
    position: relative;
}

.search-overlay__hint {
    text-align: center;
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.3);
    margin-top: 14px;
}

.search-close {
    position: absolute;
    top: -56px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 8px;
    font-size: 32px;
    line-height: 1;
    transition: color var(--transition);
    font-family: var(--font-main);
}

.search-close:hover {
    color: var(--primary);
}

.search-form-overlay {
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(255,255,255,0.25);
    gap: var(--gap-sm);
    transition: border-bottom-color var(--transition);
}

.search-form-overlay:focus-within {
    border-bottom-color: var(--primary);
}

.search-form-overlay input {
    flex: 1;
    background: none;
    border: none;
    padding: 16px 0;
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-light);
    outline: none;
}

.search-form-overlay input::placeholder {
    color: rgba(255,255,255,0.28);
}

.search-form-overlay button[type="submit"] {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    padding: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color var(--transition);
    flex-shrink: 0;
}

.search-form-overlay button[type="submit"]:hover {
    color: var(--primary);
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: var(--primary);
    color: var(--text-dark);
    padding: 11px 22px;
    font-size: var(--fs-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: transparent;
    color: var(--text-dark);
    padding: 11px 22px;
    font-size: var(--fs-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 2px solid var(--text-dark);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-secondary:hover {
    background-color: var(--text-dark);
    color: var(--text-light);
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--gap-xl);
}

/* ---- Notice boxes ---- */
.notice {
    padding: 14px 18px;
    font-size: var(--fs-sm);
    font-weight: 600;
    border-left: 4px solid;
    margin-bottom: 16px;
}

.notice--info    { background-color: rgba(0,119,181,0.08);    border-color: #0077b5;          color: #0077b5; }
.notice--success { background-color: rgba(37,211,102,0.08);   border-color: #25d366;          color: #1a9e4e; }
.notice--warning { background-color: rgba(255,204,0,0.12);    border-color: var(--primary);   color: var(--primary-hover); }

/* ---- Keyframes ---- */
@keyframes lm-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lm-slide-in {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.animate-fade-in { animation: lm-fade-in 0.4s ease both; }

/* ---- Print ---- */
@media print {
    .topbar,
    .site-header,
    .main-nav,
    .trending-section,
    .sidebar,
    .social-share,
    .related-articles,
    .site-footer,
    .back-to-top,
    .search-overlay,
    .nav-toggle,
    .breadcrumb-bar {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .article-content a::after {
        content: ' (' attr(href) ')';
        font-size: 10pt;
        color: #555;
    }

    .article-title {
        color: #000;
        font-size: 24pt;
    }
}


/* =============================================================================
   18. MEDIA QUERIES
   ============================================================================= */

/* ---- Large tablets / small desktops (1024px) ---- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-card--large {
        height: 380px;
    }

    .hero-grid__right {
        grid-template-rows: auto;
    }

    .hero-card--small {
        height: 200px;
    }

    .content-grid,
    .content-wrapper,
    .homepage-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gap-lg);
    }

    .widget {
        margin-bottom: 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-featured {
        flex-direction: column;
    }

    .category-featured__img {
        width: 100%;
        aspect-ratio: 16 / 7;
    }
}

/* ---- Tablets (768px) ---- */
@media (max-width: 768px) {
    :root {
        --fs-hero:  28px;
        --fs-3xl:   24px;
        --fs-2xl:   20px;
        --fs-xl:    18px;
        --gap-xl:   24px;
        --gap-2xl:  32px;
    }

    /* Topbar hidden on mobile */
    .topbar {
        display: none;
    }

    /* Hamburger shows */
    .nav-toggle {
        display: flex;
    }

    /* Nav menu collapses to drawer */
    .main-nav .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--secondary);
        flex-direction: column;
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 100;
        flex-wrap: nowrap;
        width: 100%;
    }

    .main-nav .nav-menu.nav-open {
        display: flex;
    }

    .main-nav .container {
        flex-wrap: wrap;
        position: relative;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > a {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .nav-item.active > a {
        border-bottom: 1px solid rgba(255,255,255,0.06);
        border-left: 3px solid var(--primary);
    }

    /* Dropdowns static on mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        background-color: rgba(0,0,0,0.3);
        min-width: unset;
        width: 100%;
    }

    .nav-item.has-dropdown:hover .dropdown-menu {
        display: none;
    }

    .nav-item.has-dropdown.open .dropdown-menu {
        display: block;
    }

    /* Hero */
    .hero-card--large { height: 300px; }
    .hero-card--small { height: 160px; }

    .hero-grid__right {
        grid-template-columns: 1fr 1fr;
    }

    .hero-card__title {
        font-size: var(--fs-lg);
    }

    /* Grids */
    .articles-grid,
    .latest-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Sidebar single column */
    .sidebar {
        grid-template-columns: 1fr;
    }

    /* Article */
    .article-title {
        font-size: var(--fs-2xl);
    }

    .article-content h2 {
        font-size: var(--fs-xl);
    }

    .article-content h3 {
        font-size: var(--fs-lg);
    }

    .article-content blockquote {
        padding: 16px 18px;
        font-size: var(--fs-base);
    }

    /* Author box */
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .author-box__link {
        justify-content: center;
    }

    /* Author profile */
    .author-profile__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-profile__meta {
        justify-content: center;
    }

    .author-social {
        justify-content: center;
    }

    /* Category */
    .category-title {
        font-size: 26px;
    }

    /* Share */
    .social-share__buttons {
        gap: var(--gap-xs);
    }

    .share-btn {
        padding: 8px 12px;
        font-size: 10px;
    }

    /* Static pages */
    .page-content {
        padding: 24px 20px;
    }

    .contact-page {
        padding: 28px 20px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom__inner {
        flex-direction: column;
        text-align: center;
    }

    /* Pagination */
    .pagination__link,
    .pagination__page {
        min-width: 32px;
        height: 32px;
        font-size: 11px;
    }

    /* Back to top */
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }

    /* Error page */
    .error-page__code  { font-size: 80px; }
    .error-page__title { font-size: var(--fs-2xl); }
}

/* ---- Small phones (576px) ---- */
@media (max-width: 576px) {
    :root {
        --fs-hero: 24px;
        --fs-3xl:  20px;
        --fs-2xl:  18px;
    }

    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    /* Hero: single card only */
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid__right {
        display: none;
    }

    .hero-card--large {
        height: 260px;
    }

    .hero-card__title {
        font-size: var(--fs-base);
    }

    .hero-card__excerpt {
        display: none;
    }

    /* Related: single column */
    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: var(--fs-xl);
    }

    .article-content pre {
        font-size: 11px;
        padding: 14px;
    }

    .featured-title {
        font-size: var(--fs-lg);
    }

    .category-featured__body {
        padding: 20px;
    }

    .category-featured__title {
        font-size: var(--fs-xl);
    }

    /* Share stack */
    .social-share__buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }

    /* Social stats 3 columns */
    .widget-social {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Error page */
    .error-page        { padding: 48px 16px; }
    .error-page__code  { font-size: 64px; }
}

/* ---- Very small phones (400px) ---- */
@media (max-width: 400px) {
    .widget-social {
        grid-template-columns: 1fr 1fr;
    }

    .pagination__link,
    .pagination__page {
        min-width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .hero-card--large {
        height: 220px;
    }
}

/* =============================================================================
   MISSING CLASSES: main-layout, tabs, dm-cards, widgets, popular, social
   ============================================================================= */

/* Main layout: content + sidebar */
.main-section {
    padding: var(--gap-xl) 0 60px;
}
.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap-xl);
    align-items: start;
}
.main-col {
    min-width: 0;
}

/* Section header with yellow left bar */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--gap-sm);
}
.section-line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* Tabs navigation */
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: var(--gap-lg);
    border-bottom: 2px solid var(--border-light);
}
.tab-btn {
    padding: 8px 16px;
    font-family: var(--font-main);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover {
    color: var(--text-dark);
}
.tab-btn--active,
.tab-btn.tab-btn--active {
    color: var(--text-dark);
    border-bottom-color: var(--primary);
}
.tab-panel {
    display: none;
}
.tab-panel--active {
    display: block;
}

/* Don't Miss grid */
.dont-miss-section {
    margin-bottom: var(--gap-2xl);
}
.dont-miss-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-lg);
}

/* DM Card */
.dm-card {
    background: var(--bg-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.dm-card:hover {
    box-shadow: var(--shadow-md);
}
.dm-card__img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 360/215;
}
.dm-card__img-wrap .cat-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
}
.dm-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.dm-card:hover .dm-card__img {
    transform: scale(1.04);
}
.dm-card__body {
    padding: 14px 16px 18px;
}
.dm-card__title {
    font-size: var(--fs-md);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}
.dm-card__title a:hover {
    color: var(--primary);
}
.dm-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--text-body);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dm-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-xs);
    color: var(--text-meta);
}
.dm-card__author {
    font-weight: 600;
    color: var(--text-dark);
}
.dm-card__author:hover {
    color: var(--primary);
}

/* Latest section */
.latest-section {
    margin-bottom: var(--gap-2xl);
}

/* Latest card (override for proper image display) */
.latest-card__img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 420/250;
}
.latest-card__img-wrap .cat-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
}
.latest-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.latest-card:hover .latest-card__img {
    transform: scale(1.04);
}
.latest-card__body {
    padding: 14px 0 10px;
}
.latest-card__title {
    font-size: var(--fs-md);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}
.latest-card__title a:hover {
    color: var(--primary);
}
.latest-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--text-body);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-xs);
    color: var(--text-meta);
}
.latest-card__author {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--text-dark);
}
.latest-card__author:hover {
    color: var(--primary);
}
.latest-card__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* Sidebar widgets */
.widget {
    background: var(--bg-white);
    padding: 20px;
    margin-bottom: var(--gap-lg);
    box-shadow: var(--shadow-sm);
}
.widget__header {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-md);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--gap-sm);
}
.widget__title {
    font-size: var(--fs-md);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}
.widget__line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* Social follow grid */
.social-follow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.social-follow-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    border-radius: 3px;
    color: #fff;
    text-decoration: none;
    transition: opacity var(--transition);
}
.social-follow-btn:hover {
    opacity: 0.85;
}
.social-follow-btn--fb { background: #3b5998; }
.social-follow-btn--tw { background: #1da1f2; }
.social-follow-btn--ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-follow-btn--yt { background: #ff0000; }
.social-follow-count {
    font-size: var(--fs-lg);
    font-weight: 800;
    line-height: 1;
}
.social-follow-label {
    font-size: var(--fs-xs);
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Popular list */
.popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: popular;
}
.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.popular-item:last-child {
    border-bottom: none;
}
.popular-item__num {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--border-light);
    line-height: 1;
    min-width: 28px;
    text-align: center;
}
.popular-item__thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 2px;
}
.popular-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.popular-item__content {
    flex: 1;
    min-width: 0;
}
.popular-item__cat {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}
.popular-item__title {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-title);
}
.popular-item__title:hover {
    color: var(--primary);
}

/* Newsletter widget */
.newsletter-icon {
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary);
}
.newsletter-text {
    font-size: var(--fs-sm);
    color: var(--text-body);
    text-align: center;
    line-height: 1.5;
    margin-bottom: var(--gap-md);
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    font-family: var(--font-main);
    font-size: var(--fs-sm);
    outline: none;
    transition: border-color var(--transition);
}
.newsletter-form input[type="email"]:focus {
    border-color: var(--primary);
}
.newsletter-form button[type="submit"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--primary);
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
}
.newsletter-form button[type="submit"]:hover {
    background: var(--primary-hover);
}

/* Categories widget */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.categories-list li {
    border-bottom: 1px solid var(--border-light);
}
.categories-list li:last-child {
    border-bottom: none;
}
.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-body);
    transition: color var(--transition);
}
.categories-list a:hover {
    color: var(--primary);
}
.category-count {
    background: var(--bg-body);
    color: var(--text-meta);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
}

/* Responsive: main layout */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .dont-miss-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .dont-miss-grid {
        grid-template-columns: 1fr;
    }
    .social-follow-grid {
        grid-template-columns: 1fr;
    }
}
