/* ============================================
   MeteoPolline.com - Stylesheet Principale
   La Guida Definitiva al Meteo Polline
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colori Primari - Palette Naturale */
    --color-primary: #2d6a4f;
    --color-primary-dark: #1b4332;
    --color-primary-light: #52b788;
    --color-primary-pale: #d8f3dc;
    
    /* Colori Secondari */
    --color-accent: #e9c46a;
    --color-accent-dark: #d4a843;
    --color-warm: #f4a261;
    --color-danger: #e76f51;
    
    /* Neutri */
    --color-bg: #fafaf8;
    --color-bg-alt: #f1f0eb;
    --color-surface: #ffffff;
    --color-border: #e0ddd5;
    --color-border-light: #eae8e1;
    --color-text: #2c2c2c;
    --color-text-secondary: #5a5a52;
    --color-text-muted: #8a8a80;
    
    /* Tipografia */
    --font-heading: 'Merriweather', 'Georgia', serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Dimensioni */
    --max-width: 1280px;
    --content-width: 820px;
    --sidebar-width: 340px;
    --gap: 40px;
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    
    /* Ombre */
    --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 8px 30px rgba(0,0,0,0.12);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.8;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary-dark); }

/* ============================================
   TOPBAR METEO
   ============================================ */
.topbar {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,.85);
    font-size: .8rem;
    padding: 6px 0;
    text-align: center;
    letter-spacing: .3px;
}
.topbar a { color: var(--color-accent); }
.topbar .pollen-ticker {
    display: inline-flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}
.topbar .pollen-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pollen-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.pollen-dot.low { background: #52b788; }
.pollen-dot.medium { background: #e9c46a; }
.pollen-dot.high { background: #f4a261; }
.pollen-dot.very-high { background: #e76f51; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}
.site-logo .logo-icon {
    font-size: 2rem;
    line-height: 1;
}
.site-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--color-primary-dark);
}
.site-logo .logo-sub {
    font-size: .7rem;
    color: var(--color-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-top: -2px;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-text);
    margin: 5px 0;
    border-radius: 2px;
    transition: .3s;
}

/* Nav Desktop */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2px;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--color-text-secondary);
    font-size: .88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all .2s;
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
    background: var(--color-primary-pale);
    color: var(--color-primary-dark);
}

/* ============================================
   MEGA-NAV (categorizzata)
   ============================================ */
.mega-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.mega-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}
.mega-nav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    transition: all .2s;
}
.mega-nav a:hover,
.mega-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ============================================
   HERO SECTION (Homepage)
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, #40916c 100%);
    color: #fff;
    padding: 80px 24px;
    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.05'%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: .5;
}
.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hero p {
    font-size: 1.15rem;
    opacity: .9;
    max-width: 650px;
    margin: 0 auto 30px;
    line-height: 1.7;
}
.hero-cta {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-cta a {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all .3s;
}
.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}
.btn-primary:hover {
    background: #fff;
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-outline {
    border: 2px solid rgba(255,255,255,.5);
    color: #fff;
}
.btn-outline:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: #fff;
}

/* ============================================
   LAYOUT CONTENUTO + SIDEBAR
   ============================================ */
.page-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--gap) 24px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap);
    align-items: start;
}
.page-wrapper.full-width {
    grid-template-columns: 1fr;
}

/* Impedisce overflow dei grid children su mobile */
.page-wrapper > main,
.page-wrapper > aside,
.page-wrapper > article,
.page-wrapper > section {
    min-width: 0;
    max-width: 100%;
}

/* ============================================
   ARTICOLO
   ============================================ */
.article-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 50px 55px;
    border: 1px solid var(--color-border-light);
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: hidden;
    max-width: 100%;
}

.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: .85rem;
    color: var(--color-text-muted);
}
.article-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-content h1 {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1.3;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 50px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary-pale);
    line-height: 1.35;
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 35px 0 15px;
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 25px 0 10px;
}

