/* ============================================================
   InfoHub Frontend Styles — Modern Editorial Magazine
   ============================================================ */

:root {
    --primary: #1b1930;
    --primary-light: #2d2a54;
    --accent: #ff5b5b;
    --accent-dark: #e94444;
    --accent-2: #8b7bff;
    --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--bg));
    --accent-bright: color-mix(in srgb, var(--accent), white 34%);
    --navy-2: #2d2a54;
    --navy: #211f3d;
    /* Indigo-tinted neutrals */
    --bg: #fbfbfe;
    --surface: #f3f3fa;
    --card-bg: #ffffff;
    --text: #1b1930;
    --text-muted: #6b6a85;
    --border: #e7e6f2;
    /* Google multi-accent system (also driven per-category by color_hex) */
    --g-blue: #4285f4;
    --g-red: #ea4335;
    --g-yellow: #fbbc05;
    --g-green: #34a853;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-accent: 'Space Grotesk', sans-serif;
    --transition: 0.2s ease;
    /* Material elevation (Google uses #3c4043-tinted shadows) */
    --shadow-sm: 0 1px 2px rgba(60,64,67,0.10), 0 1px 3px rgba(60,64,67,0.08);
    --shadow-md: 0 1px 3px rgba(60,64,67,0.12), 0 6px 16px rgba(60,64,67,0.14);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
}

[data-theme="dark"] {
    --primary: #ffffff;
    --primary-light: #1a1830;
    --bg: #100f1a;
    --surface: #181726;
    --card-bg: #1d1c2e;
    --text: #edecf7;
    --text-muted: #9c9bb5;
    --border: #2b2940;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-logo:hover { text-decoration: none; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 6px 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-link:hover { background: rgba(233,69,96,0.08); color: var(--accent); text-decoration: none; }

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    padding-top: 16px;
    z-index: 100;
    margin-top: 0;
}

/* Invisible bridge fills the gap so hover isn't lost moving from trigger to menu */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 16px;
    background: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 14px;
    transition: background var(--transition);
    text-decoration: none;
}

.dropdown-item:hover { background: var(--bg); color: var(--accent); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 4px; }

.nav-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.nav-icon-btn:hover { background: rgba(233,69,96,0.1); color: var(--accent); }

.nav-mobile-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    margin-left: auto;
}

/* Search Bar */
.nav-search-bar {
    display: none;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 12px 0;
}

.nav-search-bar.open { display: block; }

.nav-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 700px;
    margin: 0 auto;
}

.nav-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    font-family: var(--font-body);
}

.nav-search-input:focus { border-color: var(--accent); }

.nav-search-btn, .nav-search-close {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition);
}

.nav-search-btn { background: var(--accent); color: #fff; }
.nav-search-close { background: var(--bg); color: var(--text-muted); }

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    min-height: 88vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    animation: gradientShift 12s ease infinite;
    background-size: 300% 300%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating shapes */
.hero-section::before, .hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    animation: float 8s ease-in-out infinite;
}

.hero-section::before {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
}

.hero-section::after {
    width: 400px;
    height: 400px;
    background: #4361ee;
    bottom: -150px;
    left: -100px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 2;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(233,69,96,0.2);
    border: 1px solid rgba(233,69,96,0.4);
    color: #ff8fa3;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 800px;
}

.hero-title span { color: var(--accent); }

.hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--transition);
    border: 2px solid var(--accent);
}

.btn-hero-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; text-decoration: none; transform: translateY(-2px); }

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.4);
    transition: all var(--transition);
}

.btn-hero-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }

.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

.hero-avatars {
    display: flex;
}

.hero-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-left: -8px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.hero-avatars .hero-avatar:first-child { margin-left: 0; background: #4361ee; }
.hero-avatars .hero-avatar:nth-child(2) { background: #7209b7; }
.hero-avatars .hero-avatar:nth-child(3) { background: #06d6a0; }

/* ============================================================
   TRENDING TICKER
   ============================================================ */

.trending-ticker {
    background: var(--navy);
    padding: 12px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--accent);
    color: #fff;
    padding: 4px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 2;
}

.ticker-track {
    display: flex;
    animation: ticker 70s linear infinite;
    white-space: nowrap;
}

.ticker-track:hover { animation-play-state: paused; }

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

.ticker-item {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 0 32px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}

.ticker-item::after { content: '•'; color: rgba(255,255,255,0.3); }
.ticker-item:last-child::after { display: none; }
.ticker-item:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   SECTIONS
   ============================================================ */

.section-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.section { padding: 64px 0; }

.section-header { margin-bottom: 36px; }

.section-label {
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 20px;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; color: var(--text); }

.category-card::after {
    content: '→';
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 20px;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition);
}

.category-card:hover::after { opacity: 1; transform: translateX(0); }

.cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}

.cat-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.cat-count { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cat-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ============================================================
   ARTICLE CARDS
   ============================================================ */

.article-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
}

.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; color: inherit; }

.article-card-img {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    position: relative;
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card-img img { transform: scale(1.05); }

.article-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.article-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 10px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.article-meta i { font-size: 13px; }

/* Featured Article (large card) */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
}

.featured-main {
    grid-row: 1 / 3;
}

.featured-main .article-card-img { height: 380px; }
.featured-main .article-title { font-size: 26px; -webkit-line-clamp: 3; }

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================================
   NEWSLETTER BANNER
   ============================================================ */

.newsletter-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.wave-divider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.newsletter-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.newsletter-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.newsletter-content p {
    color: rgba(255,255,255,0.7);
    font-size: 17px;
    margin-bottom: 36px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 15px;
    outline: none;
    font-family: var(--font-body);
    transition: border-color var(--transition);
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.45); }
.newsletter-input:focus { border-color: var(--accent); }

.newsletter-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    font-family: var(--font-body);
}

