/**
 * San Desiderio Onlus - Main Stylesheet
 * Estratto e migliorato da ks.html
 */

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */
:root {
    /* Palette San Desiderio */
    --color-primary: #3a5a40;       /* Verde Bosco */
    --color-primary-soft: #5d8a82;
    --color-primary-light: #f4f7f6;
    --color-secondary: #a44a3f;     /* Rosso Mattone */
    --color-accent: #f4c542;         /* Giallo Zafferano */
    --color-text: #2c3e50;
    --color-text-muted: #5a6c7d;
    --color-bg: #fdfbf7;
    --color-white: #ffffff;
    --color-border: #e2e8f0;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Source Serif 4', Georgia, serif;

    /* Spacing & Layout */
    --container-max: 1320px;
    --container-narrow: 800px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;

    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(45, 90, 82, 0.1);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin: 0 0 1rem;
    color: var(--color-primary);
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    margin: 0 0 1.5rem;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

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

address {
    font-style: normal;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section--white {
    background: var(--color-white);
    border-radius: var(--radius-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.section-intro {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.text-center { text-align: center; }
.flex { display: flex; gap: 1rem; align-items: center; }
.grid { display: grid; gap: 2rem; }

/* Background Pattern */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235d8a82' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.topbar {
    background: var(--color-primary);
    color: white;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.topbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.topbar-contacts {
    display: flex;
    gap: 2rem;
}

.topbar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition-fast);
}

.topbar-link:hover {
    color: white;
    text-decoration: none;
}

.topbar-link svg {
    flex-shrink: 0;
}

.topbar-social {
    display: flex;
    gap: 0.75rem;
}

.topbar-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.topbar-social-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* Topbar responsive */
@media (max-width: 768px) {
    .topbar-social {
        display: none;
    }

    .topbar-contacts {
        gap: 1.5rem;
        width: 100%;
        justify-content: center;
    }

    .topbar-link span {
        display: none;
    }

    .topbar-link svg {
        width: 20px;
        height: 20px;
    }

    .topbar-wrapper {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .topbar-contacts {
        gap: 2rem;
    }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    background: white;
    position: sticky;
    top: 40px; /* Altezza della topbar */
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

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

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text {
    line-height: 1.2;
}

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

.logo-footer {
    color: white;
}

/* Logo responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .logo-img {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.85rem;
    }

    .logo-text {
        max-width: 120px;
        line-height: 1.15;
    }

    .logo-img {
        height: 40px;
    }
}

/* Main Navigation */
.nav-main {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    height: 100%;
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-secondary);
    text-decoration: none;
}

.nav-chevron {
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-chevron {
    transform: rotate(180deg);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

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

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

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

/* Mega Menu */
.has-mega {
    position: static !important;
}

.mega-menu {
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
    padding: 3rem 0;
}

.nav-item:hover .mega-menu,
.mega-menu:focus-within {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.mega-col h5 {
    font-family: var(--font-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--color-primary-soft);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.mega-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-list li {
    margin-bottom: 0.8rem;
}

.mega-list a {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    text-decoration: none;
}

.mega-list a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.mega-promo {
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mega-promo img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 8px);
}

.mega-promo h4 {
    margin: 0;
    font-size: 1.1rem;
}

.mega-promo p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
}

.mega-promo-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
}

.mega-promo-link::after {
    content: ' \2192';
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.dropdown-menu:focus-within {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.dropdown-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    text-decoration: none;
}

.dropdown-link--header {
    font-weight: 600;
    color: var(--color-primary);
}

.dropdown-link--highlight {
    background: linear-gradient(135deg, var(--color-accent) 0%, #f5d76e 100%);
    color: var(--color-text);
    font-weight: 600;
}

.dropdown-link--highlight:hover {
    background: linear-gradient(135deg, #e5b732 0%, #f5d76e 100%);
}

.dropdown-link-title {
    flex: 1;
}

.dropdown-link-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--color-primary-light);
    color: var(--color-primary-soft);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.dropdown-link--highlight .dropdown-link-tag {
    background: rgba(255,255,255,0.5);
    color: var(--color-text);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: #2d4832;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-outline--white {
    border-color: white;
    color: white;
}

.btn-outline--white:hover {
    background: white;
    color: var(--color-primary);
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
}

/* ==========================================================================
   Tags
   ========================================================================== */
.tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    width: fit-content;
}

.tag--accent {
    background: var(--color-accent);
    color: #000;
}

/* ==========================================================================
   Hero Carousel
   ========================================================================== */
.hero-carousel {
    position: relative;
    height: 75vh;
    min-height: 500px;
    overflow: hidden;
    background: #000;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 2rem;
    z-index: 10;
}

.slide-content h2 {
    color: white;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    max-width: 900px;
    line-height: 1.1;
}

.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    background: transparent;
    padding: 0;
}

.dot.active,
.dot:hover {
    background: white;
    transform: scale(1.2);
}

/* ==========================================================================
   Cards
   ========================================================================== */
/* News Card */
.card-news {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-news:hover {
    transform: translateY(-10px);
}

.card-news-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.card-news:hover img {
    transform: scale(1.1);
}

.card-body {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    margin-bottom: 1rem;
}

.card-body h3 a {
    color: inherit;
}

.card-body h3 a:hover {
    color: var(--color-secondary);
}

.card-body p {
    flex: 1;
}

.card-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

.card-link::after {
    content: ' \2192';
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

/* Servizio Card */
.card-servizio {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.card-servizio-img {
    height: 200px;
    overflow: hidden;
}

.card-servizio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

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

.card-servizio-body {
    padding: 2rem;
}

/* ==========================================================================
   Events
   ========================================================================== */
.events-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: start;
}

.events-intro {
    max-width: 400px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-item {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.event-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.event-date {
    text-align: center;
    min-width: 80px;
}

.event-date span {
    display: block;
}

.event-day {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.event-month {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-secondary);
}

.event-info h4 {
    margin: 0 0 0.5rem;
}

.event-info h4 a {
    color: inherit;
}

.event-meta {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline {
    position: relative;
    padding: 4rem 0;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
    transform: translateX(-50%);
}

.timeline-item {
    width: 50%;
    padding: 2rem;
    position: relative;
    box-sizing: border-box;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    text-align: left;
}

.timeline-item:nth-child(odd) {
    text-align: right;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--color-secondary);
    border-radius: 50%;
    position: absolute;
    top: 2.5rem;
    left: 100%;
    transform: translateX(-50%);
    z-index: 2;
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: 0;
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-secondary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

/* ==========================================================================
   Stats / Numbers
   ========================================================================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.stat-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-card h2 {
    font-size: 3.5rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   Values / Pillars
   ========================================================================== */
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.value-item {
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.value-item:hover {
    border-color: var(--color-primary-soft);
    background: white;
    transform: translateY(-5px);
}

.value-icon {
    width: 50px;
    height: 50px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* ==========================================================================
   Team / Staff
   ========================================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.team-member {
    text-align: center;
}

.team-img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-bottom: 1.5rem;
    filter: grayscale(1);
    transition: var(--transition);
}

.team-member:hover .team-img {
    filter: grayscale(0);
}

.team-role {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin: 0;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   CTA Block
   ========================================================================== */
.cta-block {
    border-radius: var(--radius-lg);
    padding: 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-block--primary {
    background: var(--color-primary);
    color: white;
}

.cta-block--primary h2 {
    color: white;
    font-size: 3rem;
}

.cta-block--primary p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-cf {
    background: white;
    color: var(--color-primary);
    display: inline-block;
    padding: 1.5rem 3rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.cta-cf-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
}

.cta-cf-value {
    font-size: 1.8rem;
}

.cta-actions {
    margin-top: 1rem;
}

/* ==========================================================================
   Documents
   ========================================================================== */
.document-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    margin-bottom: 1rem;
}

.document-item:last-child {
    margin-bottom: 0;
}

.document-item:hover {
    box-shadow: var(--shadow-md);
}

.document-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.document-info {
    flex: 1;
}

.document-info h4 {
    margin: 0 0 0.25rem;
}

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

.document-category {
    margin-right: 1rem;
}

.document-download {
    flex-shrink: 0;
}

/* ==========================================================================
   Accordion
   ========================================================================== */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: var(--transition-fast);
}

.accordion-trigger:hover {
    background: var(--color-primary-light);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content[aria-hidden="false"] {
    max-height: 500px;
}

.accordion-body {
    padding: 0 2rem 2rem;
}

/* ==========================================================================
   Blocks
   ========================================================================== */
.block {
    padding: 4rem 0;
}

.block-title {
    text-align: center;
    margin-bottom: 3rem;
}

/* Text + Image Block */
.block-text-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.block-text-image--left .block-text-image-media {
    order: -1;
}

.block-text-image-media img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Quote Block */
.quote {
    border-left: 4px solid var(--color-secondary);
    padding-left: 2rem;
    margin: 0;
}

.quote-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.quote-author {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.quote-author::before {
    content: '\2014 ';
}

/* Gallery Block */
.gallery {
    display: grid;
    gap: 1.5rem;
}

.gallery--2-cols { grid-template-columns: repeat(2, 1fr); }
.gallery--3-cols { grid-template-columns: repeat(3, 1fr); }
.gallery--4-cols { grid-template-columns: repeat(4, 1fr); }

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.02);
}

.gallery-item figcaption {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* Cards Grid Block */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #1a332f;
    color: white;
    padding: 6rem 0 3rem;
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
}

.footer-grid--3cols {
    grid-template-columns: 2fr 1fr 1fr;
}

.footer-col--main {
    padding-right: 2rem;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-logo:hover {
    text-decoration: none;
    color: white;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    border-radius: 4px;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.footer-desc {
    opacity: 0.8;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-address {
    font-style: normal;
    font-size: 0.9rem;
}

.footer-address p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.footer-address svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.footer-address a {
    color: white;
    text-decoration: none;
}

.footer-address a:hover {
    text-decoration: underline;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Footer responsive */
@media (max-width: 992px) {
    .footer-grid--3cols {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col--main {
        grid-column: 1 / -1;
        padding-right: 0;
    }
}

@media (max-width: 576px) {
    .footer-grid--3cols {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 4rem 0 2rem;
    }

    .footer-grid {
        gap: 2.5rem;
    }
}

/* ==========================================================================
   News Detail
   ========================================================================== */
.breadcrumb {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary-soft);
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Section with breadcrumb - reduced top padding */
.section--with-breadcrumb {
    padding-top: 3rem;
}

/* Section with only header content - reduced bottom padding */
.section--header-only {
    padding-bottom: 4rem;
}

.section--header-only .page-header {
    margin-bottom: 0;
}

.news-header-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.news-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .mega-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline::before {
        left: 0;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        text-align: left !important;
        padding-left: 3rem;
    }

    .timeline-dot {
        left: 0 !important;
        transform: translateX(-50%);
    }

    .news-header-img {
        height: 300px;
    }

    .block-text-image-grid {
        grid-template-columns: 1fr;
    }

    .block-text-image--left .block-text-image-media {
        order: 0;
    }
}

@media (max-width: 768px) {
    .nav-main {
        display: none;
        position: fixed;
        top: 130px; /* 90px header + 40px topbar */
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: var(--shadow-md);
        gap: 0;
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-main.is-open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-item {
        width: 100%;
        height: auto;
        border-bottom: 1px solid var(--color-border);
        flex-shrink: 0;
        /* Override desktop flex - stack vertically like accordion */
        display: block;
    }

    .nav-item:last-child {
        border-bottom: none;
        /* Add padding at bottom for scroll spacing */
        padding-bottom: 2rem;
    }

    .nav-link {
        width: 100%;
        padding: 1.25rem 1.5rem;
        justify-content: space-between;
        font-size: 1rem;
        display: flex;
    }

    /* Mobile Dropdown */
    .has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        min-width: 100%;
        padding: 0;
        margin: 0;
        display: none;
        background: var(--color-primary-light);
    }

    .has-dropdown.is-open .dropdown-menu {
        display: block;
    }

    .has-dropdown .nav-chevron {
        transition: transform 0.3s ease;
    }

    .has-dropdown.is-open .nav-chevron {
        transform: rotate(180deg);
    }

    .dropdown-link {
        padding: 1rem 1.5rem;
    }

    .dropdown-link--header {
        display: none;
    }

    .dropdown-divider {
        display: none;
    }

    /* Mega menu mobile styles */
    .has-mega .mega-menu {
        position: static;
        opacity: 1;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        transition: max-height 0.4s ease, visibility 0.3s ease, padding 0.3s ease;
        background: var(--color-primary-light);
    }

    .has-mega.is-open .mega-menu {
        visibility: visible;
        max-height: 2000px;
        padding: 1rem 0 1.5rem;
    }

    .has-mega .nav-chevron {
        transition: transform 0.3s ease;
    }

    .has-mega.is-open .nav-chevron {
        transform: rotate(180deg);
    }

    .mega-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
        padding: 0.5rem 1.5rem;
    }

    .mega-col {
        min-width: 0;
    }

    .mega-col h5 {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        font-size: 0.7rem;
    }

    .mega-list li {
        margin-bottom: 0.6rem;
    }

    .mega-list a {
        font-size: 0.9rem;
        display: block;
        padding: 0.25rem 0;
    }

    .mega-promo {
        display: none;
    }

    .section {
        padding: 4rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .cta-block {
        padding: 3rem 2rem;
    }

    .cta-block--primary h2 {
        font-size: 2rem;
    }

    .hero-carousel {
        height: 60vh;
    }

    .gallery--3-cols,
    .gallery--4-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .document-icon {
        display: none;
    }

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

    .gallery--2-cols,
    .gallery--3-cols,
    .gallery--4-cols {
        grid-template-columns: 1fr;
    }

    .event-item {
        flex-direction: column;
        gap: 1rem;
    }

    .event-date {
        text-align: left;
    }

    /* Mobile menu: single column on very small screens */
    .mega-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .nav-link {
        padding: 1rem 1.25rem;
    }

    .dropdown-link {
        padding: 0.85rem 1.25rem;
    }
}

/* Body scroll lock when mobile menu is open */
body.nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ==========================================================================
   Additional Page Styles
   ========================================================================== */

/* Page Header */
.page-header {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.page-header h1 {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Hero Split (Chi Siamo) */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.hero-split-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-split-media {
    position: relative;
}

.hero-img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.hero-quote-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--color-accent);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.hero-quote-badge p {
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.2;
}

/* Hero Page (full width with background) */
.hero-page {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-page-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

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

.hero-page-content h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero-page-content .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Section Alt Background */
.section--alt {
    background: var(--color-primary-light);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(58, 90, 64, 0.1);
}

/* Custom Select */
.form-select-wrapper {
    position: relative;
}

.form-select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--color-primary);
    pointer-events: none;
    transition: var(--transition-fast);
}

.form-select-wrapper:focus-within::after {
    border-top-color: var(--color-primary-dark, #2d4a33);
}

.form-group select {
    width: 100%;
    padding: 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(58, 90, 64, 0.1);
}

.form-group select:hover {
    border-color: var(--color-primary-light);
}

.form-group select option {
    padding: 0.75rem 1rem;
    background-color: #fff;
}

.form-group select option:checked {
    background-color: var(--color-primary-light);
}

.form-group select option[value=""] {
    color: #999;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox input {
    width: auto;
    margin-top: 0.25rem;
}

.form-checkbox label {
    margin: 0;
    font-weight: 400;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.alert li {
    margin-bottom: 0.25rem;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-form-wrapper h2 {
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--color-primary-light);
    padding: 2rem;
    border-radius: var(--radius-md);
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.contact-card p {
    margin-bottom: 0.5rem;
}

.contact-card--highlight {
    background: var(--color-primary);
    color: white;
}

.contact-card--highlight h3 {
    color: white;
}

.contact-card--highlight .btn-primary {
    background: white;
    color: var(--color-primary);
}

.contact-card--highlight .btn-primary:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.contact-card--highlight p + a,
.contact-card--highlight p + .btn {
    margin-top: 2rem;
    display: inline-block;
}

/* Map */
.section--map {
    padding: 0;
}

.map-container {
    height: 450px;
    background: var(--color-border);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.map-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Features / Cards Grid
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    margin: 0;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Schedule / Timetable
   ========================================================================== */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.schedule-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary);
}

.schedule-time {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.schedule-item h4 {
    margin-bottom: 0.5rem;
}

.schedule-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.schedule-table {
    width: 100%;
    font-size: 0.9rem;
}

.schedule-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.schedule-table td:last-child {
    text-align: right;
    font-weight: 600;
}

/* ==========================================================================
   Pricing Cards
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card--featured {
    background: var(--color-primary);
    color: white;
}

.pricing-card--featured h3 {
    color: white;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #000;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-price {
    margin: 1.5rem 0;
}

.price-amount {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-secondary);
}

.pricing-card--featured .price-amount {
    color: white;
}

.price-amount::before {
    content: '\20AC';
    font-size: 1.5rem;
    vertical-align: super;
}

.price-period {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.pricing-card--featured .price-period {
    color: rgba(255, 255, 255, 0.7);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.pricing-features li::before {
    content: '\2713';
    color: var(--color-primary);
    margin-right: 0.75rem;
    font-weight: bold;
}

.pricing-card--featured .pricing-features li {
    border-color: rgba(255, 255, 255, 0.2);
}

.pricing-card--featured .pricing-features li::before {
    color: var(--color-accent);
}

/* ==========================================================================
   Eventi Cards (detailed)
   ========================================================================== */
.eventi-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.evento-card {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    align-items: flex-start;
}

.evento-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.evento-date-box {
    min-width: 80px;
    text-align: center;
    background: var(--color-primary-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.evento-day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.evento-month {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-secondary);
}

.evento-year {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.evento-content {
    flex: 1;
}

.evento-content h3 {
    margin-bottom: 0.5rem;
}

.evento-content h3 a {
    color: inherit;
}

.evento-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.evento-actions {
    align-self: center;
}

.evento-card--past {
    opacity: 0.7;
    padding: 1.5rem;
}

.evento-card--past .evento-date-box {
    background: var(--color-border);
}

.eventi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Evento Detail */
.evento-detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    align-items: start;
}

.evento-detail-img {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.evento-info-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.evento-info-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.evento-info-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.evento-info-value {
    font-weight: 600;
    color: var(--color-primary);
}

.evento-info-notice {
    background: var(--color-accent);
    color: #000;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 1rem 0;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar-card {
    background: var(--color-primary-light);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.sidebar-card h4 {
    margin-bottom: 1rem;
}

.sidebar-card--highlight {
    background: var(--color-primary);
    color: white;
}

.sidebar-card--highlight h4 {
    color: white;
}

.sidebar-staff {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-staff-member {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sidebar-staff-member img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-staff-member strong {
    display: block;
}

.sidebar-staff-member span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.related-list a {
    font-size: 0.9rem;
}

/* Newsletter Form */
.newsletter-form input {
    width: 100%;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.newsletter-form-inline {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form-inline input {
    flex: 1;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: none;
}

/* ==========================================================================
   Entry / Article Layout
   ========================================================================== */
.entry-layout,
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: start;
}

.entry-content,
.article-content {
    font-size: 1.1rem;
}

/* Prose content - headings spacing */
.prose h2,
.entry-content h2,
.article-content h2 {
    margin-top: 3rem;
}

.prose h3,
.entry-content h3,
.article-content h3 {
    margin-top: 2.5rem;
}

.prose > :first-child,
.entry-content > :first-child,
.article-content > :first-child {
    margin-top: 0;
}

.article-header {
    margin-bottom: 2rem;
}

.article-actions {
    display: flex;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

/* ==========================================================================
   Documents Filter
   ========================================================================== */
.documents-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--color-primary);
}

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

/* ==========================================================================
   Legal Content
   ========================================================================== */
.legal-content {
    max-width: 800px;
}

.legal-content h1 {
    margin-bottom: 0.5rem;
}

.legal-update {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.1rem;
    margin-top: 2rem;
}

.legal-content ul {
    margin-bottom: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content address {
    background: var(--color-primary-light);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.pagination-prev,
.pagination-next {
    font-weight: 600;
}

.pagination-prev[aria-disabled="true"],
.pagination-next[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-info {
    color: var(--color-text-muted);
}

/* ==========================================================================
   News Grid Variations
   ========================================================================== */
.news-grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* Servizi Grid */
.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* ==========================================================================
   Responsive Additions
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-quote-badge {
        position: static;
        margin-top: 1rem;
    }

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

    .entry-layout,
    .article-layout,
    .evento-detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section--with-breadcrumb {
        padding-top: 1.5rem;
    }

    .section--header-only {
        padding-bottom: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .evento-card {
        flex-direction: column;
        text-align: center;
    }

    .evento-date-box {
        align-self: center;
    }

    .evento-actions {
        width: 100%;
    }

    .newsletter-form-inline {
        flex-direction: column;
    }
}

/* ==========================================================================
   Eventi Passati (Accordion)
   ========================================================================== */
.section--muted {
    background: var(--color-primary-light);
}

.eventi-passati-accordion {
    border-radius: var(--radius-md);
}

.eventi-passati-toggle {
    cursor: pointer;
    list-style: none;
    padding: 1rem 0;
}

.eventi-passati-toggle::-webkit-details-marker {
    display: none;
}

.eventi-passati-toggle h2 {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.eventi-passati-toggle:hover h2 {
    color: var(--color-secondary);
}

.eventi-passati-accordion[open] .eventi-passati-toggle h2::after {
    content: '\25B2';
    font-size: 0.75rem;
}

.eventi-passati-accordion:not([open]) .eventi-passati-toggle h2::after {
    content: '\25BC';
    font-size: 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--color-secondary);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-main);
}

.tag--muted {
    background: var(--color-border);
    color: var(--color-text-muted);
}

.eventi-list--past {
    margin-top: 1.5rem;
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

/* Base animation class */
[data-animate] {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].is-visible {
    opacity: 1;
    transform: none !important;
}

/* Fade up */
[data-animate="fade-up"] {
    transform: translateY(40px);
}

/* Fade down */
[data-animate="fade-down"] {
    transform: translateY(-40px);
}

/* Fade left */
[data-animate="fade-left"] {
    transform: translateX(40px);
}

/* Fade right */
[data-animate="fade-right"] {
    transform: translateX(-40px);
}

/* Scale in */
[data-animate="scale-in"] {
    transform: scale(0.9);
}

/* Zoom in */
[data-animate="zoom-in"] {
    transform: scale(0.8);
}

/* Fade only */
[data-animate="fade"] {
    transform: none;
}

/* Animation delays using CSS custom property */
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate-delay="5"] { transition-delay: 0.5s; }
[data-animate-delay="6"] { transition-delay: 0.6s; }

/* Stagger children animations */
[data-animate-stagger] > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate-stagger].is-visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(7) { transition-delay: 0.7s; opacity: 1; transform: none; }
[data-animate-stagger].is-visible > *:nth-child(8) { transition-delay: 0.8s; opacity: 1; transform: none; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    [data-animate],
    [data-animate-stagger] > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

.evento-date-box--past {
    background: var(--color-border);
}

.evento-date-box--past .evento-day {
    color: var(--color-text-muted);
}

.evento-date-box--past .evento-month {
    color: var(--color-text-muted);
}

/* ==========================================================================
   Recensioni / Testimonials
   ========================================================================== */

.section--cream {
    background: linear-gradient(180deg, #f5f0e8 0%, #fef9f3 50%, #fdfbf7 100%);
    position: relative;
    margin-top: 0;
}

/* Decorative wave separator at top */
.section--cream::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23fdfbf7' d='M0,80 L0,40 Q360,0 720,40 T1440,40 L1440,80 Z'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    transform: translateY(-79px);
    pointer-events: none;
}

/* Top border line */
.section--cream::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.recensioni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

@media (min-width: 1024px) {
    .recensioni-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.recensione-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(93, 138, 130, 0.1);
}

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

.recensione-content {
    flex: 1;
    position: relative;
}

.recensione-quote {
    width: 40px;
    height: 40px;
    color: var(--color-primary-soft);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.recensione-text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
    margin: 0;
    font-style: italic;
}

.recensione-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.recensione-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recensione-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-primary);
}

.recensione-role {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: capitalize;
}

/* Decorative element */
.recensione-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-soft) 100%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    opacity: 0;
    transition: var(--transition);
}

.recensione-card:hover::before {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .recensioni-grid {
        grid-template-columns: 1fr;
    }

    .recensione-card {
        padding: 1.5rem;
    }

    .recensione-quote {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   Video Modal
   ========================================================================== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.video-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: rotate(90deg);
}

.video-modal-close svg {
    width: 24px;
    height: 24px;
    color: white;
}

.video-modal-content {
    width: 90vw;
    max-width: 1200px;
    aspect-ratio: 16/9;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-modal.is-open .video-modal-content {
    transform: scale(1);
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-md);
}

/* Hero Video Button */
.btn-video {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-video:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.btn-video svg {
    width: 20px;
    height: 20px;
}

/* Pulsante Download nel hero */
.hero-actions .btn-download {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-actions .btn-download:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    color: white;
}

.hero-actions .btn-download svg {
    flex-shrink: 0;
}

.slide-content .hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Video Section (Sezione Video Presentazione)
   ========================================================================== */
.section--video {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d4a33 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.section--video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.video-section-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.video-section-content .tag {
    background: var(--color-accent);
    color: #000;
}

.video-section-content h2 {
    color: white;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.video-section-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.video-embed-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    aspect-ratio: 16/9;
    background: #000;
}

.video-embed-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video thumbnail with play button overlay */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.video-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.video-play-btn svg {
    width: 32px;
    height: 32px;
    color: #000;
    margin-left: 4px;
}

.video-thumbnail:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .video-section-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .video-section-content {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .video-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .video-modal-close svg {
        width: 20px;
        height: 20px;
    }

    .video-play-btn {
        width: 60px;
        height: 60px;
    }

    .video-play-btn svg {
        width: 24px;
        height: 24px;
    }
}
