/* ============================================
   DIPENDENTI.IT - Stylesheet
   Design: Editorial / Magazine Style
   ============================================ */

:root {
    /* Colors */
    --primary: #1B4B8A;
    --primary-dark: #0F2E5A;
    --primary-light: #2E6BC6;
    --accent: #D4380D;
    --accent-light: #FF6B35;
    --green: #0A7B3E;
    --green-light: #E8F5EC;
    --bg: #F8F6F1;
    --bg-white: #FFFFFF;
    --bg-warm: #FDF9F3;
    --text: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #777777;
    --border: #E0DCD4;
    --border-light: #EDEBE6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    
    /* Typography */
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Sizes */
    --container: 1200px;
    --content-width: 780px;
    --sidebar-width: 340px;
    --radius: 8px;
    --radius-lg: 16px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link {
    position: absolute; top: -100px; left: 0; background: var(--primary);
    color: #fff; padding: 8px 16px; z-index: 10000;
}
.skip-link:focus { top: 0; }

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 10000; transition: width 0.1s linear; width: 0;
}

/* ============================================
   HEADER
   ============================================ */
.header-top {
    background: var(--primary-dark);
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
}
.header-top .container {
    display: flex; justify-content: space-between; align-items: center;
}
.header-badge {
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    padding: 2px 10px;
    border-radius: 20px;
}
.header-top-nav a {
    color: rgba(255,255,255,0.9); margin-left: 20px; font-size: 13px;
}
.header-top-nav a:hover { color: #fff; }

.header-main {
    background: var(--bg-white);
    border-bottom: 3px solid var(--primary);
    padding: 16px 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { font-size: 32px; }
.logo-name {
    font-family: var(--font-heading); font-size: 22px; font-weight: 900;
    color: var(--primary-dark); line-height: 1.2;
}
.logo-tagline {
    font-size: 11px; color: var(--text-muted); display: block;
    letter-spacing: 0.5px; text-transform: uppercase;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-dropdown > a {
    color: var(--text); font-weight: 600; font-size: 14px;
    padding: 8px 14px; border-radius: var(--radius);
    transition: background 0.2s;
}
.main-nav > a:hover, .nav-dropdown:hover > a {
    background: var(--bg); color: var(--primary);
}
.nav-dropdown { position: relative; }
.nav-arrow { font-size: 10px; opacity: 0.5; }
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 220px; padding: 8px 0; z-index: 100;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block; padding: 8px 20px; color: var(--text);
    font-size: 14px; font-weight: 500;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--primary); }

.mobile-menu-btn {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; padding: 8px;
}
.mobile-menu-btn span {
    display: block; width: 24px; height: 2px; background: var(--text);
    transition: 0.2s;
}

/* ============================================
   AD SLOTS - ALL FORMATS
   Ads collapse automatically when AdSense hasn't loaded
   ============================================ */
.ad-slot { text-align: center; padding: 0; }
.ad-slot ins { margin: 0 auto; }
/* Mostra padding solo quando AdSense ha riempito lo slot */
.ad-slot:has(ins[data-ad-status="filled"]) { padding: 16px 0; }
.ad-incontent {
    margin: 0; padding: 0;
    text-align: center;
}
.ad-incontent:has(ins[data-ad-status="filled"]) {
    margin: 32px -16px; padding: 16px;
    background: var(--bg); border-radius: var(--radius);
}
.ad-sidebar-slot {
    border-radius: var(--radius);
    padding: 0; margin-bottom: 0; text-align: center;
}
.ad-sidebar-slot:has(ins[data-ad-status="filled"]) {
    background: var(--bg); padding: 16px; margin-bottom: 24px;
    border: 1px solid var(--border-light);
}
.ad-between-sections { padding: 0; margin: 0; }
.ad-between-sections:has(ins[data-ad-status="filled"]) { padding: 20px 0; margin: 8px 0; }
.ad-between-paragraphs { margin: 0; padding: 0; background: transparent; }
.ad-between-paragraphs:has(ins[data-ad-status="filled"]) { margin: 28px 0; padding: 12px 0; }
.ad-after-content { margin: 0; }
.ad-after-content:has(ins[data-ad-status="filled"]) { margin-top: 32px; }
.ad-pre-affiliate { margin: 0; }
.ad-pre-affiliate:has(ins[data-ad-status="filled"]) { margin: 24px 0; }
.ad-pre-footer { margin: 0; }
.ad-pre-footer:has(ins[data-ad-status="filled"]) { margin: 16px 0; }
.ad-category-top { margin: 0; }
.ad-category-top:has(ins[data-ad-status="filled"]) { margin: 16px 0; }

/* Multiplex ad */
.ad-multiplex {
    margin: 0; padding: 0; text-align: center;
}
.ad-multiplex:has(ins[data-ad-status="filled"]) {
    margin: 40px 0; padding: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* Infeed ad (tra le card) - INVISIBILE quando vuoto */
.ad-infeed-card {
    display: none;
}
.ad-infeed-card:has(ins[data-ad-status="filled"]) {
    display: flex;
    background: var(--bg); border-radius: var(--radius-lg);
    padding: 24px; align-items: center; justify-content: center;
    min-height: 200px;
}

/* Sidebar sticky */
.sidebar-sticky-ad {
    position: sticky;
    top: 100px;
    margin-bottom: 24px;
}

/* ============================================
   HOMEPAGE - HERO
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1a5fa6 100%);
    color: #fff; padding: 72px 0 80px; text-align: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 {
    font-family: var(--font-heading); font-size: 42px; font-weight: 900;
    line-height: 1.25; margin-bottom: 20px;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 20px; opacity: 0.9; margin-bottom: 36px;
    line-height: 1.6; max-width: 650px; margin-left: auto; margin-right: auto;
}
.hero-stats {
    display: flex; justify-content: center; gap: 48px;
    margin-top: 40px; padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat-number {
    font-family: var(--font-heading); font-size: 36px;
    font-weight: 900; display: block;
}
.hero-stat-label {
    font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
    opacity: 0.75;
}
.hero-search {
    max-width: 520px; margin: 0 auto; display: flex;
    background: rgba(255,255,255,0.12); border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2); overflow: hidden;
}
.hero-search input {
    flex: 1; padding: 14px 24px; background: none; border: none;
    color: #fff; font-size: 16px; outline: none;
    font-family: var(--font-body);
}
.hero-search input::placeholder { color: rgba(255,255,255,0.5); }
.hero-search button {
    padding: 14px 28px; background: var(--accent);
    color: #fff; border: none; font-weight: 700; cursor: pointer;
    font-size: 15px; transition: background 0.2s;
}
.hero-search button:hover { background: var(--accent-light); }

/* ============================================
   HOMEPAGE - CATEGORIES GRID
   ============================================ */
.categories-section { padding: 64px 0; }
.section-title {
    font-family: var(--font-heading); font-size: 32px; font-weight: 900;
    text-align: center; margin-bottom: 12px; color: var(--primary-dark);
}
.section-subtitle {
    text-align: center; color: var(--text-muted); font-size: 18px;
    margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.categories-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.category-card {
    background: var(--bg-white); border-radius: var(--radius-lg);
    padding: 32px 28px; border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; color: var(--text);
    display: block; position: relative; overflow: hidden;
}
.category-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    color: var(--text);
}
.category-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
}
.category-card-icon { font-size: 40px; margin-bottom: 16px; display: block; }
.category-card-name {
    font-family: var(--font-heading); font-size: 20px; font-weight: 700;
    margin-bottom: 8px; color: var(--primary-dark);
}
.category-card-desc {
    font-size: 15px; color: var(--text-secondary); line-height: 1.6;
}
.category-card-count {
    display: inline-block; margin-top: 16px; font-size: 13px;
    font-weight: 700; color: var(--primary-light);
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* ============================================
   HOMEPAGE - FEATURED ARTICLES
   ============================================ */
.featured-section { padding: 64px 0; background: var(--bg-white); }
.articles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}
.article-card {
    background: var(--bg-white); border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; color: var(--text); display: flex; flex-direction: column;
}
.article-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text);
}
.article-card-badge {
    display: inline-block; padding: 4px 12px; font-size: 11px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    border-radius: 20px; color: #fff; margin-bottom: 12px;
}
.article-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.article-card-title {
    font-family: var(--font-heading); font-size: 20px; font-weight: 700;
    line-height: 1.35; margin-bottom: 12px; color: var(--primary-dark);
}
.article-card-excerpt {
    font-size: 15px; color: var(--text-secondary); line-height: 1.6;
    margin-bottom: 16px; flex: 1;
}
.article-card-meta {
    font-size: 13px; color: var(--text-muted);
    display: flex; gap: 16px; align-items: center;
    padding-top: 16px; border-top: 1px solid var(--border-light);
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; padding: 56px 0 64px;
}
.article-header .container { max-width: 900px; }
.article-category-badge {
    display: inline-block; padding: 6px 16px; font-size: 12px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 20px; background: rgba(255,255,255,0.15);
    margin-bottom: 20px;
}
.article-header h1 {
    font-family: var(--font-heading); font-size: 38px; font-weight: 900;
    line-height: 1.25; margin-bottom: 20px;
}
.article-header-meta {
    display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
    font-size: 15px; opacity: 0.85;
}
.article-header-meta span { display: flex; align-items: center; gap: 6px; }

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--content-width)) var(--sidebar-width);
    gap: 48px; padding: 48px 0;
    max-width: var(--container); margin: 0 auto; padding-left: 24px; padding-right: 24px;
}