.article-content p {
    text-align: justify;
    margin-bottom: 18px;
    line-height: 1.85;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.article-content ul,
.article-content ol {
    margin: 15px 0 25px 20px;
    line-height: 1.8;
}
.article-content li {
    margin-bottom: 8px;
    padding-left: 5px;
}
.article-content li::marker {
    color: var(--color-primary);
}

.article-content strong {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.article-content blockquote {
    border-left: 4px solid var(--color-primary-light);
    background: var(--color-primary-pale);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--color-primary-dark);
}

/* Tabelle */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: .92rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
/* Wrapper per scroll orizzontale su mobile (applicato via JS o CSS) */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 25px 0;
}
.table-scroll-wrapper table {
    margin: 0;
}
.article-content thead {
    background: var(--color-primary);
    color: #fff;
}
.article-content th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.article-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border-light);
}
.article-content tbody tr:nth-child(even) {
    background: var(--color-bg);
}
.article-content tbody tr:hover {
    background: var(--color-primary-pale);
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc-container {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius);
    margin: 30px 0;
    overflow: hidden;
}
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
}
.toc-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-primary-dark);
}
.toc-toggle {
    font-size: .8rem;
    color: var(--color-text-muted);
    transition: transform .3s;
}
.toc-container.collapsed .toc-nav { display: none; }
.toc-container.collapsed .toc-toggle { transform: rotate(-90deg); }

.toc-nav {
    padding: 0 20px 16px;
}
.toc-nav ol {
    list-style: none;
    counter-reset: toc;
    margin: 0;
    padding: 0;
}
.toc-nav li {
    counter-increment: toc;
    margin: 0;
    padding: 0;
}
.toc-nav li a {
    display: block;
    padding: 6px 0 6px 0;
    color: var(--color-text-secondary);
    font-size: .9rem;
    border-bottom: 1px solid var(--color-border-light);
    transition: all .2s;
}
.toc-nav li a::before {
    content: counter(toc) ". ";
    font-weight: 600;
    color: var(--color-primary);
}
.toc-nav li a:hover {
    color: var(--color-primary);
    padding-left: 8px;
}
.toc-nav li.toc-sub a {
    padding-left: 24px;
    font-size: .85rem;
}
.toc-nav li.toc-sub a::before {
    content: "→ ";
}

/* ============================================
   INFO BOXES
   ============================================ */
.info-box {
    padding: 20px 24px;
    border-radius: var(--radius);
    margin: 25px 0;
    border-left: 4px solid;
    line-height: 1.7;
}
.info-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}
.info-box p { margin: 0; text-align: left; }

.info-box-info {
    background: #e8f4fd;
    border-color: #2196F3;
    color: #1565C0;
}
.info-box-warning {
    background: #fff8e1;
    border-color: #ff9800;
    color: #e65100;
}
.info-box-tip {
    background: #e8f5e9;
    border-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}
.info-box-important {
    background: #fce4ec;
    border-color: #e53935;
    color: #b71c1c;
}
.info-box-success {
    background: #e0f2f1;
    border-color: #00897b;
    color: #004d40;
}

/* ============================================
   FAQ
   ============================================ */
.faq-section { margin: 40px 0; }
.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--color-surface);
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    transition: background .2s;
}
.faq-question:hover { background: var(--color-bg); }
.faq-icon {
    font-size: 1.3rem;
    color: var(--color-primary);
    transition: transform .3s;
    flex-shrink: 0;
    margin-left: 15px;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .3s;
    padding: 0 22px;
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 22px 20px;
}
.faq-answer p {
    color: var(--color-text-secondary);
    line-height: 1.75;
    text-align: justify;
}

/* ============================================
   AFFILIATE BOX
   ============================================ */
.affiliate-box {
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-lg);
    margin: 30px 0;
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    transition: transform .2s, box-shadow .2s;
}
.affiliate-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.affiliate-badge {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    text-align: center;
}
.affiliate-content {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.affiliate-info { flex: 1; min-width: 200px; }
.affiliate-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--color-text);
}
.affiliate-desc {
    font-size: .9rem;
    color: var(--color-text-secondary);
    margin: 0 0 8px;
}
.affiliate-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}
.affiliate-btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff !important;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: .95rem;
    text-align: center;
    transition: all .3s;
    white-space: nowrap;
}
.affiliate-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   ADSENSE CONTAINERS
   ============================================ */
.ad-container {
    margin: 30px 0;
    text-align: center;
    min-height: 90px;
    background: var(--color-bg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--color-border);
}
.ad-label {
    display: block;
    font-size: .65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.ad-sidebar {
    margin: 20px 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary-pale);
}

