/* ========================================
   IDEEPOLITICHE.IT — Main Stylesheet
   ======================================== */

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text-primary: #ffffff;
    --text-secondary: #c8c8d8;
    --text-muted: #8888a0;
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #a78bfa;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-2: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Party Colors */
    --fdi: #003DA5;
    --pd: #E2001A;
    --m5s: #FFD700;
    --lega: #008C45;
    --fi: #0087DC;
    --azione: #1E3A5F;
    --avs: #4CAF50;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f5f8;
    --bg-secondary: #eeeef2;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f5;
    --text-primary: #1a1a2e;
    --text-secondary: #444466;
    --text-muted: #777799;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(245, 245, 248, 0.9);
}

[data-theme="light"] .hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

[data-theme="light"] .particle {
    background: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .section-title {
    background: linear-gradient(135deg, #1a1a2e 0%, #1a1a2e 30%, #6366f1 65%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .logo-idee {
    color: #1a1a2e;
}

[data-theme="light"] .party-name {
    color: #1a1a2e;
}

[data-theme="light"] .dot-label {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
}

[data-theme="light"] .spectrum-dot:hover .dot-label {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .spectrum-marker {
    background: #1a1a2e;
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .constitution-quote::before {
    opacity: 0.3;
}

[data-theme="light"] .nav-links {
    background: var(--bg-secondary);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-idee {
    color: var(--text-primary);
}

.logo-politiche {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-dot {
    color: var(--accent-1);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    margin-left: 8px;
}

.theme-toggle:hover {
    border-color: var(--accent-1);
    background: rgba(99, 102, 241, 0.05);
}

.theme-icon-light {
    display: none;
}

[data-theme="light"] .theme-icon-dark {
    display: none;
}

[data-theme="light"] .theme-icon-light {
    display: inline;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 80% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 40%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-3);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero-title .logo-idee {
    display: inline;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-hover);
    border-radius: 12px;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-1);
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* Animate In */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.25s; }
.animate-in:nth-child(3) { animation-delay: 0.4s; }
.animate-in:nth-child(4) { animation-delay: 0.55s; }
.animate-in:nth-child(5) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   SECTIONS COMMON
   ======================================== */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 30%, #a78bfa 65%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========================================
   FILTER TABS
   ======================================== */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-tab:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

/* Minor filter (governo/opposizione) */
.filter-tabs-minor {
    margin-top: -32px;
    margin-bottom: 48px;
    gap: 6px;
}

.filter-tab-minor {
    padding: 6px 18px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-tab-minor:hover {
    border-color: var(--accent-1);
    color: var(--text-secondary);
}

.filter-tab-minor.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--accent-1);
    color: var(--accent-3);
}

/* ========================================
   PARTY CARDS
   ======================================== */
.party-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.party-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
}

.party-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.party-card.hidden {
    display: none;
}

.party-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}


.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}


.party-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.party-card:hover .party-logo {
    border-color: var(--border-hover);
}

.party-meta {
    flex: 1;
    min-width: 0;
}

.party-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.3;
    color: #ffffff;
}

.party-leader {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.party-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-3);
    white-space: nowrap;
    flex-shrink: 0;
}

.party-badge.opposition {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.party-ideology {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 500;
}

.party-positions h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.party-positions ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.party-positions li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.party-positions li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-1);
}


.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.party-spectrum {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.spectrum-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.spectrum-bar {
    flex: 1;
    height: 4px;
    background: linear-gradient(to right, #E2001A, #FFD700, #003DA5);
    border-radius: 2px;
    position: relative;
    min-width: 80px;
}

.spectrum-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.party-card:hover .spectrum-marker {
    transform: translate(-50%, -50%) scale(1.2);
}

.btn-expand {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    display: none;
}

/* ========================================
   CONFRONTO SECTION
   ======================================== */
.confronto-section {
    background: var(--bg-secondary);
}

.comparison-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.topic-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.topic-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.topic-btn.active {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: white;
}

/* Party filter dropdown */
.party-filter {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.party-dropdown {
    position: relative;
    display: inline-block;
}

.party-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.party-dropdown-toggle:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.party-dropdown-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--accent-1);
    color: white;
    padding: 1px 7px;
    border-radius: 50px;
    display: none;
}

.party-dropdown-count.visible {
    display: inline;
}

.party-dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.party-dropdown.open .party-dropdown-arrow {
    transform: rotate(180deg);
}

.party-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 320px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 50;
    display: none;
}