.newsletter-btn:hover { background: var(--accent-dark); }
.newsletter-microcopy { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 8px; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.article-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

.article-main { min-width: 0; }

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-breadcrumb a { color: var(--accent); text-decoration: none; }
.article-breadcrumb i { font-size: 11px; }

.article-header { margin-bottom: 28px; }

.article-h1 {
    font-family: var(--font-heading);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 16px;
}

.article-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.article-info i { font-size: 14px; }

.article-featured-img {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
}

.article-featured-img img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

/* Article Typography */
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 14px;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 12px;
}

.article-content p { margin-bottom: 18px; }

.article-content ul, .article-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.article-content li { margin-bottom: 8px; }

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    background: rgba(233,69,96,0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
    margin: 24px 0;
    font-size: 18px;
}

.article-content img {
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; overflow-x: auto; display: block; }
.article-content th { background: var(--bg); padding: 12px; border: 1px solid var(--border); font-weight: 600; }
.article-content td { padding: 10px 12px; border: 1px solid var(--border); }
.article-content tr:nth-child(even) td { background: rgba(0,0,0,0.02); }

.article-content code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: var(--accent);
}

.article-content pre {
    background: var(--primary);
    color: #e8eaf0;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Share Buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 32px 0;
    flex-wrap: wrap;
}

.share-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
}

.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.twitter { background: #000; color: #fff; }
.share-btn.copy { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Tags */
.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.tag-pill {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition);
}

.tag-pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; background: rgba(233,69,96,0.05); }

/* Article Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 80px; }

.sidebar-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.sidebar-card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.sidebar-article {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition);
}

.sidebar-article:last-child { border-bottom: none; }
.sidebar-article:hover { background: var(--bg); text-decoration: none; color: inherit; }
.sidebar-article-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg); }
.sidebar-article-title { font-size: 13px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-article-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   CONTACT FORM
   ============================================================ */

.contact-page { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}

.topic-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.topic-btn i { font-size: 24px; color: var(--text-muted); transition: color var(--transition); }
.topic-btn:hover { border-color: var(--accent); background: rgba(233,69,96,0.04); }
.topic-btn:hover i, .topic-btn.active i { color: var(--accent); }
.topic-btn.active { border-color: var(--accent); background: rgba(233,69,96,0.08); color: var(--accent); }

.contact-form-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.contact-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition);
}

.contact-input:focus { border-color: var(--accent); background: var(--card-bg); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--primary-light);
    color: rgba(255,255,255,0.75);
    padding-top: 64px;
}

[data-theme="dark"] .site-footer { background: #0a0c14; }

.footer-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-desc { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.7; margin-bottom: 20px; }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 16px;
    transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: #fff; }

.footer-links h5 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color var(--transition);
}

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

.footer-contact h5 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 16px; }
.footer-contact p { font-size: 14px; color: rgba(255,255,255,0.55); margin-bottom: 10px; display: flex; align-items: flex-start; gap: 8px; }
.footer-contact p i { margin-top: 2px; flex-shrink: 0; }
.footer-contact a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color var(--transition); }
.footer-contact a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */

#backToTop {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233,69,96,0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 500;
}

#backToTop.visible { opacity: 1; transform: translateY(0); }
#backToTop:hover { background: var(--accent-dark); transform: translateY(-3px); }

/* ============================================================
   UTILITY / PAGES
   ============================================================ */

.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 60px 24px;
    text-align: center;
}

.page-hero h1 { font-family: var(--font-heading); font-size: 36px; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 17px; }

.content-page { max-width: 800px; margin: 60px auto; padding: 0 24px; }
.content-page h2 { font-family: var(--font-heading); font-size: 24px; margin: 32px 0 12px; color: var(--text); }
.content-page p, .content-page ul { color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }

/* Alert/Success boxes */
.alert-success {
    background: rgba(45,198,83,0.1);
    border: 1.5px solid #2dc653;
    color: #1a7a38;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

.alert-error {
    background: rgba(233,69,96,0.1);
    border: 1.5px solid var(--accent);
    color: #c73652;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.page-link {
    padding: 9px 15px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 404 */
.not-found { text-align: center; padding: 100px 24px; max-width: 600px; margin: 0 auto; }
.not-found h1 { font-family: var(--font-heading); font-size: 42px; margin: 24px 0 12px; }
.not-found p { color: var(--text-muted); font-size: 17px; margin-bottom: 32px; }
.not-found .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .category-grid { grid-template-columns: repeat(4, 1fr); }
    .article-layout { grid-template-columns: 1fr 300px; gap: 32px; }
}

@media (max-width: 992px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .featured-main { grid-row: auto; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .topic-grid { grid-template-columns: repeat(2, 1fr); }

    .nav-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-md);
    }
    .nav-menu.open { display: flex; z-index: 999; }
    .nav-mobile-toggle { display: flex; }
    .nav-dropdown-menu { position: static; box-shadow: none; border: none; background: var(--bg); border-radius: 8px; }
    .nav-dropdown:hover .nav-dropdown-menu { display: none; }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

@media (max-width: 768px) {
    .hero-section { min-height: 70vh; }
    .articles-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .contact-page { padding: 32px 16px; }
    .contact-form-card { padding: 24px; }
    .newsletter-form { flex-direction: column; }
}

@media (max-width: 576px) {
    .section { padding: 40px 0; }
    .category-grid { grid-template-columns: 1fr; }
    .topic-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout { padding: 24px 16px; }
    .featured-main .article-card-img { height: 240px; }
}

/* ============================================================
   ARTICLE PAGE — Header, Meta, Body
   ============================================================ */

.article-page-title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin: 12px 0 16px;
}

.article-page-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    font-style: italic;
}

.article-page-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #f72585);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meta-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.meta-stats span { display: flex; align-items: center; gap: 5px; }