/* Widget Indice Pollinico */
.pollen-index-widget .pollen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pollen-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}
.pollen-card .pollen-name {
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}
.pollen-card .pollen-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--color-border-light);
    overflow: hidden;
    margin-top: 6px;
}
.pollen-card .pollen-bar-fill {
    height: 100%;
    border-radius: 3px;
}
.pollen-card .pollen-value {
    font-size: .75rem;
    font-weight: 600;
    margin-top: 4px;
}

/* Widget Articoli Correlati */
.related-links { list-style: none; padding: 0; margin: 0; }
.related-links li {
    margin: 0;
    padding: 0;
}
.related-links a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: .9rem;
    color: var(--color-text-secondary);
    transition: all .2s;
}
.related-links a:hover {
    color: var(--color-primary);
    padding-left: 6px;
}
.related-links li:last-child a { border-bottom: none; }

/* ============================================
   NEWSLETTER CTA
   ============================================ */
.cta-newsletter {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    padding: 35px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 40px 0;
}
.cta-icon { font-size: 2.2rem; margin-bottom: 10px; }
.cta-newsletter h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #fff;
    border: none;
    padding: 0;
}
.cta-newsletter p {
    font-size: .92rem;
    opacity: .9;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
}
.cta-form {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto;
}
.cta-form input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 50px;
    font-size: .92rem;
    font-family: var(--font-body);
    outline: none;
}
.cta-form button {
    padding: 12px 24px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    font-family: var(--font-body);
}
.cta-form button:hover {
    background: #fff;
    transform: translateY(-1px);
}
.cta-newsletter small {
    display: block;
    margin-top: 12px;
    font-size: .75rem;
    opacity: .7;
}

/* ============================================
   CARDS GRID (Homepage)
   ============================================ */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-primary-dark);
    text-align: center;
    margin: 50px 0 10px;
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 30px 0;
}
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .3s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary-light);
}
.card-icon {
    background: var(--color-primary-pale);
    padding: 20px;
    text-align: center;
    font-size: 2.5rem;
}
.card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
    line-height: 1.35;
}
.card-body p {
    font-size: .9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    flex: 1;
    text-align: justify;
}
.card-link {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-primary);
}
.card-link:hover { color: var(--color-primary-dark); }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
}
.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: .82rem;
    margin: 0;
    padding: 0;
}
.breadcrumb li::after {
    content: '›';
    margin-left: 8px;
    color: var(--color-text-muted);
}
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .current { color: var(--color-text-secondary); font-weight: 500; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,.75);
    margin-top: 60px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 50px 24px 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    font-family: var(--font-heading);
    font-size: .95rem;
    margin-bottom: 16px;
}
.footer-col p {
    font-size: .88rem;
    line-height: 1.7;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: rgba(255,255,255,.65);
    font-size: .88rem;
    transition: color .2s;
}
.footer-col a:hover { color: var(--color-accent); }

.footer-disclaimer {
    font-size: .78rem;
    line-height: 1.7;
    color: rgba(255,255,255,.4);
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 25px;
    margin-top: 10px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    font-size: .82rem;
}

/* ============================================
   POLLEN CALENDAR TABLE
   ============================================ */