.party-dropdown.open .party-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.party-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.party-chip {
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.party-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.party-chip.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.party-chip .chip-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.party-filter-reset {
    width: 100%;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.party-filter-reset:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

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

.comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.comparison-card:nth-child(1) { animation-delay: 0.05s; }
.comparison-card:nth-child(2) { animation-delay: 0.1s; }
.comparison-card:nth-child(3) { animation-delay: 0.15s; }
.comparison-card:nth-child(4) { animation-delay: 0.2s; }
.comparison-card:nth-child(5) { animation-delay: 0.25s; }
.comparison-card:nth-child(6) { animation-delay: 0.3s; }
.comparison-card:nth-child(7) { animation-delay: 0.35s; }

.comparison-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.comparison-card .card-party-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.comparison-card .party-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comparison-card .card-party-name {
    font-size: 1rem;
    font-weight: 700;
}

.comparison-card .card-position {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   SPETTRO SECTION
   ======================================== */
.spectrum-chart {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.spectrum-chart-large {
    max-width: 900px;
}

.spectrum-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.spectrum-filter-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.spectrum-filter-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.spectrum-filter-btn.active {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: white;
}

.spectrum-axis-y {
    position: absolute;
    left: -55px;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.spectrum-axis-y span {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition);
}

.spectrum-axis-x span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition);
}

.spectrum-axis-x {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding: 0 20px;
}

.spectrum-plane {
    position: relative;
    width: 100%;
    aspect-ratio: 1.2;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.spectrum-line-h,
.spectrum-line-v {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
}

[data-theme="light"] .spectrum-line-h,
[data-theme="light"] .spectrum-line-v {
    background: rgba(0, 0, 0, 0.12);
}

.spectrum-line-h {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.spectrum-line-v {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.spectrum-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--border-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
    background-size: 10% 10%;
    opacity: 0.6;
}

.quadrant-label {
    position: absolute;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
    transition: var(--transition);
}

.q-tl { top: 12%; left: 12%; }
.q-tr { top: 12%; right: 12%; }
.q-bl { bottom: 12%; left: 12%; }
.q-br { bottom: 12%; right: 12%; }

.spectrum-dot {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1), top 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spectrum-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.2;
    transition: var(--transition);
}

.spectrum-dot::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: currentColor;
    z-index: 1;
    transition: var(--transition);
    box-shadow: 0 0 12px currentColor;
}

.spectrum-dot:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.spectrum-dot:hover::before {
    opacity: 0.35;
}

.spectrum-dot[data-color="#003DA5"] { color: var(--fdi); }
.spectrum-dot[data-color="#E2001A"] { color: var(--pd); }
.spectrum-dot[data-color="#FFD700"] { color: var(--m5s); }
.spectrum-dot[data-color="#008C45"] { color: var(--lega); }
.spectrum-dot[data-color="#0087DC"] { color: var(--fi); }
.spectrum-dot[data-color="#1E3A5F"] { color: var(--azione); }
.spectrum-dot[data-color="#4CAF50"] { color: var(--avs); }
.spectrum-dot[data-color="#FF6F00"] { color: #FF6F00; }
.spectrum-dot[data-color="#5C6BC0"] { color: #5C6BC0; }
.spectrum-dot[data-color="#0066CC"] { color: #0066CC; }
.spectrum-dot[data-color="#FF8C00"] { color: #FF8C00; }
.spectrum-dot[data-color="#CC0000"] { color: #CC0000; }

.dot-label {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-primary);
    background: rgba(26, 26, 46, 0.9);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    opacity: 1;
    transition: var(--transition);
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.spectrum-dot:hover .dot-label {
    opacity: 1;
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-1);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-content .section-tag {
    display: inline-block;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-values {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.value-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.value-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.value-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.value-item p {
    font-size: 0.88rem !important;
    margin-bottom: 0 !important;
    color: var(--text-muted) !important;
}

.constitution-carousel {
    position: relative;
    min-height: 260px;
}

.constitution-quote {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
}

.constitution-quote.carousel-active {
    opacity: 1;
    pointer-events: auto;
    animation: carouselFadeIn 0.45s ease;
}

@keyframes carouselFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.constitution-quote::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    left: 24px;
    font-size: 5rem;
    font-family: 'Playfair Display', serif;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    opacity: 0.5;
}

.constitution-quote blockquote {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-top: 24px;
}

.constitution-quote cite {
    font-size: 0.85rem;
    color: var(--accent-3);
    font-style: normal;
    font-weight: 500;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.carousel-btn:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.carousel-dots {
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot.active {
    background: var(--accent-1);
    transform: scale(1.2);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 0.9rem;
}

.footer-links h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-3);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-content .section-tag {
        text-align: center;
        display: block;
    }

    .about-content p {
        text-align: center;
    }

    .about-values {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 24px;
        transition: var(--transition-slow);
        border-left: 1px solid var(--border-color);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .party-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section {
        padding: 80px 0;
    }

    .spectrum-axis-y {
        left: -30px;
    }

    .spectrum-dot {
        width: 30px;
        height: 30px;
    }

    .spectrum-dot::after {
        width: 10px;
        height: 10px;
    }

    .dot-label {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    .spectrum-filters {
        gap: 6px;
    }

    .spectrum-filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .filter-tabs {
        gap: 6px;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .comparison-controls {
        gap: 6px;
    }

    .topic-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .spectrum-chart {
        margin-left: 30px;
    }

    .quadrant-label {
        font-size: 0.5rem;
        letter-spacing: 1px;
    }

    .constitution-carousel {
        min-height: 300px;
    }

    .carousel-controls {
        gap: 8px;
    }

    .constitution-quote blockquote {
        font-size: 1rem;
    }

    .constitution-quote {
        padding: 28px;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .constitution-quote {
        padding: 28px;
    }

    .constitution-quote blockquote {
        font-size: 1.1rem;
    }
}

/* ========================================
   SPONSOR BANNER
   ======================================== */
.sponsor-banner {
    padding: 32px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.sponsor-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sponsor-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.sponsor-link {
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.sponsor-name {
    color: var(--text-primary);
}

.sponsor-dot {
    color: var(--accent-1);
}

.sponsor-link:hover .sponsor-name {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sponsor-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 480px) {
    .sponsor-inner {
        flex-direction: column;
        gap: 8px;
    }
}

/* ========================================
   QUIZ CTA BANNER
   ======================================== */
.quiz-cta-section {
    background: var(--bg-secondary);
}

.quiz-cta-banner {
    display: flex;
    align-items: center;
    gap: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.quiz-cta-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

.quiz-cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
}

.quiz-cta-content {
    flex: 1;
}

.quiz-cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 12px 0 16px;
    line-height: 1.2;
}

.quiz-cta-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.quiz-cta-btn {
    padding: 14px 36px;
    font-size: 1rem;
}

.quiz-cta-visual {
    flex-shrink: 0;
}

.quiz-cta-icon {
    font-size: 5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .quiz-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
        gap: 24px;
    }
    .quiz-cta-visual {
        order: -1;
    }
    .quiz-cta-icon {
        font-size: 3.5rem;
    }
}