.article-hero-img {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ============================================================
   ARTICLE — Tags & Share
   ============================================================ */

.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

.tag-pill {
    background: var(--surface, var(--bg));
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}

.tag-pill:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

.share-section {
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.share-btn-wa  { background: #25d366; color: #fff; }
.share-btn-fb  { background: #1877f2; color: #fff; }
.share-btn-tw  { background: #000; color: #fff; }
.share-btn-copy{ background: var(--surface, var(--bg)); border: 1px solid var(--border); color: var(--text); }
.share-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ============================================================
   ARTICLE — Author Bio
   ============================================================ */

.author-bio-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 32px;
}

.author-bio-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #4361ee);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-bio-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.author-bio-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   ARTICLE SIDEBAR
   ============================================================ */

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

.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    margin-bottom: 10px;
    outline: none;
    transition: border-color var(--transition);
}

.sidebar-input:focus { border-color: var(--accent); }

.related-articles { display: flex; flex-direction: column; gap: 14px; }

.related-article-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: opacity var(--transition);
}

.related-article-item:hover { opacity: 0.8; text-decoration: none; }

.related-thumb {
    width: 72px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-info { flex: 1; }

.related-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-cat-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    transition: color var(--transition);
}

.sidebar-cat-list a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   CONTACT PAGE LAYOUT
   ============================================================ */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.contact-form-wrap { min-width: 0; }
.contact-sidebar { min-width: 0; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

@media (max-width: 992px) {
    .contact-layout { grid-template-columns: 1fr; }
    .meta-stats { display: none; }
}

@media (max-width: 768px) {
    .article-page-meta { flex-direction: column; gap: 12px; }
    .author-bio-card { flex-direction: column; }
    .share-buttons { gap: 8px; }
    .share-btn { padding: 8px 12px; font-size: 12px; }
}

/* ============================================================
   HELP TOPICS GRID (Home page)
   ============================================================ */

.help-topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
    padding-bottom: 64px;
}

.help-topic-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.help-topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.help-topic-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--topic-bg, rgba(233,69,96,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
}

.help-topic-card:hover .help-topic-icon { transform: scale(1.12); }

.help-topic-icon i {
    font-size: 24px;
    color: var(--topic-color, var(--accent));
}

.help-topic-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.help-topic-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

.help-topic-btn {
    background: var(--btn-color, var(--accent));
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-block;
    transition: opacity 0.2s, transform 0.2s;
}

.help-topic-btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none !important; }

@media (max-width: 992px) {
    .help-topics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .help-topics-grid { grid-template-columns: 1fr; gap: 14px; }
    .help-topics-grid .help-topic-card { padding: 20px 16px; }
}

/* ============================================================
   IMAGE LOADING — Skeleton & Blur-up
   ============================================================ */

.article-card-img img {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.article-card-img img.loaded {
    opacity: 1;
}

.img-skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: opacity 0.3s;
}

.img-skeleton.hidden { opacity: 0; pointer-events: none; }

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for grid children */
.articles-grid .article-card:nth-child(2) { transition-delay: 0.08s; }
.articles-grid .article-card:nth-child(3) { transition-delay: 0.16s; }
.articles-grid .article-card:nth-child(4) { transition-delay: 0.06s; }
.articles-grid .article-card:nth-child(5) { transition-delay: 0.12s; }
.articles-grid .article-card:nth-child(6) { transition-delay: 0.18s; }
.category-grid .category-card:nth-child(2) { transition-delay: 0.06s; }
.category-grid .category-card:nth-child(3) { transition-delay: 0.12s; }
.category-grid .category-card:nth-child(4) { transition-delay: 0.18s; }
.category-grid .category-card:nth-child(5) { transition-delay: 0.10s; }
.category-grid .category-card:nth-child(6) { transition-delay: 0.15s; }
.help-topics-grid .help-topic-card:nth-child(2) { transition-delay: 0.1s; }
.help-topics-grid .help-topic-card:nth-child(3) { transition-delay: 0.2s; }
.help-topics-grid .help-topic-card:nth-child(4) { transition-delay: 0.3s; }

/* ============================================================
   DYNAMIC FEATURED GRID IMPROVEMENTS
   ============================================================ */

.featured-grid .article-card { position: relative; overflow: hidden; }

.featured-grid .article-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-grid .article-card:hover::after { opacity: 1; }

/* ============================================================
   SECTION ANIMATIONS
   ============================================================ */

.section-header { opacity: 0; transform: translateY(16px); transition: opacity 0.5s, transform 0.5s; }
.section-header.visible { opacity: 1; transform: none; }

/* ============================================================
   CATEGORY CARD DYNAMIC
   ============================================================ */

.category-card { position: relative; overflow: hidden; }

.category-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at 100% 0%, currentColor 0%, transparent 70%);
    opacity: 0.04;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    transform: scale(1);
}

.category-card:hover::before { opacity: 0.1; transform: scale(1.3); }

/* ============================================================
   TICKER PAUSE ON HOVER
   ============================================================ */

.trending-ticker:hover .ticker-track { animation-play-state: paused; }

/* ============================================================
   MOBILE NAV RESPONSIVE FIXES
   ============================================================ */

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .nav-menu.open {
        max-height: 80vh;
        overflow-y: auto;
        padding: 16px;
    }

    .nav-link { padding: 10px 16px; border-radius: 8px; }
    .nav-link:hover { background: var(--surface); }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--surface);
        border-radius: 8px;
        margin: 4px 0 4px 16px;
        padding: 8px;
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown.open > .nav-link { color: var(--accent); }
}

/* ============================================================
   FEATURED GRID RESPONSIVE FIXES
   ============================================================ */