.pollen-calendar {
    overflow-x: auto;
    margin: 30px 0;
}
.pollen-calendar table {
    min-width: 900px;
}
.pollen-calendar .month-cell {
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    padding: 10px 6px;
}
.pollen-calendar .level-none { background: transparent; }
.pollen-calendar .level-low { background: #d8f3dc; color: #1b4332; }
.pollen-calendar .level-medium { background: #ffeaa7; color: #6c5c12; }
.pollen-calendar .level-high { background: #fdc89e; color: #7c3a0e; }
.pollen-calendar .level-very-high { background: #f8a5a5; color: #7c0e0e; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        padding: var(--gap) 20px;
    }
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    /* Tabelle: il wrapper JS gestisce lo scroll */
    .table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 768px) {
    html { font-size: 16px; }
    
    /* Topbar: scroll orizzontale */
    .topbar { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .topbar .pollen-ticker { justify-content: flex-start; padding: 0 16px; gap: 12px; flex-wrap: nowrap; }
    
    /* Mega-nav: nascosta su mobile */
    .mega-nav { display: none; }
    
    /* Header */
    .header-inner { height: 60px; padding: 0 16px; }
    .site-logo .logo-text { font-size: 1.1rem; }
    .site-logo .logo-sub { display: none; }
    .site-logo .logo-icon { font-size: 1.6rem; }
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
        padding: 15px;
        z-index: 999;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { padding: 12px 16px; }
    
    /* Layout generale */
    .page-wrapper { padding: 20px 16px; gap: 24px; }
    .page-wrapper.full-width { padding: 20px 16px; }
    
    /* Hero */
    .hero { padding: 40px 18px; }
    .hero h1 { font-size: 1.55rem; }
    .hero p { font-size: .95rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta a { padding: 12px 24px; font-size: .9rem; width: 100%; text-align: center; }
    
    /* Articoli */
    .article-content { padding: 22px 18px; border-radius: var(--radius); }
    .article-content h1 { font-size: 1.45rem; }
    .article-content h2 { font-size: 1.2rem; margin-top: 35px; }
    .article-content h3 { font-size: 1.05rem; }
    .article-meta { flex-direction: column; gap: 6px; font-size: .8rem; }
    
    /* Tabelle: il JS wrappa automaticamente in .table-scroll-wrapper */
    .table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px -18px; padding: 0 18px; }
    .article-content table { font-size: .82rem; margin: 0; }
    .article-content th, .article-content td { padding: 10px 12px; font-size: .82rem; }
    .article-content thead { white-space: nowrap; }
    
    /* Sidebar */
    .sidebar { grid-template-columns: 1fr; }
    
    /* Footer */
    .footer-inner { padding: 35px 16px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-disclaimer { font-size: .72rem; }
    
    /* Affiliate */
    .affiliate-content { flex-direction: column; text-align: center; }
    .affiliate-btn { width: 100%; }
    .affiliate-price { font-size: 1.1rem; }
    
    /* Newsletter CTA */
    .cta-form { flex-direction: column; }
    .cta-newsletter { padding: 28px 20px; }
    .cta-newsletter h3 { font-size: 1.1rem; }
    
    /* Cards */
    .cards-grid { grid-template-columns: 1fr; gap: 16px; }
    .card-icon { padding: 14px; font-size: 2rem; }
    .card-body { padding: 18px; }
    
    /* TOC */
    .toc-container { margin: 20px 0; }
    .toc-nav li a { font-size: .85rem; }
    
    /* FAQ */
    .faq-question { padding: 14px 16px; font-size: .92rem; }
    .faq-answer { padding: 0 16px; }
    .faq-item.open .faq-answer { padding: 0 16px 16px; }
    
    /* Info box */
    .info-box { padding: 16px 18px; }
    
    /* Breadcrumb */
    .breadcrumb { padding: 10px 16px; }
    .breadcrumb ol { font-size: .78rem; }
    
    /* Section titles */
    .section-title { font-size: 1.4rem; }
    .section-subtitle { font-size: .92rem; }
    
    /* Pollen calendar table */
    .pollen-calendar table { min-width: 700px; }
    
    /* Ad containers */
    .ad-container { margin: 20px 0; min-height: 60px; }
    
    /* Forms: full width su mobile */
    input[type="text"], input[type="email"], select, textarea {
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* ============================================
   VERY SMALL SCREENS (< 400px)
   ============================================ */
@media (max-width: 400px) {
    .page-wrapper { padding: 16px 12px; }
    .page-wrapper.full-width { padding: 16px 12px; }
    .article-content { padding: 18px 14px; }
    .article-content h1 { font-size: 1.3rem; }
    .article-content h2 { font-size: 1.1rem; }
    .hero h1 { font-size: 1.35rem; }
    .site-logo .logo-text { font-size: 1rem; }
    .header-inner { padding: 0 12px; }
    .footer-inner { padding: 25px 12px 16px; }
    .sidebar-widget { padding: 18px; }
    .affiliate-box .affiliate-content { padding: 16px; }
    .pollen-grid { grid-template-columns: 1fr; }
    #backToTop { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1rem; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .topbar, .site-header, .mega-nav, .sidebar,
    .ad-container, .affiliate-box, .cta-newsletter,
    .site-footer, .toc-container { display: none; }
    .page-wrapper { grid-template-columns: 1fr; }
    .article-content {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