/* Article Content - TESTI GIUSTIFICATI */
.article-content {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
}
.article-content h2 {
    font-family: var(--font-heading); font-size: 28px; font-weight: 700;
    color: var(--primary-dark); margin: 48px 0 20px;
    padding-bottom: 12px; border-bottom: 2px solid var(--primary);
    text-align: left;
}
.article-content h3 {
    font-family: var(--font-heading); font-size: 22px; font-weight: 700;
    color: var(--text); margin: 36px 0 16px;
    text-align: left;
}
.article-content h4 {
    font-family: var(--font-heading); font-size: 18px; font-weight: 700;
    color: var(--text-secondary); margin: 28px 0 12px;
    text-align: left;
}
.article-content p {
    margin-bottom: 20px; font-size: 17px; line-height: 1.8;
}
.article-content ul, .article-content ol {
    margin: 20px 0; padding-left: 28px;
}
.article-content li {
    margin-bottom: 10px; line-height: 1.7;
    text-align: left;
}
.article-content strong { color: var(--primary-dark); }
.article-content a {
    color: var(--primary-light); text-decoration: underline;
    text-decoration-color: rgba(46, 107, 198, 0.3);
    text-underline-offset: 3px;
}
.article-content a:hover { text-decoration-color: var(--primary-light); }