@media (max-width: 1200px) {
    .featured-grid { grid-template-columns: 1.2fr 1fr; gap: 16px; }
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .featured-main {
        grid-row: auto;
        grid-column: auto;
    }

    .featured-main .article-card-img { height: 220px; }

    /* Side cards go full width horizontal */
    .featured-grid > a:not(.featured-main) {
        flex-direction: row !important;
    }

    .featured-grid > a:not(.featured-main) .article-card-img {
        width: 100px !important;
        min-height: 80px !important;
        height: auto !important;
    }

    .trending-ticker .ticker-item { font-size: 12px; padding: 0 16px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: clamp(22px, 7vw, 36px); }
    .hero-subtitle { font-size: 14px; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .btn-hero-primary, .btn-hero-outline { width: 100%; justify-content: center; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .section-container { padding-left: 16px; padding-right: 16px; }
    .article-card-img { height: 180px; }
    .newsletter-form { flex-direction: column; gap: 10px; }
    .newsletter-input, .newsletter-btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ABOUT / PRIVACY PAGE RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .about-grid, div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
    div[style*="grid-template-columns:220px 1fr"] { grid-template-columns: 1fr !important; }
    div[style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
    div[style*="grid-template-columns:repeat(2,1fr)"] { grid-template-columns: 1fr !important; }
    .contact-layout { grid-template-columns: 1fr !important; }
}

/* ============================================================
   SEARCH FORM RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
    .search-form-large div[style*="display:flex"] {
        flex-direction: column;
    }
    .search-form-large input, .search-form-large button {
        width: 100% !important;
    }
}

/* ============================================================
   HERO — Realistic Background Image
   ============================================================ */

.hero-section {
    min-height: 88vh;
    background:
        linear-gradient(135deg, rgba(15,15,35,0.85) 0%, rgba(20,30,55,0.78) 60%, rgba(10,40,80,0.88) 100%),
        url('../img/hero-bg.jpg') center / cover no-repeat fixed;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    animation: none;
}

/* Keep the floating decorative circles */
.hero-section::before {
    width: 500px; height: 500px;
    background: var(--accent);
    top: -180px; right: -80px;
    opacity: 0.08;
}
.hero-section::after {
    width: 350px; height: 350px;
    background: #4361ee;
    bottom: -130px; left: -80px;
    opacity: 0.06;
    animation-delay: -4s;
}

/* ============================================================
   FORM CONTROL (shared across contact, subscribe forms)
   ============================================================ */

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    display: block;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.12);
    background: var(--card-bg);
}

.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }

textarea.form-control { resize: vertical; min-height: 120px; }

/* ============================================================
   TOPIC BUTTONS — enhanced active state
   ============================================================ */

.topic-btn.active {
    border-color: var(--topic-color, var(--accent));
    background: color-mix(in srgb, var(--topic-color, var(--accent)) 10%, transparent);
    color: var(--topic-color, var(--accent));
}

.topic-btn.active i {
    color: var(--topic-color, var(--accent)) !important;
}

.topic-btn:hover {
    border-color: var(--topic-color, var(--accent));
    background: color-mix(in srgb, var(--topic-color, var(--accent)) 6%, transparent);
}

/* ============================================================
   STATS COUNTER SECTION
   ============================================================ */

.stats-section {
    background: linear-gradient(135deg, var(--navy) 0%, #16213e 50%, #0f3460 100%);
    padding: 64px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,69,96,0.12) 0%, transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none;
}

