@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/**
 * Stile CSS Completo & Responsive IU6VSY (PHP Standalone & Live)
 * Header a 3 Livelli + Griglia Responsive + Sidebar + Articoli + Tipografia Prose WYSIWYG + Footer
 */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0f172a;
    --accent: #ea580c;
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --border-subtle: #e2e8f0;
    --sidebar-width: 340px;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body, body.php-site {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   HEADER A 3 LIVELLI & TEMI
   ========================================================================== */
#fixed-header {
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.header-theme-dark { background: #0b1329; color: #ffffff; }
.header-theme-navy { background: #0a192f; color: #ffffff; }
.header-theme-slate { background: #1e293b; color: #ffffff; }
.header-theme-ocean { background: #0c2340; color: #ffffff; }
.header-theme-black { background: #000000; color: #ffffff; }

.header-inner {
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Banner Avvisi Stazione */
.header-notice-strip {
    font-size: 0.78rem;
    padding: 6px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.notice-type-info { background: linear-gradient(90deg, #1e3a8a, #172554); color: #dbeafe; }
.notice-type-warning { background: linear-gradient(90deg, #78350f, #451a03); color: #fef3c7; }
.notice-type-success { background: linear-gradient(90deg, #064e3b, #022c22); color: #d1fae5; }
.notice-type-alert { background: linear-gradient(90deg, #7f1d1d, #450a0a); color: #fee2e2; }

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    display: inline-block;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* 1. Top Utility Bar */
.header-top-bar {
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 0;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-text {
    font-weight: 600;
    color: #F5F406;
    text-transform: capitalize;
}

.sep-dot {
    color: #475569;
}

.qth-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #94a3b8;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
}

.clock-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
}

.local-chip {
    background: #0f172a;
    color: #F5F406;
    border: 1px solid #334155;
}

.utc-chip {
    background: #172554;
    color: #51F90C;
    border: 1px solid #1e40af;
}

.chip-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: #F5F406;
}

.utc-label {
    color: #51F90C;
    font-weight: 800;
}

.admin-quick-link {
    color: #cbd5e1;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
}

.admin-quick-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

#mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* 2. Central Hero Brand */
.header-center-hero {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    text-align: center;
}

.header-center-hero .header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    margin: 0 auto;
    text-align: center;
}

.brand-logo-wrap {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3b82f6;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo-placeholder {
    font-size: 1.8rem;
    color: #60a5fa;
}

.brand-info-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
}

.brand-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
}

.brand-main-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    text-align: center;
}

.brand-desc-text {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* Nominativo Tricolore IU6VSY */
.callsign-tricolore {
    display: inline-flex;
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    padding: 2px 10px;
    background: #020617;
    border: 1px solid #334155;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.tricolore-green { color: #22c55e; }
.tricolore-white { color: #ffffff; }
.tricolore-red { color: #ef4444; }

.callsign-tricolore-sm {
    display: inline-flex;
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    background: #020617;
    border: 1px solid #334155;
    border-radius: 4px;
}

.brand-desc-text {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* 3. Horizontal Navigation Menu */
.header-nav-bar {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-align-left .nav-menu-list { justify-content: flex-start; }
.nav-align-center .nav-menu-list { justify-content: center; }
.nav-align-right .nav-menu-list { justify-content: flex-end; }

.nav-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-menu-item {
    position: relative;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.nav-menu-link:hover, .nav-menu-item:hover > .nav-menu-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 0.65rem;
    opacity: 0.7;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 6px 0;
    margin: 0;
    list-style: none;
    z-index: 1001;
}

.nav-menu-item:hover > .nav-dropdown-menu,
.nav-menu-item.touch-open > .nav-dropdown-menu {
    display: block;
}

.dropdown-sub-item {
    position: relative;
}

.dropdown-sub-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-sub-item > a:hover {
    background: #1e293b;
    color: #38bdf8;
    padding-left: 20px;
}

.nav-nested-dropdown-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 210px;
    background: #090e1a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 6px 0;
    margin: 0;
    list-style: none;
    z-index: 1002;
}

.dropdown-sub-item:hover > .nav-nested-dropdown-menu,
.dropdown-sub-item.touch-open > .nav-nested-dropdown-menu {
    display: block;
}

/* Spaziatore header */
.header-spacer {
    display: none;
}

/* ==========================================================================
   LAYOUT STRUTTURALE PRINCIPALE
   ========================================================================== */
.site-wrapper {
    flex: 1;
    width: 100%;
    background-color: #f1f5f9;
}

.main-layout-container, .main-container {
    max-width: 1720px;
    margin: 28px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 32px;
    width: 100%;
}

.content-area, .main-content-col {
    min-width: 0;
}

/* ==========================================================================
   FILTRI, BANNER & SEZIONE INTESTAZIONE
   ========================================================================== */
.filter-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px 22px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.filter-banner h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.btn-clear-filter {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    border: 1px solid #e2e8f0;
}

.btn-clear-filter:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.section-heading-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

.section-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    padding: 3px 12px;
    border-radius: 9999px;
}

.empty-state-box {
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-box i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state-box h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.empty-state-box p {
    font-size: 0.92rem;
    margin: 0 0 20px 0;
}

/* ==========================================================================
   HERO ARTICOLO IN EVIDENZA (.featured-hero-card)
   ========================================================================== */
.featured-hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    display: block;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 992px) {
    .featured-hero-card {
        display: block;
    }
}

.featured-hero-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.hero-image-wrap {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    background: #0f172a;
}

@media (min-width: 992px) {
    .hero-image-wrap {
        min-height: 360px;
    }
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-hero-card:hover .hero-image-wrap img {
    transform: scale(1.04);
}

.badge-featured {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #f59e0b;
    color: #020617;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.hero-content {
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.article-meta-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cat-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.meta-date, .meta-views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.hero-title {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.hero-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hero-title a:hover {
    color: var(--primary);
}

.hero-excerpt {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-footer {
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-author-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
    flex-shrink: 0;
}

.hero-author-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
}

/* ==========================================================================
   BARRA DEI FILTRI E CATEGORIE & CONTROLLI ORDINAMENTO / VISTA (MAIN)
   ========================================================================== */
.main-filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .main-filter-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cat-pills-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    width: 100%;
}

@media (min-width: 768px) {
    .cat-pills-wrap {
        width: auto;
        padding-bottom: 0;
    }
}

.cat-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.cat-filter-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cat-filter-btn.active {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.cat-filter-btn.active .cat-btn-count {
    color: rgba(255, 255, 255, 0.85);
}

.cat-filter-btn.active-cat {
    background: #0f172a;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.cat-filter-btn.active-cat .cat-btn-count {
    color: #94a3b8;
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.cat-btn-count {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 400;
}

.filter-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    align-self: flex-end;
}

@media (min-width: 768px) {
    .filter-controls-right {
        align-self: auto;
    }
}

.sort-select {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.sort-select:focus {
    border-color: #2563eb;
}

.view-mode-toggle {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.view-btn:hover {
    color: #0f172a;
}

.view-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.card-author-name {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
}

/* ==========================================================================
   VISTA LISTA ARTICOLI (COMPATIBILE MAINCONTENT REACT)
   ========================================================================== */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.articles-list .article-card {
    flex-direction: row;
    min-height: 180px;
}

.articles-list .card-cover {
    width: 240px;
    min-width: 240px;
    height: 100%;
}

@media (max-width: 640px) {
    .articles-list .article-card {
        flex-direction: column;
    }
    .articles-list .card-cover {
        width: 100%;
        min-width: 100%;
        height: 180px;
    }
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    color: #1e293b;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ==========================================================================
   GRIGLIA ARTICOLI & CARD COMPONENT (.article-card)
   ========================================================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.article-card {
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #cbd5e1;
}

.card-cover, .article-card-cover {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.cat-badge-overlay, .category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    z-index: 2;
}

.card-body, .article-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 10px;
}

.card-meta, .article-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-meta span, .article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-title, .article-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.01em;
}

.card-title a, .article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.card-title a:hover, .article-title a:hover {
    color: var(--primary);
}

.card-excerpt, .article-excerpt {
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-read-more {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: gap 0.15s ease;
}

.article-card:hover .card-read-more {
    gap: 7px;
}

.card-views {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Paginazione */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 36px 0;
    flex-wrap: wrap;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-num:hover {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: var(--border-color);
}

.page-num.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   VISTA ARTICOLO SINGOLO (.single-article-view)
   ========================================================================== */
.single-article-view {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.breadcrumb-trail a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s ease;
}

.breadcrumb-trail a:hover {
    color: var(--primary);
}

.breadcrumb-trail .sep {
    color: #cbd5e1;
}

.breadcrumb-trail .current {
    color: var(--text-main);
    font-weight: 700;
    max-width: 380px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.article-full-title {
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1.25;
    color: var(--text-main);
    margin: 12px 0 16px 0;
    letter-spacing: -0.02em;
}

.article-full-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-full-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-full-meta strong {
    color: var(--text-main);
}

.article-featured-image {
    margin: 24px 0 32px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    max-height: 520px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

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

.tag-pill {
    background: #f1f5f9;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.tag-pill:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary-hover);
}

.author-bio-box {
    margin-top: 32px;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.author-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.author-info p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Sezione Commenti */
.comments-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #f1f5f9;
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 22px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-title i {
    color: var(--primary);
}

.comment-form {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.comment-author {
    font-weight: 800;
    color: var(--text-main);
}

.comment-callsign {
    margin-left: 6px;
    padding: 2px 6px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.comment-body {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}

.no-comments {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 600;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ==========================================================================
   VISTA PAGINA SINGOLA (.single-page-view)
   ========================================================================== */
.single-page-view {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

.page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-title {
    font-size: 2.15rem;
    font-weight: 900;
    color: var(--text-main);
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.page-divider {
    height: 3px;
    width: 60px;
    background: var(--primary);
    border-radius: 2px;
}

/* ==========================================================================
   TIPOGRAFIA PROSE & CONTENUTI ARTICOLI / PAGINE / WYSIWYG
   ========================================================================== */
.article-body-content,
.page-body-content,
.prose,
.wysiwyg-visual-content,
.single-article-body,
.page-content-area {
    color: #334155;
    line-height: 1.8;
    font-size: 1.02rem;
    word-break: break-word;
}

.article-body-content h1, .page-body-content h1, .prose h1, .wysiwyg-visual-content h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.article-body-content h2, .page-body-content h2, .prose h2, .wysiwyg-visual-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 1.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: -0.01em;
}

.article-body-content h3, .page-body-content h3, .prose h3, .wysiwyg-visual-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-body-content h4, .page-body-content h4, .prose h4, .wysiwyg-visual-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.article-body-content p, .page-body-content p, .prose p, .wysiwyg-visual-content p {
    margin-top: 1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #334155;
}

.article-body-content strong, .article-body-content b,
.page-body-content strong, .page-body-content b,
.prose strong, .prose b, .wysiwyg-visual-content strong, .wysiwyg-visual-content b {
    font-weight: 700;
    color: var(--text-main);
}

.article-body-content em, .article-body-content i,
.page-body-content em, .page-body-content i,
.prose em, .prose i, .wysiwyg-visual-content em, .wysiwyg-visual-content i {
    font-style: italic;
}

.article-body-content u, .page-body-content u,
.prose u, .wysiwyg-visual-content u {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body-content s, .article-body-content strike,
.page-body-content s, .page-body-content strike,
.prose s, .prose strike, .wysiwyg-visual-content s, .wysiwyg-visual-content strike {
    text-decoration: line-through;
}

/* Specific font size styles for visual editor and public rendering */
.article-body-content font[size="1"], .page-body-content font[size="1"], .prose font[size="1"], .wysiwyg-visual-content font[size="1"] { font-size: 11px !important; }
.article-body-content font[size="2"], .page-body-content font[size="2"], .prose font[size="2"], .wysiwyg-visual-content font[size="2"] { font-size: 13px !important; }
.article-body-content font[size="3"], .page-body-content font[size="3"], .prose font[size="3"], .wysiwyg-visual-content font[size="3"] { font-size: 16px !important; }
.article-body-content font[size="4"], .page-body-content font[size="4"], .prose font[size="4"], .wysiwyg-visual-content font[size="4"] { font-size: 19px !important; }
.article-body-content font[size="5"], .page-body-content font[size="5"], .prose font[size="5"], .wysiwyg-visual-content font[size="5"] { font-size: 24px !important; }
.article-body-content font[size="6"], .page-body-content font[size="6"], .prose font[size="6"], .wysiwyg-visual-content font[size="6"] { font-size: 32px !important; }
.article-body-content font[size="7"], .page-body-content font[size="7"], .prose font[size="7"], .wysiwyg-visual-content font[size="7"] { font-size: 40px !important; }

.article-body-content a, .page-body-content a,
.prose a, .wysiwyg-visual-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.15s ease;
}

.article-body-content a:hover, .page-body-content a:hover,
.prose a:hover, .wysiwyg-visual-content a:hover {
    color: var(--primary-hover);
}

.article-body-content ul, .page-body-content ul,
.prose ul, .wysiwyg-visual-content ul {
    list-style-type: disc !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 2.2rem !important;
}

.article-body-content ol, .page-body-content ol,
.prose ol, .wysiwyg-visual-content ol {
    list-style-type: decimal !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 2.2rem !important;
}

.article-body-content li, .page-body-content li,
.prose li, .wysiwyg-visual-content li {
    display: list-item !important;
    margin-top: 0.45rem;
    margin-bottom: 0.45rem;
    padding-left: 0.25rem;
    line-height: 1.7;
}

.article-body-content img, .page-body-content img,
.prose img, .wysiwyg-visual-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px auto;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: block;
}

.article-body-content blockquote, .page-body-content blockquote,
.prose blockquote, .wysiwyg-visual-content blockquote {
    border-left: 4px solid var(--primary);
    background: #f8fafc;
    padding: 14px 22px;
    margin: 22px 0;
    border-radius: 0 10px 10px 0;
    color: #475569;
    font-style: italic;
}

.article-body-content table, .page-body-content table,
.prose table, .wysiwyg-visual-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.92rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.article-body-content th, .page-body-content th,
.prose th, .wysiwyg-visual-content th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-body-content td, .page-body-content td,
.prose td, .wysiwyg-visual-content td {
    padding: 10px 16px;
    border: 1px solid var(--border-subtle);
    color: #334155;
}

.article-body-content tr:nth-child(even), .page-body-content tr:nth-child(even),
.prose tr:nth-child(even), .wysiwyg-visual-content tr:nth-child(even) {
    background: #f8fafc;
}

.article-body-content tr:hover, .page-body-content tr:hover,
.prose tr:hover, .wysiwyg-visual-content tr:hover {
    background: #f1f5f9;
}

.article-body-content hr, .page-body-content hr,
.prose hr, .wysiwyg-visual-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 28px 0;
}

.article-body-content code, .page-body-content code,
.prose code, .wysiwyg-visual-content code {
    background: #f1f5f9;
    color: var(--text-main);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.88em;
    border: 1px solid var(--border-subtle);
}

.article-body-content pre, .page-body-content pre,
.prose pre, .wysiwyg-visual-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 22px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-body-content pre code, .page-body-content pre code,
.prose pre code, .wysiwyg-visual-content pre code {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0;
}

/* Callouts Speciali Radioamatoriali */
.iu6vsy-callout {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 18px 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.iu6vsy-callout-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e3a8a;
}

.iu6vsy-callout-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.iu6vsy-callout-success {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #14532d;
}

/* ==========================================================================
   PAGINE SPECIALI: DX CLUSTER & CARTELLE FILE
   ========================================================================== */
.section-banner-hero {
    padding: 24px 28px;
    border-radius: 14px;
    color: #ffffff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-banner-hero h1 {
    margin: 0 0 6px 0;
    font-size: 1.5rem;
    font-weight: 900;
}

.section-banner-hero p {
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.9;
}

.hero-icon {
    font-size: 2.4rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.dx-cluster-table-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    border-radius: 8px;
}

/* ==========================================================================
   PAGINA CONTATTI & QSL (.contact-layout-grid)
   ========================================================================== */
.contact-layout-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

.contact-info-panel,
.contact-form-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.contact-info-panel h3,
.contact-form-panel h3 {
    margin: 0 0 16px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.contact-info-panel h3 i,
.contact-form-panel h3 i {
    color: var(--primary);
}

.contact-details-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.88rem;
}

.contact-details-list li {
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    word-break: break-word;
}

.contact-details-list li:last-child {
    border-bottom: none;
}

.qsl-policy-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    font-size: 0.85rem;
    color: #1e3a8a;
}

.qsl-policy-box h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qsl-policy-box p {
    margin: 4px 0;
}

.form-group-checkbox {
    margin: 14px 0 18px 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}

.form-group-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dx-table th {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dx-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.dx-table tr:hover td {
    background: #f8fafc;
}

.dx-call {
    color: #d97706;
    font-family: var(--font-mono);
}

.band-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.78rem;
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.folder-card-view {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.folder-card-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.folder-card-icon {
    font-size: 2rem;
    color: #f59e0b;
}

.folder-card-meta h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
}

.folder-card-meta p {
    margin: 0 0 6px 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.folder-path {
    font-size: 0.72rem;
    color: #94a3b8;
    font-family: var(--font-mono);
}

/* ==========================================================================
   SIDEBAR & WIDGETS
   ========================================================================== */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget-box {
    background: var(--bg-surface);
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.widget-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    background: #f8fafc;
}

.widget-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-icon-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
}

.widget-body {
    padding: 16px 18px;
    font-size: 0.88rem;
}

/* Visitor Widget */
.visitor-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.visitor-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.visitor-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-mono);
}

.visitor-number.text-emerald {
    color: #059669;
}

.visitor-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.ga4-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    background: #eff6ff;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
}

.ga4-live-pill {
    color: #1d4ed8;
    font-weight: 700;
}

.ga4-id-text {
    font-family: var(--font-mono);
    color: #475569;
}

/* Station Info Widget - Stazione IU6VSY & Bandiera Tricolore */
.station-widget-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.station-header-box {
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #172554 100%);
    color: #ffffff;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.station-flag-badge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.station-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid #334155;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0,0,0,0.4);
}

.callsign-tricolore-green {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #008C45;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.callsign-tricolore-white {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.callsign-tricolore-red {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #CD212A;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.station-flag-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: #020617;
    border: 1px solid #334155;
}

.station-flag-badge-sm .callsign-tricolore-green,
.station-flag-badge-sm .callsign-tricolore-white,
.station-flag-badge-sm .callsign-tricolore-red {
    font-size: 1.15rem;
    letter-spacing: 0.08em;
}

.station-operator-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fcd34d;
    margin: 4px 0 2px 0;
}

.station-loc-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #bfdbfe;
    font-weight: 500;
}

.station-loc-sub .text-red {
    color: #f87171;
}

.station-coords-bar {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.68rem;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #94a3b8;
}

.station-coords-bar .sep {
    color: #475569;
}

.station-coords-bar strong {
    color: #ffffff;
}

/* Box Cartolina QSL */
.station-qsl-card-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(251, 191, 36, 0.85);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background: #020617;
}

.station-qsl-img-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #090d16;
}

.station-qsl-thumb {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.station-qsl-img-container:hover .station-qsl-thumb {
    transform: scale(1.04);
}

.station-qsl-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.2) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 8px 10px;
    pointer-events: none;
}

.station-qsl-img-container:hover .station-qsl-overlay {
    opacity: 1;
}

.qsl-badge-pill {
    font-size: 0.68rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.95);
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.qsl-zoom-hint {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fcd34d;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-qsl-preview-action {
    width: 100%;
    padding: 8px;
    background: rgba(15, 23, 42, 0.95);
    color: #bfdbfe;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-top: 1px solid #1e293b;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-qsl-preview-action:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-qsl-preview-action .text-amber {
    color: #fbbf24;
}

/* Dettagli Operativi Card */
.station-details-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.78rem;
}

.station-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
}

.station-detail-item:last-of-type {
    border-bottom: none;
}

.station-detail-item .detail-label {
    color: #64748b;
    font-weight: 500;
}

.station-detail-item .detail-val {
    color: #0f172a;
    font-weight: 600;
}

.station-detail-item .text-blue-bold {
    color: #1d4ed8;
    font-weight: 700;
}

.station-detail-item .text-emerald-bold {
    color: #059669;
    font-weight: 600;
}

.station-qrz-btn-wrap {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
}

.btn-qrz-station {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-qrz-station:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* Backwards compatibility */
.station-badge-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    padding: 10px 14px;
    border-radius: 8px;
    color: #ffffff;
    margin-bottom: 12px;
}

.station-callsign {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    color: #38bdf8;
}

.station-locator {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #93c5fd;
}

.station-details {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
}

.station-details li {
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
}

/* Modale Zoom Cartolina QSL */
.station-qsl-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(4px);
    padding: 16px;
}

.station-qsl-modal-dialog {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    max-width: 900px;
    width: 100%;
    padding: 18px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: modalScaleIn 0.2s ease-out;
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.station-qsl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 12px;
}

.station-qsl-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.station-qsl-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.station-qsl-modal-subtitle {
    font-size: 0.75rem;
    color: #fcd34d;
    margin: 2px 0 0 0;
}

.station-qsl-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.station-qsl-modal-close:hover {
    color: #ffffff;
    background: #1e293b;
}

.station-qsl-modal-body {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #334155;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
}

.station-qsl-modal-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.station-qsl-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #1e293b;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.station-qsl-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.station-qsl-modal-meta strong {
    color: #f8fafc;
}

.station-qsl-modal-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-station-qsl-download {
    background: #2563eb;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-station-qsl-download:hover {
    background: #1d4ed8;
}

.btn-station-qsl-close {
    background: #1e293b;
    color: #e2e8f0;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-station-qsl-close:hover {
    background: #334155;
}

/* Solar Weather Widget */
.solar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.solar-metric {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
}

.metric-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-mono);
}

.metric-value.sfi { color: #d97706; }
.metric-value.k-index { color: #2563eb; }
.metric-value.good { color: #059669; }

.band-conditions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.78rem;
}

.band-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.recent-post-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    text-decoration: none;
}

.recent-post-title:hover {
    color: var(--primary);
}

.recent-post-date {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.categories-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
}

.categories-list a:hover {
    color: var(--primary);
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-count {
    margin-left: auto;
    font-size: 0.72rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 10px;
}

.links-list, .rpt-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.links-list li, .rpt-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.84rem;
}

/* ==========================================================================
   FOOTER (4 Colonne Sincronizzato con Preview React)
   ========================================================================== */
#main-footer, .site-footer {
    background: #020617; /* bg-slate-950 */
    color: #94a3b8; /* text-slate-400 */
    border-top: 2px solid rgba(37, 99, 235, 0.6); /* border-blue-600/60 */
    margin-top: 4rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.footer-container, .footer-inner {
    max-width: 1720px;
    width: 96%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.footer-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
    box-sizing: border-box;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* Colonna 1: Brand & Shack */
.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    width: 96px;
    height: 96px;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid #fbbf24; /* border-amber-400 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: #0f172a;
    padding: 2px;
    flex-shrink: 0;
}

.footer-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border: 2px solid #fbbf24;
    color: #fbbf24;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.footer-site-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 0;
}

.footer-callsign-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.125rem;
}

.callsign-tricolore-badge, .callsign-tricolore-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    background: #0f172a;
    border: 1px solid #334155;
    font-family: var(--font-mono, monospace);
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.callsign-tricolore-badge .callsign-tricolore-green,
.callsign-tricolore-sm .callsign-tricolore-green,
.callsign-tricolore-sm .tricolore-green {
    color: #008C45;
}

.callsign-tricolore-badge .callsign-tricolore-white,
.callsign-tricolore-sm .callsign-tricolore-white,
.callsign-tricolore-sm .tricolore-white {
    color: #ffffff;
}

.callsign-tricolore-badge .callsign-tricolore-red,
.callsign-tricolore-sm .callsign-tricolore-red,
.callsign-tricolore-sm .tricolore-red {
    color: #CD212A;
}

.footer-author-tag {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: 600;
}

.footer-about {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.625;
    margin: 0;
}

.ham-badge-footer {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #93c5fd;
    background: #0f172a;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #1e293b;
    width: fit-content;
}

.footer-social-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding-top: 0.25rem;
}

.social-pill-btn {
    font-size: 11px;
    background: #0f172a;
    color: #cbd5e1;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #1e293b;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.social-pill-btn:hover {
    background: rgba(30, 58, 138, 0.6);
    color: #ffffff;
    border-color: #2563eb;
}

/* Headings Colonne 2, 3, 4 */
.footer-column-heading, .footer-heading {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.heading-pill {
    width: 6px;
    height: 14px;
    border-radius: 9999px;
    display: inline-block;
}

.heading-pill.bg-blue {
    background: #3b82f6;
}

.heading-pill.bg-indigo {
    background: #6366f1;
}

/* Links liste Colonne 2 & 3 */
.footer-nav-list, .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.footer-nav-link, .footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
    width: 100%;
    font-size: 0.75rem;
}

.footer-nav-link:hover, .footer-links a:hover {
    color: #60a5fa;
}

.footer-nav-link.link-amber-bold, .footer-links a.link-highlight {
    color: #fbbf24 !important;
    font-weight: 700 !important;
}

.footer-nav-link.link-amber-bold:hover, .footer-links a.link-highlight:hover {
    color: #fde68a !important;
}

.footer-nav-link.link-highlight-blue, .footer-links a.link-highlight-blue {
    color: #60a5fa !important;
    font-weight: 600;
}

.cat-dot-sm {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    flex-shrink: 0;
    display: inline-block;
}

/* Colonna 4 - Pulsanti e Visite */
.admin-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-footer-admin-gold, .btn-admin-gold {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 16px;
    background: linear-gradient(to right, #f59e0b, #d97706);
    color: #020617 !important;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #fbbf24;
    text-decoration: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.btn-footer-admin-gold:hover, .btn-admin-gold:hover {
    background: linear-gradient(to right, #d97706, #b45309);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    color: #020617 !important;
}

.btn-footer-secondary, .btn-admin-sub {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 8px 12px;
    background: #0f172a;
    color: #93c5fd !important;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 12px;
    border: 1px solid #1e293b;
    text-decoration: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.btn-footer-secondary:hover, .btn-admin-sub:hover {
    background: #1e293b;
    color: #ffffff !important;
}

/* Card Contatore Visite */
.footer-visitor-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 14px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.footer-visitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.625rem;
}

.footer-visitor-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.025em;
}

.footer-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(6, 78, 59, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-size: 10px;
    font-weight: 700;
    color: #34d399;
}

.footer-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    display: inline-block;
}

.footer-odometer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 0;
    background: rgba(2, 6, 23, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(30, 41, 59, 0.8);
    font-family: var(--font-mono, monospace);
    margin-bottom: 0.625rem;
}

.odometer-digit {
    width: 24px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 4px;
    border: 1px solid #334155;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.footer-visitor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    font-size: 11px;
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid rgba(30, 41, 59, 0.6);
}

.footer-v-item {
    background: rgba(2, 6, 23, 0.6);
    padding: 6px 4px;
    border-radius: 6px;
    border: 1px solid rgba(30, 41, 59, 0.4);
}

.footer-v-item .v-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
}

.footer-v-item .v-val {
    font-weight: 600;
    font-size: 0.75rem;
}

.footer-v-item .v-val.text-blue { color: #60a5fa; }
.footer-v-item .v-val.text-green { color: #34d399; }
.footer-v-item .v-val.text-slate { color: #cbd5e1; }

/* Barra Inferiore (Bottom Bar) */
.footer-bottom-bar {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom-bar {
        flex-direction: row;
        text-align: left;
    }
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-copyright-text {
    color: #94a3b8;
    margin: 0;
    font-size: 0.75rem;
}

.ai-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 2px 10px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}

.ai-template-badge i {
    color: #fbbf24;
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

.footer-counter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #0f172a;
    border: 1px solid #1e293b;
    font-size: 11px;
    color: #94a3b8;
    font-family: var(--font-mono, monospace);
}

.footer-sep, .sep {
    color: #475569;
}

.login-cms-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.login-cms-link:hover {
    color: #fbbf24;
}

/* ==========================================================================
   RESPONSIVE DESIGN COMPLETO (TABLET & SMARTPHONE MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
    .main-layout-container, .main-container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 20px auto;
    }

    .contact-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    /* Attiva il menu mobile anche su tablet (<= 1024px) per evitare righe multiple affollate */
    #mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: rgba(37, 99, 235, 0.25);
        border: 1px solid rgba(96, 165, 250, 0.45);
        border-radius: 8px;
        color: #ffffff;
        font-size: 0.82rem;
        font-weight: 700;
        padding: 6px 12px;
        min-height: 34px;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    #mobile-menu-btn:hover,
    #mobile-menu-btn.is-active {
        background: #2563eb;
        border-color: #3b82f6;
    }

    .header-nav-bar {
        display: none;
        background: #090f20;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        max-height: calc(100vh - 135px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-nav-bar.mobile-open {
        display: block;
    }

    .nav-menu-list.mobile-open {
        display: flex;
    }

    .nav-menu-list {
        flex-direction: column;
        padding: 10px 0 16px 0;
        gap: 2px;
    }

    .nav-menu-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-menu-item:last-child {
        border-bottom: none;
    }

    .nav-menu-link {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        font-size: 0.92rem;
        border-radius: 8px;
    }

    .dropdown-arrow {
        font-size: 0.8rem;
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        transition: transform 0.2s ease;
    }

    .nav-menu-item.touch-open > .nav-menu-link .dropdown-arrow {
        transform: rotate(180deg);
        background: #2563eb;
        color: #ffffff;
        opacity: 1;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(2, 6, 23, 0.65);
        border: none;
        border-left: 2px solid #3b82f6;
        border-radius: 0 8px 8px 0;
        margin: 0 0 8px 12px;
        padding: 4px 0;
        min-width: 0;
    }

    /* Su schermi touch/mobile apre il sottomenu SOLO al tocco (.touch-open) evitando aperture accidentali con :hover */
    .nav-menu-item:hover > .nav-dropdown-menu {
        display: none;
    }
    .nav-menu-item.touch-open > .nav-dropdown-menu {
        display: block;
    }

    .dropdown-sub-item > a {
        padding: 10px 14px;
        font-size: 0.85rem;
        color: #cbd5e1;
    }

    .nav-nested-dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(15, 23, 42, 0.6);
        border: none;
        border-left: 2px solid #60a5fa;
        margin: 0 0 6px 14px;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 12px;
    }

    .header-notice-strip {
        font-size: 0.72rem;
        padding: 5px 10px;
        line-height: 1.3;
    }

    .header-top-bar {
        padding: 5px 0;
    }

    .top-bar-left {
        display: none;
    }

    .top-bar-quick-links {
        display: none !important;
    }

    .top-bar-right {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .clock-chip {
        padding: 3px 6px;
        font-size: 0.68rem;
        gap: 4px;
    }

    .chip-label {
        font-size: 0.58rem;
    }

    .admin-quick-link {
        margin-left: auto;
        padding: 5px 8px;
    }

    /* Compatta il blocco centrale dell'header su smartphone così non ruba spazio verticale */
    .header-center-hero {
        padding: 8px 0;
    }

    .hero-brand-link {
        gap: 10px;
        width: 100%;
    }

    .brand-logo-wrap {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    .brand-title-row {
        gap: 6px;
    }

    .brand-main-title {
        font-size: 1.15rem;
        line-height: 1.2;
    }

    .callsign-tricolore {
        font-size: 0.88rem;
        padding: 1px 7px;
    }

    .operator-badge {
        display: none !important;
    }

    .brand-desc-text {
        font-size: 0.73rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Contenitore principale e spaziature mobile */
    .main-layout-container, .main-container {
        margin: 14px auto;
        padding: 0 12px;
        gap: 20px;
    }

    /* Hero articolo in evidenza su smartphone */
    .hero-image-wrap {
        min-height: 200px;
    }

    .hero-content {
        padding: 18px 16px;
        gap: 12px;
    }

    .hero-title {
        font-size: 1.28rem;
    }

    .hero-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Barra filtri e categorie */
    .main-filter-bar {
        padding: 10px 12px;
        gap: 10px;
    }

    .category-pills-wrap,
    .cat-pills-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .filter-controls-group,
    .filter-controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select,
    .sort-select-ctrl {
        flex: 1;
    }

    /* Griglie a 1 colonna su smartphone */
    .articles-grid,
    .footer-grid-4,
    .calc-sub-grid,
    .rig-cards-grid,
    .gallery-grid,
    .folders-grid,
    .calc-matrix-grid,
    .form-row-2 {
        grid-template-columns: 1fr !important;
    }

    /* Articolo singolo e Pagina singola: rimuove il padding laterale eccessivo (40px -> 14px) */
    .single-article-view,
    .single-page-view {
        padding: 18px 14px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .article-full-title,
    .page-title {
        font-size: 1.45rem;
        line-height: 1.25;
    }

    .article-full-meta {
        gap: 10px;
        font-size: 0.76rem;
    }

    .breadcrumb-trail {
        font-size: 0.76rem;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .breadcrumb-trail .current {
        max-width: 200px;
    }

    /* Tipografia prose mobile e tabelle */
    .article-body-content,
    .page-body-content,
    .prose,
    .wysiwyg-visual-content {
        font-size: 0.95rem;
        line-height: 1.68;
    }

    .article-body-content h1, .page-body-content h1, .prose h1 { font-size: 1.45rem; }
    .article-body-content h2, .page-body-content h2, .prose h2 { font-size: 1.25rem; }
    .article-body-content h3, .page-body-content h3, .prose h3 { font-size: 1.1rem; }

    .article-body-content ul, .page-body-content ul, .prose ul,
    .article-body-content ol, .page-body-content ol, .prose ol {
        padding-left: 1.35rem !important;
    }

    .article-body-content table,
    .page-body-content table,
    .prose table,
    .rf-frequency-table,
    .band-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.8rem;
    }

    .article-body-content th, .page-body-content th, .prose th,
    .article-body-content td, .page-body-content td, .prose td,
    .rf-frequency-table th, .rf-frequency-table td,
    .band-table th, .band-table td,
    .dx-table th, .dx-table td {
        padding: 8px 10px;
    }

    /* Box autore e commenti */
    .author-bio-box {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }

    .comment-form,
    .contact-info-panel,
    .contact-form-panel {
        padding: 16px 14px;
    }

    /* Banner sezioni, Calcoli RF, Recensioni, Galleria */
    .section-banner-hero {
        padding: 18px 16px;
        gap: 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    .section-banner-hero h1 {
        font-size: 1.3rem;
    }

    .hero-icon {
        font-size: 1.8rem;
    }

    .rig-catalog-hero,
    .rig-detail-hero,
    .gallery-hero-banner,
    .calc-hero-container,
    .calc-matrix-container {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .rig-hero-left,
    .rig-hero-right-search,
    .calc-hero-search-wrap {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .rig-hero-left h1,
    .rig-hero-title,
    .calc-hero-title {
        font-size: 1.35rem;
    }

    .rig-gallery-main-frame {
        height: 220px;
    }

    .gallery-type-filter {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .tool-card-header,
    .tool-card-body {
        padding: 14px 16px;
    }

    /* PDF Viewer allegato su mobile */
    .page-pdf-attachment iframe,
    .article-pdf-attachment iframe {
        height: 360px !important;
    }
}

@media (max-width: 420px) {
    /* Su schermi molto stretti (< 420px) nasconde l'etichetta testuale LOC/UTC secondaria per far stare entrambi gli orologi + menu */
    .clock-chip .chip-label {
        display: none;
    }

    .hero-brand-link {
        flex-direction: column;
        gap: 6px;
    }

    .calc-result-grid-4,
    .calc-result-grid-3,
    .calc-result-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   14. RECENSIONI APPARATI RADIO RTX (IU6VSY RIG REVIEWS & SCHEDE TECNICHE)
   ========================================================================== */
.rig-catalog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border: 1px solid #312e81;
    border-radius: 18px;
    padding: 28px 32px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
}

.rig-catalog-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.rig-hero-left {
    flex: 1;
    min-width: 280px;
}

.rig-pill-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(129, 140, 248, 0.4);
    color: #c7d2fe;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.rig-pill-eyebrow i {
    color: #fbbf24;
}

.rig-hero-left h1 {
    font-size: 1.85rem;
    font-weight: 900;
    margin: 0 0 8px 0;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.rig-hero-left p {
    font-size: 0.92rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.6;
    max-width: 650px;
}

.rig-hero-right-search {
    min-width: 260px;
    margin-top: 10px;
}

.rig-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.rig-search-input-wrap i {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.rig-search-input-wrap input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: #0b1329;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.rig-search-input-wrap input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.rig-brands-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rig-brand-btn {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rig-brand-btn:hover {
    background: #334155;
    color: #ffffff;
}

.rig-brand-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.rig-secondary-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rig-secondary-filter-bar .filter-col {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.rig-secondary-filter-bar select {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f8fafc;
    color: #1e293b;
    outline: none;
    cursor: pointer;
}

.filter-count-badge {
    font-size: 0.82rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
}

.rig-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.rig-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.rig-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0,0,0,0.12);
    border-color: #93c5fd;
}

.rig-card-img-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #0f172a;
    overflow: hidden;
}

.rig-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rig-card-item:hover .rig-card-img-wrap img {
    transform: scale(1.05);
}

.rig-brand-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1e293b;
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #334155;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.rig-category-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #e2e8f0;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.rig-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.rig-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.rig-stars-gold {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #f59e0b;
    font-size: 0.82rem;
}

.rig-stars-gold .score-val {
    font-weight: 800;
    color: #0f172a;
    margin-left: 4px;
    font-size: 0.85rem;
}

.rig-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.rig-card-model {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.rig-card-summary {
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rig-card-footer-action {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.rig-price-tag {
    font-size: 0.80rem;
    font-weight: 700;
    color: #059669;
}

.rig-btn-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.80rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.rig-btn-details:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.rig-card-brand-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0f172a;
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #334155;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.rig-card-featured-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rig-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #475569;
    font-size: 2.5rem;
}

.rig-card-type-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.rig-card-type-pill {
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
}

.rig-card-year-pill {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.70rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.rig-card-model-sub {
    font-size: 0.80rem;
    color: #2563eb;
    margin-bottom: 8px;
}

.rig-card-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rig-rating-num {
    font-size: 0.80rem;
    font-weight: 800;
    color: #0f172a;
}

.rig-price-pill {
    margin-left: auto;
    font-size: 0.74rem;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #a7f3d0;
}

.rig-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.rig-btn-view-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rig-btn-view-card:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.rig-empty-notice {
    background: #ffffff;
    padding: 40px 20px;
    text-align: center;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    grid-column: 1 / -1;
}


/* Scheda Singola Dettaglio */
.rig-nav-back-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.rig-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 12px;
    background: #eff6ff;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rig-btn-back:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.rig-author-meta {
    font-size: 0.82rem;
    color: #64748b;
}

.rig-detail-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #0b1329 100%);
    border: 1px solid #312e81;
    border-radius: 18px;
    padding: 30px;
    color: #ffffff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.rig-hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.rig-meta-badge {
    background: rgba(255,255,255,0.1);
    color: #cbd5e1;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.rig-hero-title {
    font-size: 2.1rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.rig-hero-subtitle {
    font-size: 0.95rem;
    color: #93c5fd;
    margin-bottom: 20px;
}

.rig-score-hero-box {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 18px;
    backdrop-filter: blur(8px);
}

.rig-score-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: #f59e0b;
    line-height: 1;
}

.rig-score-meta {
    display: flex;
    flex-direction: column;
}

.rig-score-label {
    font-size: 0.74rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.rig-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .rig-detail-grid {
        grid-template-columns: 1fr;
    }
}

.rig-card-box {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.rig-section-h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.rig-gallery-main-frame {
    width: 100%;
    height: 320px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rig-gallery-main-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rig-thumbs-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.rig-thumb-item {
    width: 68px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #0f172a;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.rig-thumb-item:hover, .rig-thumb-item.active {
    border-color: #2563eb;
    opacity: 1;
    transform: scale(1.05);
}

.rig-pro-con-group {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.rig-pro-con-group.pro-group {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.rig-pro-con-group.con-group {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.rig-sub-heading {
    font-size: 0.90rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rig-sub-heading.text-green { color: #15803d; }
.rig-sub-heading.text-red { color: #b91c1c; }

.rig-bullet-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.86rem;
    color: #334155;
    line-height: 1.55;
}

.rig-ratings-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rig-rating-bar-row .bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.rig-rating-bar-row .bar-track {
    width: 100%;
    height: 9px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.rig-rating-bar-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.rig-specs-table-wrapper {
    overflow-x: auto;
}

.rig-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.rig-specs-table tr:nth-child(even) {
    background: #f8fafc;
}

.rig-specs-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.rig-specs-table .spec-k {
    font-weight: 700;
    color: #475569;
    width: 40%;
}

.rig-specs-table .spec-v {
    color: #0f172a;
    font-weight: 500;
}

.rig-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rig-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rig-action-btn.pdf-btn {
    background: #dc2626;
    color: #ffffff;
}

.rig-action-btn.pdf-btn:hover {
    background: #b91c1c;
    color: #ffffff;
}

.rig-action-btn.video-btn {
    background: #1e293b;
    color: #ffffff;
}

.rig-action-btn.video-btn:hover {
    background: #0f172a;
    color: #ffffff;
}

.rig-video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.rig-video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   15. GALLERIA MULTIMEDIALE FOTO & VIDEO (IU6VSY GALLERY)
   ========================================================================== */
.gallery-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #0f172a 100%);
    border: 1px solid #312e81;
    border-radius: 18px;
    padding: 28px 32px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
}

.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-pill {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.80rem;
    font-weight: 700;
    color: #cbd5e1;
    background: #1e293b;
    text-decoration: none;
    border: 1px solid #334155;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-pill:hover {
    background: #334155;
    color: #ffffff;
}

.filter-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.gallery-type-filter {
    margin-left: auto;
    display: flex;
    gap: 4px;
    background: #0b1329;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.type-pill {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-pill.active {
    background: #2563eb;
    color: #ffffff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.gallery-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0,0,0,0.12);
    border-color: #93c5fd;
}

.gallery-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
}

.gallery-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.gallery-badge-album {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.70rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    text-transform: uppercase;
}

.gallery-badge-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.70rem;
    font-weight: 700;
}

.gallery-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    transition: background 0.2s ease;
}

.gallery-play-icon {
    width: 46px;
    height: 46px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    transition: transform 0.2s ease;
}

.gallery-card:hover .gallery-play-icon {
    transform: scale(1.15);
}

.gallery-callsign-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    color: #93c5fd;
    background: rgba(30, 58, 138, 0.9);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.gallery-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.gallery-info h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.gallery-info p {
    margin: 0 0 10px 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-date {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Lightbox Modal Fullscreen */
.gallery-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gallery-lightbox-overlay.active {
    display: flex;
}

.lightbox-content-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img-wrap {
    max-width: 85vw;
    max-height: 75vh;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: #000;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

.lightbox-close-btn {
    position: absolute;
    top: -42px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

.lightbox-close-btn:hover {
    background: #ef4444;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s ease;
}

.lightbox-nav-btn:hover {
    background: #2563eb;
}

.lightbox-nav-prev { left: -60px; }
.lightbox-nav-next { right: -60px; }

@media (max-width: 768px) {
    .lightbox-nav-prev { left: 10px; }
    .lightbox-nav-next { right: 10px; }
}

.lightbox-caption-bar {
    margin-top: 14px;
    text-align: center;
    color: #f8fafc;
}

.lightbox-caption-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
}

.lightbox-caption-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 4px 0 0 0;
}

/* ==========================================================================
   BARRA FILTRI CATEGORIE, ORDINAMENTO & VISTA GRIGLIA/LISTA (SINCRONIZZATA CON REACT)
   ========================================================================== */
.main-filter-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.category-pills-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    flex: 1;
}
.category-pills-wrap::-webkit-scrollbar {
    display: none;
}

.category-pill-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.category-pill-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}
.category-pill-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}
.cat-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.cat-pill-count {
    font-size: 0.68rem;
    opacity: 0.8;
    font-weight: normal;
}

.filter-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.sort-select-ctrl {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 10px;
    background: #f8fafc;
    font-size: 0.74rem;
    font-weight: 600;
    color: #334155;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.sort-select-ctrl:focus {
    border-color: #3b82f6;
    background: #ffffff;
}

.view-mode-switch {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px;
}
.view-mode-btn {
    background: transparent;
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.view-mode-btn:hover {
    color: #0f172a;
}
.view-mode-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* AVATAR AUTORE CIRCOLARE CON INIZIALI */
.author-avatar-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* MODALITÀ LISTA PER ARTICOLI */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.article-card-list {
    display: flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.article-card-list:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}
.article-card-list .card-cover {
    width: 260px;
    min-height: 180px;
    flex-shrink: 0;
    position: relative;
    background: #0f172a;
    overflow: hidden;
}
.article-card-list .card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.article-card-list:hover .card-cover img {
    transform: scale(1.04);
}
.article-card-list .card-body {
    padding: 18px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media (max-width: 640px) {
    .article-card-list {
        flex-direction: column;
    }
    .article-card-list .card-cover {
        width: 100%;
        height: 180px;
    }
}

/* ==========================================================================
   STILI CALCOLI RF & ELETTRONICA - UNIFICATI CON IL PREVIEW REACT
   ========================================================================== */
.calc-panel {
    display: none;
    animation: fadeInCalc 0.2s ease-in-out;
}
.calc-panel.active {
    display: block;
}
@keyframes fadeInCalc {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .calc-sub-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    border-color: #cbd5e1;
}
.tool-card-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tool-card-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.calc-result-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0;
}
.calc-result-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px 0;
}
.calc-result-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
}
@media (max-width: 640px) {
    .calc-result-grid-4, .calc-result-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
.res-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
}
.res-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.res-num {
    font-size: 1.05rem;
    font-weight: 900;
    font-family: var(--font-mono);
}
.res-card.highlight {
    background: #0f172a;
    border-color: #1e293b;
}
.res-card.highlight .res-lbl {
    color: #94a3b8;
}
.res-card.highlight .res-num {
    color: #38bdf8;
}

/* ==========================================================================
   STILI SUITE CALCOLI RF & LAYOUT CONTAINER PRINCIPALE
   ========================================================================== */
.main-content-wide, .main-content-col, #main-content {
    min-width: 0;
    flex: 1;
    width: 100%;
}

.calc-hero-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.calc-hero-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.calc-hero-title-group {
    max-width: 800px;
}
.calc-hero-title {
    font-size: 1.65rem;
    font-weight: 900;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.calc-hero-icon-box {
    width: 44px;
    height: 44px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}
.calc-hero-subtitle {
    font-size: 0.88rem;
    color: #475569;
    margin: 8px 0 0 0;
    line-height: 1.6;
}
.calc-hero-search-wrap {
    position: relative;
    width: 100%;
    max-width: 300px;
}
.calc-hero-search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}
.calc-search-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 12px 9px 36px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: all 0.2s;
}
.calc-search-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.calc-tabs-scroll-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-top: 16px;
    scrollbar-width: thin;
}
.calc-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}
.calc-pill-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}
.calc-pill-btn.active {
    background: #0f172a;
    color: #ffffff !important;
    border-color: #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.pill-icon {
    font-size: 0.95rem;
}

/* MATRICE QUICK ACCESS (INDICE STRUMENTI) */
.calc-matrix-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 30px;
    margin-bottom: 24px;
}
.calc-matrix-title {
    font-size: 0.88rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #334155;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.calc-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.calc-matrix-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.calc-matrix-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}
.calc-matrix-card.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.matrix-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}
.matrix-icon {
    font-size: 1rem;
}
.matrix-desc {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* TABS PANELS */
.calc-panel {
    display: none;
    animation: fadeInCalc 0.2s ease-in-out;
}
.calc-panel.active {
    display: block;
}
@keyframes fadeInCalc {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .calc-sub-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    border-color: #cbd5e1;
}
.tool-card-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tool-card-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}


/**
 * IU6VSY & Radioamatori Frentani - Foglio di Stile CSS Personalizzato
 * Puoi aggiungere o modificare le regole per arricchire articoli, pagine e componenti.
 */

:root {
  --primary-radio: #1e40af;       /* Blu Navy IU6VSY */
  --primary-hover: #1d4ed8;
  --accent-radio: #ea580c;        /* Arancio Radiantismo */
  --dark-shack: #0f172a;          /* Blu Notte Shack */
  --border-subtle: #cbd5e1;
}

/* ==========================================================================
   1. BADGE NOMINATIVO IU6VSY & IDENTITÀ RADIOAMATORIALE
   ========================================================================== */
.callsign-badge-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-family: monospace;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
}

.callsign-badge-blue {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  font-family: monospace;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

/* ==========================================================================
   2. BOX NOTIZIE, NOTE SHACK & AVVISI TECNICI
   ========================================================================== */
.shack-note-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
  color: #1e3a8a;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.06);
}

.iu6vsy-callout {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.iu6vsy-callout-info {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  color: #1e3a8a;
}

.iu6vsy-callout-warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #78350f;
}

.iu6vsy-callout-success {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  color: #14532d;
}

/* ==========================================================================
   3. TABELLE FREQUENZE & MISURE RF AD ALTO CONTRASTO
   ========================================================================== */
.rf-frequency-table,
.band-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  margin: 16px 0;
}

.rf-frequency-table th,
.band-table th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 14px;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-align: left;
}

.rf-frequency-table td,
.band-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 0.88rem;
}

.rf-frequency-table tr:hover td,
.band-table tr:hover td {
  background: #e0f2fe;
  color: #0369a1;
}

/* ==========================================================================
   4. PULSANTI FILTRO BANDA & SELETTORI RF
   ========================================================================== */
.rf-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.rf-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.rf-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   5. SCHEDE APPARATI RADIO & LABORATORIO (DARK RIG CARD)
   ========================================================================== */
.dark-rig-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 20px;
  color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dark-rig-card h3 {
  color: #38bdf8;
  margin-bottom: 8px;
}

.dark-rig-card p {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ==========================================================================
   6. CONTENITORE PDF MANUALE & SCHEMI ELETTRICI
   ========================================================================== */
.iu6vsy-pdf-frame-wrapper {
  border: 2px solid #1e40af;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.15);
  background: #ffffff;
  margin: 20px 0;
}

.iu6vsy-pdf-frame-wrapper .pdf-header {
  background: #1e40af;
  color: #ffffff;
  padding: 10px 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   HEADER FISSO & MENU MOBILE SOVRAPPOSTO (Aggiungi in fondo a style.css)
   ========================================================================== */

/* 1. Evita che overflow-x blocchi il posizionamento fisso */
html, body, body.php-site {
    overflow-x: clip !important;
}

.site-wrapper {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* 2. Blocca l'header sempre in cima allo schermo */
#fixed-header {
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

/* 3. Attiva lo spaziatore per non coprire il testo in alto */
.header-spacer, #fixed-header-spacer {
    display: block !important;
    width: 100% !important;
    flex-shrink: 0 !important;
}

/* 4. Su smartphone e tablet il menu a tendina scende a scomparsa sopra la pagina */
@media (max-width: 1024px) {
    .header-nav-bar {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1001 !important;
        border-bottom: 2px solid #2563eb !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.55) !important;
        max-height: calc(100vh - 115px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ==========================================================================
   BARRA SPONSOR & PARTNER TECNICI (NEL MAIN, SOPRA AL FOOTER)
   ========================================================================== */
.main-sponsor-bar-container,
.sponsor-bar-wrapper {
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.sponsor-bar-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.98) 50%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.sponsor-bar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    pointer-events: none;
}

.sponsor-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.875rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
    flex-wrap: wrap;
}

.sponsor-bar-head-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sponsor-bar-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1rem;
    flex-shrink: 0;
}

.sponsor-bar-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sponsor-count-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-family: monospace;
    padding: 2px 6px;
    border-radius: 4px;
    background: #172554;
    border: 1px solid rgba(30, 58, 138, 0.8);
    color: #93c5fd;
    font-weight: 800;
}

.sponsor-bar-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

.sponsor-btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #475569;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sponsor-btn-admin:hover {
    background: rgba(37, 99, 235, 0.3);
    border-color: #60a5fa;
    color: #ffffff;
}

.sponsor-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.sponsor-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid #1e293b;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 90px;
    position: relative;
    box-sizing: border-box;
}

.sponsor-logo-item:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

.sponsor-img-wrap {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    overflow: hidden;
}

.sponsor-img {
    max-height: 44px;
    max-width: 130px;
    width: auto;
    object-fit: contain;
    transition: all 0.2s ease;
}

.sponsor-grayscale .sponsor-img {
    filter: grayscale(100%);
    opacity: 0.8;
}

.sponsor-grayscale .sponsor-logo-item:hover .sponsor-img,
.sponsor-logo-item:hover .sponsor-img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.sponsor-logo-fallback {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-weight: 800;
    font-family: monospace;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-name-label {
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.sponsor-logo-item:hover .sponsor-name-label {
    color: #93c5fd;
}

/* ==========================================================================
   BARRA DOWNLOAD & STAMPA ARTICOLI E PAGINE (PDF & DOC)
   ========================================================================== */
.document-export-bar {
    margin: 28px 0;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.export-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.export-bar-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.export-bar-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px 0;
}

.export-bar-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

.export-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-export-pdf,
.btn-export-doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.btn-export-pdf {
    background: #ffffff;
    color: #1e40af;
    border: 1px solid #93c5fd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-export-pdf:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-export-doc {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #1d4ed8;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}
.btn-export-doc:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   STILI DI STAMPA UFFICIALI (@media print) PER PDF PULITO E PROFESSIONALE
   ========================================================================== */
@media print {
    /* Nascondi tutti gli elementi non editoriali */
    #fixed-header,
    .header-spacer,
    #fixed-header-spacer,
    #main-footer,
    aside.sidebar,
    .site-sidebar,
    .sidebar-widget,
    .document-export-bar,
    .comments-section,
    .comment-form,
    .author-bio-box,
    .breadcrumb-trail,
    .main-sponsor-bar-container,
    .sponsor-bar-wrapper,
    .print\:hidden,
    .print-hidden,
    .btn,
    button {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .site-wrapper,
    .main-layout-container,
    #main-content,
    .main-content-wide,
    article,
    .single-article-view,
    .single-page-view {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    h1, h2, h3, h4 {
        color: #000000 !important;
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    table {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline !important;
        color: #000000 !important;
    }
}

/* Barra Esportazione Articoli e Pagine (PDF, DOC, Stampa) */
.document-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 32px 0 20px 0;
}
.export-bar-left { display: flex; align-items: center; gap: 12px; }
.export-bar-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #eff6ff; color: #2563eb;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.export-bar-title { margin: 0; font-size: 0.95rem; font-weight: 800; color: #0f172a; }
.export-bar-desc { margin: 2px 0 0; font-size: 0.78rem; color: #64748b; }
.export-bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-export-pdf, .btn-export-doc {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; text-decoration: none; border: 1px solid #cbd5e1; background: #ffffff; color: #1e293b;
  transition: all 0.15s ease;
}
.btn-export-pdf:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.btn-export-doc:hover { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.btn-export-doc i { color: #2563eb; }

/* Stampa pulita documento */
@media print {
  .site-header, .site-footer, .sidebar-col, .document-export-bar, .print-hidden, .header-sticky-spacer {
    display: none !important;
  }
  body, .main-content-wide, .article-view-card {
    background: #fff !important; color: #000 !important; width: 100% !important; margin: 0 !important; padding: 0 !important; border: none !important; box-shadow: none !important;
  }
}
/* Stampa pulita: solo articolo o pagina, senza sidebar né menu */
@media print {
  header, footer, aside, nav, #fixed-header, #main-footer,
  .sidebar-right, #sidebar-right, .site-sidebar, .sidebar-widget,
  .document-export-bar, .main-sponsor-bar-container, .print-hidden,
  .author-bio-box, .comments-section, button {
    display: none !important;
  }
  body, .main-content-wide, #main-content, article, .single-article-view, .single-page-view {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ===================================================================
   FIX SCROLL SOTTOMENU DROPDOWN LUNGHI (IU6VSY)
   Evita che il menu esca fuori dallo schermo e lo rende scorrevole
   =================================================================== */
@media (min-width: 1025px) {
    .nav-dropdown-menu {
        max-height: calc(100vh - 120px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: #3b82f6 #0f172a;
    }

    .nav-nested-dropdown-menu {
        position: static !important;
        border: none !important;
        border-left: 2px solid #3b82f6 !important;
        border-radius: 0 6px 6px 0 !important;
        box-shadow: none !important;
        padding: 3px 0 5px 0 !important;
        margin: 2px 8px 4px 16px !important;
    }
}

/* Scrollbar sottile ed elegante integrata con il tema scuro */
.nav-dropdown-menu::-webkit-scrollbar,
.nav-nested-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.nav-dropdown-menu::-webkit-scrollbar-track,
.nav-nested-dropdown-menu::-webkit-scrollbar-track {
    background: #090e1a;
    border-radius: 4px;
}
.nav-dropdown-menu::-webkit-scrollbar-thumb,
.nav-nested-dropdown-menu::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}
.nav-dropdown-menu::-webkit-scrollbar-thumb:hover,
.nav-nested-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* ==========================================================================
   FORMULE MATEMATICHE & SCIENTIFICHE (KaTeX / LaTeX)
   Eliminazione scrollbar e linee parassite sulle formule inline
   ========================================================================== */

/* 1. Formule inline nel testo (es. V_L, X_C, f_0, formule tra parole) */
span.iu6vsy-math-formula.inline-math,
.iu6vsy-math-formula.inline-math {
  display: inline-block !important;
  margin: 0 0.25rem !important;
  padding: 0 !important;
  vertical-align: -0.15em !important;
  max-width: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  scrollbar-width: none !important;
  line-height: normal !important;
}

/* Nasconde qualsiasi scrollbar residua sui browser WebKit/Blink (Chrome, Edge, Safari) */
span.iu6vsy-math-formula.inline-math::-webkit-scrollbar,
.iu6vsy-math-formula.inline-math::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* 2. Reset contenitori interni KaTeX */
.iu6vsy-math-formula .katex-inner-render,
.iu6vsy-math-formula .katex,
.iu6vsy-math-formula .katex-html {
  overflow: visible !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* 3. Formule a blocco centrate (equazioni grandi e isolate) */
div.iu6vsy-math-formula,
.iu6vsy-math-formula:not(.inline-math) {
  display: block;
  margin: 1.5rem auto;
  text-align: center;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* 4. Salvaguardia delle vere linee matematiche (frazioni e radici quadrate) */
.katex .frac-line {
  border-bottom-style: solid !important;
}
.katex .sqrt-line {
  border-top-style: solid !important;
}

/* ==========================================================================
   8. MENU DROPDOWN LUNGHI & SOTTOMENU AD APERTURA LATERALE (A CASCATA)
   Risolve il problema dei menu lunghi tagliati aprendo i sottomenu al lato
   ed evitando che finiscano oltre il fondo dello schermo
   ========================================================================== */

/* Menu a tendina principale: compatto, ben visibile e con overflow libero per i sottomenu laterali */
.nav-dropdown-menu {
  overflow: visible !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75) !important;
}

/* Sottomenu di 2° livello ad apertura LATERALE su Desktop (al lato del menu principale) */
@media (min-width: 1025px) {
  .dropdown-sub-item {
    position: relative !important;
  }

  .nav-nested-dropdown-menu {
    display: none;
    position: absolute !important;
    top: 0 !important;
    left: calc(100% - 4px) !important;
    min-width: 240px !important;
    max-width: 320px !important;
    max-height: min(440px, calc(100vh - 160px)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    background: #090e1a !important;
    border: 1px solid #1e293b !important;
    border-left: 3px solid #3b82f6 !important;
    border-radius: 8px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85) !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    z-index: 1005 !important;
    scrollbar-width: thin !important;
    scrollbar-color: #3b82f6 #090e1a !important;
  }

  /* Per le voci dal 3° elemento in poi, fa aprire il sottomenu verso l'alto (ancorato in basso)
     così da non toccare il fondo dello schermo e rimanere sempre visibile al 100% */
  .dropdown-sub-item:nth-child(n+3) > .nav-nested-dropdown-menu {
    top: auto !important;
    bottom: -6px !important;
  }

  /* Mostra il sottomenu al passaggio del mouse al lato */
  .dropdown-sub-item:hover > .nav-nested-dropdown-menu,
  .nav-nested-dropdown-menu:hover {
    display: block !important;
  }

  /* Per i menu verso la fine della barra orizzontale, apre a sinistra per non uscire dallo schermo */
  .nav-menu-item:last-child .nav-nested-dropdown-menu,
  .nav-menu-item:nth-last-child(2) .nav-nested-dropdown-menu {
    left: auto !important;
    right: calc(100% - 4px) !important;
    border-left: 1px solid #1e293b !important;
    border-right: 3px solid #3b82f6 !important;
  }
}

/* Su smartphone/tablet (touch screen <= 1024px): apertura a fisarmonica integrata */
@media (max-width: 1024px) {
  .nav-nested-dropdown-menu {
    display: none;
    position: static !important;
    background: #090e1a !important;
    border: none !important;
    border-left: 2px solid #3b82f6 !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 4px 0 6px 0 !important;
    margin: 4px 8px 6px 16px !important;
    list-style: none !important;
  }
  .dropdown-sub-item.touch-nested-open > .nav-nested-dropdown-menu {
    display: block !important;
  }
}