/* Info boxes */
.info-box {
    margin: 32px 0; padding: 24px 28px;
    border-radius: var(--radius); border-left: 5px solid;
    text-align: left;
}
.info-box.tip { background: #EFF6FF; border-color: var(--primary); }
.info-box.warning { background: #FFF7ED; border-color: var(--accent); }
.info-box.important { background: var(--green-light); border-color: var(--green); }
.info-box.example { background: #FAFAF9; border-color: var(--border); }
.info-box-title {
    font-family: var(--font-heading); font-weight: 700;
    font-size: 16px; margin-bottom: 8px;
}
.info-box p:last-child { margin-bottom: 0; }

/* Tables */
.article-content table {
    width: 100%; border-collapse: collapse; margin: 28px 0;
    font-size: 15px; text-align: left;
}
.article-content thead {
    background: var(--primary-dark); color: #fff;
}
.article-content th {
    padding: 12px 16px; font-weight: 700; text-align: left;
}
.article-content td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-light);
}
.article-content tbody tr:nth-child(even) { background: var(--bg); }
.article-content tbody tr:hover { background: #EFF6FF; }

/* Key takeaways */
.key-takeaways {
    background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-lg); padding: 32px;
    margin: 40px 0;
}
.key-takeaways h3 {
    font-family: var(--font-heading); color: var(--primary-dark);
    font-size: 20px; margin: 0 0 16px;
}
.key-takeaways ul { list-style: none; padding: 0; }
.key-takeaways li {
    padding: 8px 0 8px 28px; position: relative;
}
.key-takeaways li::before {
    content: '✓'; position: absolute; left: 0;
    color: var(--green); font-weight: 700;
}

/* Affiliate box */
.affiliate-box {
    background: var(--bg-warm); border: 2px solid var(--accent);
    border-radius: var(--radius-lg); padding: 28px;
    margin: 36px 0; text-align: center;
}
.affiliate-box-title {
    font-family: var(--font-heading); font-size: 20px;
    font-weight: 700; color: var(--accent); margin-bottom: 12px;
}
.affiliate-box p { margin-bottom: 16px; }
.affiliate-btn {
    display: inline-block; padding: 14px 32px;
    background: var(--accent); color: #fff;
    font-weight: 700; font-size: 16px;
    border-radius: 50px; text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
.affiliate-btn:hover {
    background: var(--accent-light); color: #fff;
    transform: translateY(-2px);
}
.affiliate-note {
    font-size: 12px; color: var(--text-muted);
    margin-top: 12px; font-style: italic;
}

/* FAQ Section */
.faq-section { margin: 48px 0; }
.faq-section h2 { text-align: left; }
.faq-item {
    border: 1px solid var(--border-light); border-radius: var(--radius);
    margin-bottom: 12px; overflow: hidden;
}
.faq-question {
    width: 100%; padding: 18px 24px; background: var(--bg-white);
    border: none; font-family: var(--font-body); font-size: 16px;
    font-weight: 600; color: var(--text); text-align: left;
    cursor: pointer; display: flex; justify-content: space-between;
    align-items: center;
}
.faq-question:hover { background: var(--bg); }
.faq-question::after { content: '+'; font-size: 24px; color: var(--primary); }
.faq-question.active::after { content: '−'; }
.faq-answer {
    padding: 0 24px; max-height: 0; overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
    text-align: justify;
}
.faq-answer.open { max-height: 500px; padding: 0 24px 20px; }

/* TOC */
.toc-box {
    background: var(--bg-warm); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px;
    margin: 32px 0;
}
.toc-title {
    font-family: var(--font-heading); font-size: 18px;
    font-weight: 700; margin-bottom: 16px; color: var(--primary-dark);
}
.toc-list {
    list-style: none; padding: 0; margin: 0;
    columns: 1;
}
.toc-list li { margin-bottom: 8px; }
.toc-list li a {
    color: var(--text-secondary); font-size: 15px;
    display: block; padding: 4px 0;
    border-bottom: 1px solid transparent;
}
.toc-list li a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.toc-list li.toc-sub { padding-left: 20px; }
.toc-list li.toc-sub a { font-size: 14px; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { position: sticky; top: 100px; }
.sidebar-widget {
    background: var(--bg-white); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 28px;
    margin-bottom: 24px;
}
.sidebar-widget-title {
    font-family: var(--font-heading); font-size: 18px; font-weight: 700;
    color: var(--primary-dark); margin-bottom: 16px;
    padding-bottom: 12px; border-bottom: 2px solid var(--primary);
}
.sidebar-article-list { list-style: none; padding: 0; }
.sidebar-article-list li {
    padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.sidebar-article-list li:last-child { border-bottom: none; }
.sidebar-article-list a {
    color: var(--text); font-size: 15px; font-weight: 600;
    display: block; line-height: 1.4;
}
.sidebar-article-list a:hover { color: var(--primary); }
.sidebar-article-list .meta {
    font-size: 12px; color: var(--text-muted); margin-top: 4px;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 64px 0; color: #fff;
}
.newsletter-box {
    display: flex; align-items: center; gap: 48px;
    max-width: 900px; margin: 0 auto;
}
.newsletter-content h3 {
    font-family: var(--font-heading); font-size: 26px; margin-bottom: 12px;
}
.newsletter-content p { opacity: 0.95; font-size: 16px; }
.newsletter-form-wrap { display: flex; gap: 12px; flex-shrink: 0; }
.newsletter-input {
    padding: 14px 20px; border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px; background: rgba(255,255,255,0.1);
    color: #fff; font-size: 15px; width: 260px;
    font-family: var(--font-body);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-input:focus { outline: none; border-color: rgba(255,255,255,0.6); }
.newsletter-btn {
    padding: 14px 28px; background: var(--accent);
    color: #fff; border: none; border-radius: 50px;
    font-weight: 700; font-size: 15px; cursor: pointer;
    transition: background 0.2s;
}
.newsletter-btn:hover { background: var(--accent-light); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #0C1E35; color: rgba(255,255,255,0.85);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px; margin-bottom: 48px;
}
.footer-logo {
    font-family: var(--font-heading); font-size: 22px;
    font-weight: 900; color: #fff; margin-bottom: 16px;
}
.footer-about p { font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.7; margin-bottom: 12px; }
.affiliate-disclaimer {
    font-size: 12px; padding: 12px; background: rgba(255,255,255,0.05);
    border-radius: var(--radius); border-left: 3px solid var(--accent);
}
.footer-col h4 {
    color: #fff; font-size: 15px; font-weight: 700;
    margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.8); font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px; font-size: 13px;
    display: flex; justify-content: space-between; align-items: start;
    gap: 24px;
}
.footer-legal { display: flex; gap: 20px; flex-shrink: 0; }
.footer-legal a { color: rgba(255,255,255,0.75); font-size: 13px; }
.footer-legal a:hover { color: #fff; }

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #1a1a1a; color: #fff; padding: 20px 0;
    z-index: 9999; box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-flex { display: flex; align-items: center; gap: 24px; }
.cookie-banner p { font-size: 14px; flex: 1; margin: 0; }
.cookie-btns { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-accept {
    padding: 10px 24px; background: var(--accent);
    color: #fff; border: none; border-radius: var(--radius);
    font-weight: 700; cursor: pointer;
}
.cookie-settings {
    padding: 10px 24px; background: transparent;
    color: #fff; border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius); cursor: pointer;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none;
    font-size: 20px; cursor: pointer; opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: var(--shadow-md); z-index: 999;
}
.back-to-top.visible { opacity: 1; }
.back-to-top:hover { transform: translateY(-3px); background: var(--primary-dark); }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    padding: 16px 0; font-size: 14px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; opacity: 0.4; }

/* ============================================
   CATEGORY PAGE
   ============================================ */
.category-header {
    background: var(--bg-white); padding: 48px 0;
    border-bottom: 1px solid var(--border);
}
.category-icon { font-size: 48px; margin-bottom: 16px; }
.category-header h1 {
    font-family: var(--font-heading); font-size: 36px; font-weight: 900;
    color: var(--primary-dark); margin-bottom: 12px;
}
.category-header p {
    font-size: 18px; color: var(--text-secondary);
    max-width: 700px; line-height: 1.7;
}
.category-articles { padding: 48px 0; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .section-title { font-size: 26px; }
    .article-header h1 { font-size: 28px; }
    .main-nav { 
        display: none; position: absolute; top: 100%;
        left: 0; right: 0; background: var(--bg-white);
        flex-direction: column; padding: 16px;
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { display: flex; }
    .mobile-menu-btn { display: flex; }
    .dropdown-menu { position: static; box-shadow: none; border: none; }
    .nav-dropdown:hover .dropdown-menu { display: none; }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .newsletter-box { flex-direction: column; text-align: center; }
    .newsletter-form-wrap { flex-direction: column; }
    .newsletter-input { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
    .cookie-flex { flex-direction: column; }
    .articles-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
    .article-content { font-size: 16px; }
    .article-content h2 { font-size: 24px; }
    .article-content h3 { font-size: 20px; }
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results { max-width: 800px; }
.search-result-item {
    display: block; padding: 24px; margin-bottom: 16px;
    background: var(--bg-white); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); text-decoration: none;
    color: var(--text); transition: transform 0.2s, box-shadow 0.2s;
}
.search-result-item:hover {
    transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text);
}
.search-result-title {
    font-family: var(--font-heading); font-size: 20px;
    font-weight: 700; color: var(--primary-dark); margin: 8px 0;
}
.search-result-snippet {
    font-size: 15px; color: var(--text-secondary); line-height: 1.6;
}
.search-result-snippet mark {
    background: #FEF3C7; color: var(--text); padding: 1px 4px;
    border-radius: 3px; font-weight: 600;
}
.ad-search-results { margin: 16px 0; max-width: 800px; }

/* ============================================
   CONTRAST FIXES - WCAG AA Compliance
   ============================================ */
/* Ensure all text on dark backgrounds meets 4.5:1 contrast ratio */
.header-top { color: rgba(255,255,255,0.95); }
.header-top-nav a { color: rgba(255,255,255,0.9); }
.header-top-nav a:hover { color: #fff; }
.header-badge { color: #fff; }

.hero-subtitle { opacity: 1; color: rgba(255,255,255,0.95); }
.hero-stat-label { opacity: 1; color: rgba(255,255,255,0.9); }
.hero-search input::placeholder { color: rgba(255,255,255,0.7); }

.article-header-meta { opacity: 1; color: rgba(255,255,255,0.9); }
.article-category-badge { color: #fff; background: rgba(255,255,255,0.2); }

.newsletter-content p { opacity: 1; color: rgba(255,255,255,0.95); }
.newsletter-input::placeholder { color: rgba(255,255,255,0.7); }

.site-footer { color: rgba(255,255,255,0.88); }
.footer-about p { color: rgba(255,255,255,0.85); }
.footer-col a { color: rgba(255,255,255,0.82); }
.footer-col a:hover { color: #fff; }
.footer-legal a { color: rgba(255,255,255,0.75); }
.footer-legal a:hover { color: #fff; }
.footer-bottom { color: rgba(255,255,255,0.8); }
.affiliate-disclaimer { color: rgba(255,255,255,0.82); }

.cookie-banner p { color: rgba(255,255,255,0.95); }

/* Ensure muted text is still readable on light backgrounds */
.article-card-meta { color: #555; }
.toc-list li a { color: #444; }
.info-box p { color: var(--text); }
.info-box .info-box-title { color: var(--text); }

/* Search result snippet readability */
.search-result-snippet { color: #444; }

/* Fix breadcrumb on article dark header */
.article-header .breadcrumb,
.article-header .breadcrumb a,
.article-header .breadcrumb span { color: rgba(255,255,255,0.9) !important; }

/* ============================================
   NAV ENHANCED DROPDOWNS
   ============================================ */
.dropdown-menu-wide { min-width: 200px; }
.dropdown-all {
    border-top: 1px solid var(--border-light) !important;
    margin-top: 4px; padding-top: 10px !important;
    font-weight: 700 !important; color: var(--primary) !important;
}
.nav-tools-btn {
    background: var(--accent) !important; color: #fff !important;
    border-radius: 50px !important; padding: 8px 18px !important;
    font-size: 13px !important;
}
.nav-tools-btn:hover { background: var(--accent-light) !important; }

/* ============================================
   LEGAL PAGES (Privacy, Cookie, Termini)
   ============================================ */
.legal-header {
    background: var(--bg-white); padding: 48px 0; border-bottom: 1px solid var(--border);
}
.legal-header h1 {
    font-family: var(--font-heading); font-size: 32px; font-weight: 900;
    color: var(--primary-dark); margin-bottom: 12px;
}
.legal-header p { font-size: 17px; color: var(--text-secondary); margin-bottom: 4px; }
.legal-update { font-size: 14px !important; color: var(--text-muted) !important; }
.legal-content { padding: 48px 0; }
.legal-content h2 {
    font-size: 22px; margin-top: 40px;
}
.legal-content h3 { font-size: 18px; margin-top: 28px; }
.legal-content table { font-size: 14px; margin: 16px 0; }
.legal-content table th { font-size: 13px; }

/* Anti-spam email link */
.email-protect { cursor: pointer; color: var(--primary-light); text-decoration: underline; }
.email-protect::after { content: '[caricamento...]'; }
.email-protect.decoded::after { content: none; }

/* ============================================
   SITEMAP PAGE
   ============================================ */
.sitemap-section { margin-bottom: 40px; }
.sitemap-section h2 {
    font-family: var(--font-heading); font-size: 22px; font-weight: 700;
    color: var(--primary-dark); margin-bottom: 8px;
    padding-bottom: 10px; border-bottom: 2px solid var(--primary);
}
.sitemap-cat-desc {
    font-size: 14px; color: var(--text-muted); margin-bottom: 12px;
}
.sitemap-links {
    display: flex; flex-direction: column; gap: 6px;
}
.sitemap-links a {
    display: block; padding: 8px 16px; font-size: 15px;
    color: var(--text); border-radius: var(--radius);
    transition: background 0.15s;
}
.sitemap-links a:hover { background: var(--bg); color: var(--primary); }
.sitemap-cat-link {
    font-weight: 700 !important; color: var(--primary) !important;
    margin-bottom: 4px;
}