.stats-section::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67,97,238,0.12) 0%, transparent 70%);
    bottom: -80px; left: -60px;
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.09);
}

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(233,69,96,0.2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon { transform: scale(1.1) rotate(5deg); }
.stat-card:nth-child(2) .stat-icon { background: rgba(67,97,238,0.2); color: #4361ee; }
.stat-card:nth-child(3) .stat-icon { background: rgba(6,214,160,0.2); color: #06d6a0; }
.stat-card:nth-child(4) .stat-icon { background: rgba(114,9,183,0.2); color: #7209b7; }

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.stat-divider {
    width: 32px; height: 2px;
    background: var(--accent);
    margin: 10px auto;
    border-radius: 2px;
}

@media (max-width: 992px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 480px)  { .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* ============================================================
   TESTIMONIALS SECTION
   ============================================================ */

.testimonials-section {
    padding: 80px 0;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '\201C';
    position: absolute;
    font-family: Georgia, serif;
    font-size: 320px;
    color: var(--accent);
    opacity: 0.04;
    top: -60px;
    left: 24px;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-family: Georgia, serif;
    font-size: 56px;
    color: var(--accent);
    opacity: 0.2;
    position: absolute;
    top: 16px; right: 24px;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    color: #f9c74f;
    font-size: 14px;
}

.testimonial-text {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.testimonial-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.testimonial-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.testimonial-location {
    font-size: 12px;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 4px;
}

@media (max-width: 992px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .testimonials-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ============================================================
   ARTICLE CONTENT — Improved Typography
   ============================================================ */

.article-content {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text);
    letter-spacing: 0.01em;
}

.article-content > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 4.2em;
    font-weight: 700;
    color: var(--accent);
    float: left;
    line-height: 0.78;
    margin: 6px 10px 0 0;
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 16px;
    padding-left: 18px;
    border-left: 4px solid var(--accent);
    line-height: 1.3;
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px;
}

.article-content h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 10px;
}

.article-content p { margin-bottom: 22px; }

.article-content ul, .article-content ol {
    padding-left: 28px;
    margin-bottom: 22px;
}

.article-content li { margin-bottom: 10px; line-height: 1.75; }

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    background: rgba(233,69,96,0.05);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--text);
    margin: 32px 0;
    font-size: 19px;
    line-height: 1.7;
    position: relative;
}

.article-content blockquote::before {
    content: '\201C';
    font-family: Georgia, serif;
    font-size: 64px;
    color: var(--accent);
    opacity: 0.3;
    position: absolute;
    top: -12px; left: 16px;
    line-height: 1;
}

.article-content strong { color: var(--text); font-weight: 700; }
.article-content a { color: var(--accent); text-decoration: underline; text-decoration-style: dotted; }
.article-content a:hover { text-decoration-style: solid; }

/* ============================================================
   ARTICLE — Pull Quote Highlight Box
   ============================================================ */

.article-content .highlight-box {
    background: linear-gradient(135deg, rgba(233,69,96,0.07), rgba(67,97,238,0.07));
    border: 1px solid rgba(233,69,96,0.2);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 28px 0;
    font-size: 16px;
}

/* ============================================================
   ARTICLE PAGE — Hero Image Improvements
   ============================================================ */

.article-hero-img img {
    width: 100%;
    border-radius: 12px;
    max-height: 500px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

/* ============================================================
   ANIMATED COUNTER — JS hook
   ============================================================ */

.stat-number[data-target] {
    transition: color 0.3s;
}

/* ============================================================
   CONTACT — form-control input group
   ============================================================ */

.contact-form-wrap .form-control { background: var(--bg); }
.contact-form-wrap .form-control:focus { background: var(--card-bg); }

/* ============================================================
   UI/UX POLISH LAYER  (ui-ux-pro-max — editorial / Swiss-modern)
   Additive refinements: accessibility, micro-interactions, polish.
   Uses existing tokens so it adapts to light & dark mode.
   ============================================================ */

/* --- Crisper text rendering --- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- Headings: balanced wrapping + no awkward orphans --- */
h1, h2, h3, .hero-title, .article-page-title, .section-title {
    text-wrap: balance;
    letter-spacing: -0.01em;
}
.article-content p, .hero-subtitle { text-wrap: pretty; }

/* --- Branded text selection --- */
::selection { background: var(--accent); color: #fff; }

/* --- Accessible keyboard focus (CRITICAL: was missing) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
.nav-link:focus-visible,
.btn-hero-primary:focus-visible,
.btn-hero-outline:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}
/* Don't show the ring for mouse users who click */
:focus:not(:focus-visible) { outline: none; }

/* --- Anchored headings clear the sticky nav --- */
:target, h2[id], h3[id], .article-content h2, .article-content h3 {
    scroll-margin-top: 88px;
}

/* --- Refined body links inside article content --- */
.article-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--transition), text-decoration-color var(--transition);
}
.article-content a:hover { text-decoration-color: var(--accent); color: var(--accent-dark); }

/* --- Article images: subtle framing for a premium editorial feel --- */
.article-content img {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* --- Tabular figures so meta/stats/numbers don't jitter --- */
.article-page-meta, .stat-number, .hero-social-proof, .views, .read-time {
    font-variant-numeric: tabular-nums;
}

/* --- Unified button press feedback (subtle, responsive) --- */
.btn-hero-primary, .btn-hero-outline, .btn-accent, .btn-outline,
button[type="submit"], .newsletter-btn, .subscribe-btn {
    transition: transform 0.12s ease, box-shadow var(--transition),
                background var(--transition), color var(--transition);
}
.btn-hero-primary:active, .btn-hero-outline:active, .btn-accent:active,
.btn-outline:active, button[type="submit"]:active,
.newsletter-btn:active, .subscribe-btn:active {
    transform: translateY(1px) scale(0.99);
}

/* --- Cursor affordance on interactive non-link elements --- */
button, [role="button"], summary, .nav-mobile-toggle,
.theme-toggle, .search-toggle, label[for] { cursor: pointer; }

/* --- Thin, branded scrollbar (modern editorial polish) --- */
* { scrollbar-width: thin; scrollbar-color: var(--text-muted) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Sticky nav: frosted glass when supported (graceful fallback) --- */
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .site-nav {
        background: color-mix(in srgb, var(--card-bg) 82%, transparent);
        -webkit-backdrop-filter: saturate(180%) blur(10px);
        backdrop-filter: saturate(180%) blur(10px);
    }
}

/* --- Slightly stronger muted text for AA/AAA contrast (light mode only) --- */
[data-theme="light"] { --text-muted: #586173; }

/* --- Reading-progress bar uses the brand gradient already; smooth it --- */
#readingProgress { will-change: width; }

/* --- Respect users who prefer reduced motion (CRITICAL: was missing) --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   GLOBAL MAKEOVER  (ui-ux-pro-max — Editorial Grid / Magazine)
   Elevates home, category & article pages via shared classes.
   Additive (cascades last); adapts to light & dark via tokens.
   ============================================================ */

:root {
    --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -8px rgba(16,24,40,.12);
    --shadow-hover: 0 2px 4px rgba(16,24,40,.05), 0 24px 48px -12px rgba(16,24,40,.22);
    --radius-lg: 18px;
    --ease-out: cubic-bezier(.22,.61,.36,1);
}
[data-theme="dark"] {
    --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -10px rgba(0,0,0,.55);
    --shadow-hover: 0 2px 6px rgba(0,0,0,.4), 0 28px 56px -14px rgba(0,0,0,.7);
}

/* ---------- Section rhythm & headers ---------- */
.section { padding: 72px 0; }
.section-header { margin-bottom: 36px; }
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}
.section-label::before {
    content: "";
    width: 22px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 10px;
    line-height: 1.15;
}

/* ---------- Article cards (home featured/latest + category) ---------- */
.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s var(--ease-out);
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    text-decoration: none;
}
/* Image zoom — scoped to grid + main feature so row cards stay intact */
.articles-grid .article-card-img,
.featured-main .article-card-img {
    aspect-ratio: 1200 / 630; /* match generated banner ratio so left-aligned text isn't cropped */
    height: auto;
    overflow: hidden;
    position: relative;
}
.articles-grid .article-card-img img,
.featured-main .article-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease-out);
}
.articles-grid .article-card:hover .article-card-img img,
.featured-main:hover .article-card-img img { transform: scale(1.06); }

.article-card-body { display: flex; flex-direction: column; flex: 1; gap: 4px; }
.article-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color .2s var(--ease-out);
}
.article-card:hover .article-title { color: var(--accent); }
.article-excerpt { color: var(--text-muted); }
.article-meta { margin-top: auto; padding-top: 12px; color: var(--text-muted); }

/* Refined category badge */
.article-cat-badge {
    align-self: flex-start;
    color: #fff;
    font-family: var(--font-accent);
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 12px -4px rgba(0,0,0,.35);
}

/* ---------- Category cards (homepage) ---------- */
.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); text-decoration: none; }
.cat-icon { transition: transform .35s var(--ease-out); }
.category-card:hover .cat-icon { transform: scale(1.1) rotate(-4deg); }
.cat-name { transition: color .2s var(--ease-out); }
.category-card:hover .cat-name { color: var(--accent); }

/* ---------- Hero ---------- */
.hero-title { font-size: clamp(34px, 6vw, 60px); letter-spacing: -0.03em; line-height: 1.05; }
.hero-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(6px);
    padding: 7px 16px; border-radius: 999px;
    font-family: var(--font-accent); font-size: 13px; letter-spacing: .04em;
}
.btn-hero-primary {
    background: linear-gradient(135deg, var(--accent), #f9456b);
    box-shadow: 0 12px 28px -10px rgba(233,69,96,.7);
    border: none;
    transition: transform .2s var(--ease-out), box-shadow .3s var(--ease-out), filter .2s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(233,69,96,.85); filter: brightness(1.05); text-decoration: none; }
.btn-hero-outline {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(6px);
    transition: transform .2s var(--ease-out), background .25s;
}
.btn-hero-outline:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); text-decoration: none; }
.hero-avatar { box-shadow: 0 0 0 2px var(--primary); }

/* ---------- Testimonial / help cards: unified depth ----------
   NOTE: .stat-card intentionally excluded — it sits on the dark navy stats
   band and keeps its translucent "glass" style (white text stays visible). */
.testimonial-card, .help-topic-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.testimonial-card:hover, .help-topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.page-link {
    min-width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text); font-weight: 600; font-size: 14px;
    transition: all .2s var(--ease-out);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.page-link.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(233,69,96,.6); }

/* ---------- Article detail: editorial typography ---------- */
.article-page-title { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.025em; line-height: 1.1; }
.article-content { max-width: 72ch; }
@media (min-width: 768px) {
    .article-content > p:first-of-type::first-letter {
        float: left;
        font-family: var(--font-heading);
        font-size: 4.4em;
        line-height: .82;
        font-weight: 800;
        padding: 6px 12px 0 0;
        color: var(--accent);
    }
}
.article-content blockquote {
    position: relative;
    border-left: 4px solid var(--accent);
    font-family: var(--font-heading);
    font-size: 20px;
    font-style: italic;
    color: var(--text);
}
.article-content blockquote::before {
    content: "\201C";
    position: absolute;
    top: -8px; left: 10px;
    font-family: Georgia, serif;
    font-size: 60px;
    color: color-mix(in srgb, var(--accent) 35%, transparent);
    pointer-events: none;
}

/* ---------- Trending ticker polish ---------- */
.ticker-item { transition: color .2s var(--ease-out); }
.ticker-item:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   HERO REDESIGN — premium animated gradient mesh (no stock photo)
   On-brand navy with accent/blue/teal aurora glows + dot grid.
   ============================================================ */
.hero-section {
    min-height: 92vh;
    background:
        radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 34px 34px,
        radial-gradient(900px 520px at 12% 15%, rgba(233,69,96,.30), transparent 60%),
        radial-gradient(820px 520px at 90% 8%,  rgba(67,97,238,.34), transparent 55%),
        radial-gradient(760px 640px at 78% 105%, rgba(6,214,160,.18), transparent 60%),
        linear-gradient(140deg, #131329 0%, #16213e 55%, #0e2f57 100%);
    background-attachment: scroll;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    animation: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
/* Soft fade into the page below */
.hero-section::after,
.hero-section::before { filter: blur(40px); }
.hero-section::before {
    width: 620px; height: 620px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: .5; top: -220px; right: -120px;
}
.hero-section::after {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #4361ee, transparent 70%);
    opacity: .45; bottom: -180px; left: -120px;
    animation-delay: -4s;
}
/* Stronger, more legible hero text on the rich background */
.hero-title { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero-title span {
    background: linear-gradient(120deg, #ff7a90, var(--accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--accent);
}
.hero-subtitle { color: rgba(255,255,255,.82); max-width: 600px; }
.hero-label {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    color: #ffd0d9;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
/* Subtle entrance for hero content */
.hero-content > * { animation: heroRise .8s var(--ease-out) both; }
.hero-content > *:nth-child(2) { animation-delay: .08s; }
.hero-content > *:nth-child(3) { animation-delay: .16s; }
.hero-content > *:nth-child(4) { animation-delay: .24s; }
.hero-content > *:nth-child(5) { animation-delay: .32s; }
@keyframes heroRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-content > * { animation: none; }
    .hero-section::before, .hero-section::after { animation: none; }
}

/* ============================================================
   AD SLOTS  (reserved space prevents Cumulative Layout Shift)
   ============================================================ */
.ad-slot {
    display: block;
    margin: 24px auto;
    text-align: center;
    overflow: hidden;
    max-width: 100%;
}
.ad-slot ins,
.ad-slot .adsbygoogle { display: block; }

/* Label above units so they never look like editorial content (policy-safe) */
.ad-in-article,
.ad-header,
.ad-footer { position: relative; }
.ad-in-article::before,
.ad-header::before,
.ad-footer::before {
    content: "Advertisement";
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    opacity: .7;
}

/* Header leaderboard: reserve height to avoid CLS on load */
.ad-header  { min-height: 90px; padding: 8px 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.ad-in-article { min-height: 250px; margin: 32px auto; }
.ad-footer  { min-height: 100px; padding: 16px 0; background: var(--surface); border-top: 1px solid var(--border); }

/* Sidebar ad sits inside the sticky sidebar column */
.sidebar-widget.ad-sidebar { min-height: 250px; padding: 12px; }

/* Sticky, dismissible mobile anchor ad */
.ad-mobile-anchor {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9998;
    display: none;                 /* shown only on mobile via media query */
    justify-content: center;
    align-items: center;
    min-height: 60px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.12);
    padding: 4px 0;
}
.ad-mobile-anchor .ad-slot { margin: 0; }
.ad-mobile-anchor-close {
    position: absolute;
    top: -24px; right: 8px;
    width: 24px; height: 24px;
    border: none;
    border-radius: 50% 50% 0 0;
    background: var(--card-bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 -2px 8px rgba(0,0,0,.12);
}
@media (max-width: 768px) {
    .ad-mobile-anchor { display: flex; }
    /* keep the back-to-top button clear of the anchor ad */
    #backToTop { bottom: 76px; }
}

/* ============================================================
   GOOGLE-MATERIAL REFINEMENT LAYER
   Clean neutrals, Material elevation, calm colorful accents.
   (Appended last so it wins on source order.)
   ============================================================ */

/* Global typography polish — geometric headings, tighter tracking */
h1, h2, h3, h4, h5,
.section-title, .article-title, .article-page-title,
.hero-title, .cat-name, .widget-title, .newsletter-content h2 {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

/* Section eyebrow + title: drop the heavy underline for Google calm */
.section-label {
    color: var(--text-muted);
    letter-spacing: 1.5px;
    font-weight: 600;
}
.section-title { padding-bottom: 0; }
.section-title::after { display: none; }

/* ---- Cards: Material elevation + soft border + lift on hover ---- */
.article-card,
.category-card,
.sidebar-widget,
.author-bio-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.article-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.category-card { border-left-width: 4px; }        /* keep the colorful category rail */
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-icon { border-radius: 14px; }

/* ---- Search: signature Google rounded pill ---- */
.nav-search-input {
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding-left: 20px;
    background: var(--card-bg);
    transition: box-shadow .2s ease, border-color .2s ease;
}
.nav-search-input:focus {
    border-color: transparent;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    outline: none;
}
.nav-search-btn, .nav-search-close { border-radius: var(--radius-pill); }

.search-form-large input {
    border-radius: var(--radius-pill) !important;
    padding: 16px 24px !important;
    border: 1px solid transparent !important;
    box-shadow: 0 1px 6px rgba(32,33,36,.18) !important;
    font-size: 16px !important;
}
.search-form-large input:focus {
    box-shadow: 0 1px 10px rgba(32,33,36,.32) !important;
    outline: none !important;
}
.search-form-large button {
    border-radius: var(--radius-pill) !important;
    box-shadow: var(--shadow-sm);
}

/* ---- Buttons: Material pills with elevation ---- */
.btn-hero-primary,
.newsletter-btn,
.btn-hero-outline {
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: .1px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-hero-primary { box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px rgba(60,64,67,.15); }
.btn-hero-primary:hover { box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15); transform: translateY(-1px); }

/* ---- Tag chips: Google-style grey chips ---- */
.tag-pill {
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-weight: 500;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.tag-pill:hover {
    background: #e8f0fe;                 /* Google blue-tint hover */
    color: var(--g-blue);
    border-color: transparent;
    box-shadow: none;
}

/* ---- Article detail: clean, readable "help article" feel ---- */
.article-page-subtitle { font-style: normal; color: var(--text-muted); }
.article-content { font-size: 17px; line-height: 1.85; color: var(--text); }
.article-content a {
    color: var(--g-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(66,133,244,.35);
}
.article-content a:hover { border-bottom-color: var(--g-blue); }
.article-content h2, .article-content h3 { color: var(--text); letter-spacing: -0.01em; }
.article-content blockquote {
    border-left: 4px solid var(--g-blue);
    background: var(--surface);
    border-radius: 0 12px 12px 0;
}
.widget-title { text-transform: none; letter-spacing: -0.01em; font-size: 16px; }

/* ---- Accessible focus ring (Google blue) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(66,133,244,.5);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .article-card, .category-card, .btn-hero-primary { transition: none; }
}

/* ============================================================
   Table of Contents (article pages)
   ============================================================ */
.toc-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 6px 20px 16px;
    margin: 0 0 32px;
}
.toc-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 0 10px;
    font-family: var(--font-heading, inherit);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.toc-title i.bi-list-ul { color: var(--accent); margin-right: 6px; }
.toc-chevron { font-size: 13px; color: var(--text-muted); transition: transform .25s ease; }
.toc-box.collapsed .toc-chevron { transform: rotate(180deg); }
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.toc-box.collapsed .toc-list { display: none; }
.toc-list li { margin: 0; }
.toc-list a {
    display: block;
    padding: 6px 0 6px 14px;
    border-left: 2px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color .15s ease, border-color .15s ease;
}
.toc-list a:hover { color: var(--accent); border-left-color: var(--accent); }
.toc-list li.toc-h3 a { padding-left: 30px; font-size: 13px; }
/* keep anchored headings clear of the sticky nav */
.article-content h2, .article-content h3 { scroll-margin-top: 90px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============================================================
   Editorial polish (2026 refresh) — fonts + card interactions
   ============================================================ */
/* Space Grotesk looks best with slightly tightened tracking on large display text */
.hero-title, .section-title, .article-page-title { letter-spacing: -0.02em; }
.article-title { letter-spacing: -0.01em; }

/* Subtle image zoom on card hover (contained so card shadow is unaffected) */
.article-card-img { overflow: hidden; }
.article-card-img img { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); will-change: transform; }
.article-card:hover .article-card-img img { transform: scale(1.06); }

/* Slightly crisper card lift on hover */
.article-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: reduce) {
    .article-card, .article-card-img img { transition: none; }
    .article-card:hover { transform: none; }
    .article-card:hover .article-card-img img { transform: none; }
}

/* ============================================================
   Homepage 2026 structure (split hero, popular, sections, AI spotlight)
   ============================================================ */
.hp-h1{font-family:var(--font-heading);font-weight:700;font-size:clamp(32px,4.6vw,50px);line-height:1.1;letter-spacing:-.02em;color:var(--text);}
.hp-h1 span{color:var(--accent);}
.hp-sub{color:var(--text-muted);font-size:17px;line-height:1.6;max-width:46ch;margin:16px 0 24px;}
.hp-hero-badge{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--accent);background:var(--accent-soft);padding:6px 12px;border-radius:999px;margin-bottom:16px;}
.hp-hero-grid{display:grid;grid-template-columns:1fr 1.12fr;gap:34px;align-items:stretch;}
@media(max-width:860px){.hp-hero-grid{grid-template-columns:1fr;}}
.hp-hero-copy{align-self:center;}

.hp-lead{position:relative;border-radius:var(--radius-lg);overflow:hidden;min-height:420px;box-shadow:var(--shadow-md);display:flex;flex-direction:column;justify-content:flex-end;}
.hp-lead img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .6s ease;}
.hp-lead:hover img{transform:scale(1.05);}
.hp-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,12,20,0) 28%,rgba(10,12,20,.55) 62%,rgba(10,12,20,.93));}
.hp-lead-body{position:relative;padding:28px;color:#fff;}
.hp-lead-body h2{color:#fff;font-size:25px;font-family:var(--font-heading);line-height:1.16;letter-spacing:-.01em;}
.hp-meta{display:flex;gap:16px;margin-top:14px;font-size:13px;color:rgba(255,255,255,.82);}
.hp-badge{display:inline-block;background:var(--accent);color:#fff;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:5px 11px;border-radius:999px;margin-bottom:14px;}
@media(max-width:860px){.hp-lead{min-height:320px;}}

.hp-chips{display:flex;flex-wrap:wrap;gap:10px;}
.hp-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:999px;border:1px solid var(--border);background:var(--card-bg);font-family:var(--font-heading);font-weight:600;font-size:13.5px;color:var(--text);transition:.18s;}
.hp-chip i{width:8px;height:8px;border-radius:50%;display:inline-block;}
.hp-chip:hover{transform:translateY(-2px);border-color:transparent;box-shadow:var(--shadow-md);text-decoration:none;}

.hp-two{display:grid;grid-template-columns:1.4fr 1fr;gap:30px;align-items:start;}
@media(max-width:820px){.hp-two{grid-template-columns:1fr;}}
.hp-big{position:relative;border-radius:var(--radius-lg);overflow:hidden;min-height:340px;display:flex;flex-direction:column;justify-content:flex-end;box-shadow:var(--shadow-sm);}
.hp-big img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .6s;}
.hp-big:hover img{transform:scale(1.05);}
.hp-big-body{position:relative;padding:26px;color:#fff;}
.hp-big-body h3{color:#fff;font-size:22px;margin-top:12px;font-family:var(--font-heading);line-height:1.2;}
.hp-rank{list-style:none;margin:0;padding:0;}
.hp-rank li{border-bottom:1px solid var(--border);}
.hp-rank li:last-child{border-bottom:none;}
.hp-rank a{display:flex;gap:16px;align-items:flex-start;padding:15px 4px;text-decoration:none;}
.hp-no{font-family:var(--font-heading);font-weight:700;font-size:22px;color:var(--border);width:32px;flex-shrink:0;transition:.18s;}
.hp-rank a:hover .hp-no{color:var(--accent);}
.hp-rank h4{font-size:15.5px;font-weight:600;color:var(--text);line-height:1.35;}
.hp-rank span{color:var(--text-muted);font-size:12.5px;}

.hp-show{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
@media(max-width:820px){.hp-show{grid-template-columns:1fr;}}
.hp-tile{position:relative;border-radius:var(--radius);overflow:hidden;min-height:210px;display:flex;align-items:flex-end;box-shadow:var(--shadow-sm);}
.hp-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .6s;}
.hp-tile:hover img{transform:scale(1.06);}
.hp-tile-body{position:relative;padding:20px;color:#fff;}
.hp-tile-body h3{color:#fff;font-size:19px;font-family:var(--font-heading);}
.hp-tile-body span{color:rgba(255,255,255,.8);font-size:12.5px;}

.hp-spot{background:linear-gradient(135deg,var(--navy),var(--navy-2));border-radius:var(--radius-lg);padding:40px;color:#fff;position:relative;overflow:hidden;}
.hp-spot::after{content:"";position:absolute;right:-80px;top:-80px;width:320px;height:320px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--accent) 50%,transparent),transparent 70%);}
.hp-spot .section-label{color:var(--accent-bright);}
.hp-spot h2{color:#fff;font-size:28px;margin:8px 0 22px;max-width:22ch;font-family:var(--font-heading);}
.hp-spot-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;position:relative;z-index:2;}
@media(max-width:820px){.hp-spot-grid{grid-template-columns:1fr;}.hp-spot{padding:28px;}}
.hp-spot-card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:18px;transition:.18s;display:block;text-decoration:none;}
.hp-spot-card:hover{background:rgba(255,255,255,.11);transform:translateY(-3px);text-decoration:none;}
.hp-k{font-family:var(--font-heading);font-size:12px;color:var(--accent-bright);font-weight:600;letter-spacing:.04em;}
.hp-spot-card h4{color:#fff;font-size:16px;margin:8px 0;font-family:var(--font-heading);line-height:1.3;}
.hp-spot-card span{color:rgba(255,255,255,.62);font-size:12.5px;}
