/* ==========================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================== */
:root {
    --primary: #0099cc;
    --primary-hover: #0077a3;
    --primary-light: #e6f5fa;
    --secondary: #ffd700;
    --secondary-hover: #e6c200;
    --secondary-light: #fffbeb;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text: #334155;
    --text-muted: #64748b;
    --danger: #ef4444;
    --success: #10b981;
    
    --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-brand: 'Plus Jakarta Sans', 'Montserrat', system-ui, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   BASE STYLES
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
}

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

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.section-padding {
    padding: 6rem 0;
}

.text-center { text-align: center; }
.flex { display: flex; }
.grid { display: grid; }
.relative { position: relative; }
.hidden { display: none; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3.5rem auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--dark);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 215, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

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

.btn-dark:hover {
    background-color: var(--dark-light);
    transform: translateY(-2px);
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

/* Top Bar */
.topbar {
    background-color: var(--dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.topbar .container,
.topbar-wrapper {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.topbar-info {
    display: flex;
    gap: 1.5rem;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-item a:hover {
    color: var(--secondary);
}

.topbar-socials {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.social-link:hover {
    opacity: 1;
    color: var(--secondary);
    transform: translateY(-1px);
}

/* Custom Social Media Styling (Official Palette: #0099CC & #FCE01D) */
.topbar-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #0099CC;
    color: #ffffff;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.25s ease;
}

.topbar-social-btn:hover {
    background-color: #FCE01D;
    color: #0099CC;
    border-color: #0099CC;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(252, 224, 29, 0.4);
}

.social-custom-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 0.95rem;
    background-color: var(--white);
    border: 1.5px solid rgba(0, 153, 204, 0.2);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--dark);
    transition: all 0.25s ease;
}

.social-custom-btn:hover {
    background-color: rgba(0, 153, 204, 0.05);
    border-color: #FCE01D;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 153, 204, 0.12);
}

.social-custom-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #0099CC;
    color: #ffffff;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.social-custom-btn:hover .social-custom-icon {
    background-color: #FCE01D;
    color: #0099CC;
    border-color: #0099CC;
    transform: scale(1.08);
}

.social-custom-text {
    display: flex;
    flex-direction: column;
}

.social-custom-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0099CC;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.social-custom-btn:hover .social-custom-title {
    color: #007799;
}

.social-custom-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Main Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

header.scrolled .navbar {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar .container,
.navbar-wrapper {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
    margin-right: 2.5rem;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    border-radius: 0 !important;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap;
}

.logo-title {
    font-family: var(--font-brand);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
    line-height: 1.15;
}

.logo-subtitle {
    font-family: var(--font-brand);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.22em;
    margin-top: 0.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    list-style: none;
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

/* Hamburg Menu */
.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    outline: none;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    min-height: 80vh;
    padding: 12rem 0 7rem 0;
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.45)), url('./assets/hero_bg.jpg');
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: scroll !important;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(transparent, var(--light));
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-title span {
    color: var(--secondary);
}

.hero-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

/* ==========================================
   SERVIZI SECTION
   ========================================== */
.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12), 0 10px 10px rgba(0,0,0,0.08);
    border-color: transparent;
    z-index: 10;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.service-icon span {
    font-size: 1.8rem;
    line-height: 1;
    display: block;
}

.service-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    display: block;
    transition: var(--transition);
}

.service-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-link {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link i {
    transition: var(--transition);
}

.service-card:hover .service-link i {
    transform: translateX(4px);
}

/* ==========================================
   ALERT BANNER (PRENOTAZIONE TRASPORTI)
   ========================================== */
.alert-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.alert-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-full);
    pointer-events: none;
}

.banner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    z-index: 1;
    position: relative;
}

.banner-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.banner-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.banner-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.banner-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.emergency-btn {
    background-color: var(--secondary);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.emergency-btn:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

.banner-warning {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    max-width: 650px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fca5a5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ==========================================
   CHI SIAMO SECTION
   ========================================== */
.about-section {
    background-color: var(--white);
}

.governance-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.governance-card {
    background-color: var(--light);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.governance-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12), 0 10px 10px rgba(0,0,0,0.08);
    border-color: rgba(0, 153, 204, 0.4);
    z-index: 10;
}

.avatar-container {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 153, 204, 0.1);
}

.governance-card:hover .avatar-container {
    background-color: var(--primary);
    color: var(--white);
    transform: scale(1.05);
    transition: var(--transition);
}

.gov-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.gov-role {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

/* ==========================================
   INTERACTIVE FORMS (RICHIEDI SERVIZIO / VOLONTARIATO)
   ========================================== */
.form-section {
    background-color: var(--light);
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3.5rem;
    align-items: start;
}

.form-info-side {
    padding-right: 1rem;
}

.form-container {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background-color: var(--light);
    color: var(--dark);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 153, 204, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    user-select: none;
}

.checkbox-label:hover {
    background: rgba(0, 153, 204, 0.05);
    border-color: var(--primary);
}

.volunteers-section .checkbox-label {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.volunteers-section .checkbox-label:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--secondary);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    accent-color: var(--secondary);
}

.form-warning {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #991b1b;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Success Message Overlay */
.form-success-message {
    display: none;
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 0.5s ease-out;
}

.success-icon-wrapper {
    width: 70px;
    height: 70px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.submit-btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   DIVENTA VOLONTARIO SECTION
   ========================================== */
.volunteers-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
}

.volunteers-section .section-title {
    color: var(--white);
}

.volunteers-section .section-title span {
    color: var(--secondary);
}

.volunteers-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.volunteers-section .form-container {
    background-color: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.volunteers-section label {
    color: rgba(255, 255, 255, 0.9);
}

.volunteers-section .form-control {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.volunteers-section .form-control:focus {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
}

/* ==========================================
   CONTACTS & MAPS
   ========================================== */
.contacts-section {
    background-color: var(--white);
}

.contacts-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem;
    align-items: stretch;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-card-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-detail-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background-color: var(--light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contact-detail-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(0, 153, 204, 0.4);
    background-color: var(--white);
    box-shadow: 0 14px 28px rgba(0,0,0,0.10), 0 8px 8px rgba(0,0,0,0.06);
    z-index: 10;
}

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

.contact-card-icon span {
    font-size: 1.6rem;
    line-height: 1;
    display: block;
}

.contact-card-body h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.contact-card-body p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.contact-card-body a:hover {
    color: var(--primary);
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    height: 100%;
    min-height: 400px;
}

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

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background-color: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 2rem 0;
    border-top: 4px solid var(--primary);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    font-size: 0.95rem;
}

.footer-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.95rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer-contact-item i {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.footer-contact-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-item a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ==========================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================== */
@media (max-width: 1200px) {
    html { font-size: 15px; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .footer-brand { grid-column: span 2; }
}

@media (max-width: 1200px) {
    .section-padding { padding: 4rem 0; }
    
    .topbar { display: none; }
    
    .navbar { padding: 0.75rem 0; }
    header.scrolled .navbar { padding: 0.75rem 0; }
    
    .menu-btn { display: block; }
    
    .nav-links {
        position: fixed;
        top: 84px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 84px);
        background-color: var(--white);
        flex-direction: column;
        padding: 3rem 1.5rem;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
    }

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

    .hero {
        padding: 10rem 0 5rem 0;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .form-grid {
        gap: 2.5rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .hero-title { font-size: 2.25rem; }
    .form-group-grid { grid-template-columns: 1fr; gap: 0; }
    .form-group.full-width { grid-column: span 1; }
    .checkbox-group { grid-template-columns: 1fr; }
}

/* ==========================================
   PAGE HEADER (SUBPAGES)
   ========================================== */
.page-header {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('./assets/hero_bg.jpg');
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: scroll !important;
    padding: 10rem 0 5rem 0;
    color: var(--white);
    text-align: center;
}
.page-header h1 {
    color: var(--white);
    font-size: 2.75rem;
    font-weight: 800;
}
.services-detail-section {
    background-color: var(--white);
}
.service-detail-item {
    margin-bottom: 5rem;
}
.service-detail-item:last-child {
    margin-bottom: 0;
}
.service-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.service-detail-icon span {
    font-size: 2.1rem;
    line-height: 1;
    display: block;
}

/* Responsive adjustment for desktop navigation links on medium sized screens */
@media (min-width: 1201px) and (max-width: 1360px) {
    .navbar .container,
    .topbar .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    .logo-container {
        margin-right: 1.5rem;
    }
    .nav-links {
        gap: 0.85rem;
    }
    .nav-link {
        font-size: 0.8rem;
    }
    .logo-title {
        font-size: 1.35rem;
        letter-spacing: 0.04em;
    }
    .logo-subtitle {
        font-size: 0.78rem;
        letter-spacing: 0.20em;
    }
    .logo-img {
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 768px) {
    .logo-title {
        font-size: 1.25rem;
        letter-spacing: 0.04em;
    }
    .logo-subtitle {
        font-size: 0.72rem;
        letter-spacing: 0.18em;
    }
}

/* ==========================================
   INTERACTIVE NAVIGATION & ANIMATIONS
   ========================================== */

.page {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.45s ease-out, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    padding-top: 10rem;
    padding-bottom: 5rem;
}

.page.active {
    display: block;
}

.page.active.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   STAGGER ANIMATION FOR INNER ELEMENTS
   ========================================== */
@keyframes slideUpDolce {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animazione sugli elementi interni delle .page */
.page.active.show .card,
.page.active.show .trasparenza-column,
.page.active.show .service-card,
.page.active.show .contact-card-list,
.page.active.show .governance-card {
    animation: slideUpDolce 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Effetto stagger per le colonne trasparenza */
.page.active.show .trasparenza-column:nth-child(1) { animation-delay: 0.1s; }
.page.active.show .trasparenza-column:nth-child(2) { animation-delay: 0.2s; }
.page.active.show .trasparenza-column:nth-child(3) { animation-delay: 0.3s; }
.page.active.show .trasparenza-column:nth-child(4) { animation-delay: 0.4s; }

/* Effetto stagger per service-card nelle .page */
.page.active.show .service-card:nth-child(1) { animation-delay: 0.05s; }
.page.active.show .service-card:nth-child(2) { animation-delay: 0.15s; }
.page.active.show .service-card:nth-child(3) { animation-delay: 0.25s; }
.page.active.show .service-card:nth-child(4) { animation-delay: 0.35s; }

.navbar {
    transition: padding 0.3s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.navbar .logo-img {
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out;
}

.navbar.scrolled-nav {
    padding: 0.4rem 0 !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.navbar.scrolled-nav .logo-img {
    width: 48px !important;
    height: 48px !important;
}

/* ==========================================
   GENERIC CARD HOVER — effetto pop-up uniforme
   ========================================== */

/* Base: transizione fluida per tutte le card generiche */
.card {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Hover generico: si alza e proietta ombra profonda */
.card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 14px 28px rgba(0,0,0,0.10), 0 8px 10px rgba(0,0,0,0.07);
    z-index: 10;
}

/* Colonne trasparenza: stesso effetto, scala ridotta per layout a 2 colonne */
.trasparenza-column {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s ease;
    position: relative;
    z-index: 1;
}

.trasparenza-column:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 14px 28px rgba(0,0,0,0.10), 0 8px 10px rgba(0,0,0,0.07);
    border-color: rgba(0, 153, 204, 0.35) !important;
    z-index: 10;
}

/* ==========================================
   SOSTIENICI / 5X1000 RESPONSIVE STYLES
   ========================================== */
.grid-sostienici,
.donazioni-container,
.cinque-per-mille-grid,
.row-sostienici {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.iban-box, .cf-box, .codice-fiscale, .iban {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    font-size: clamp(1rem, 4vw, 1.4rem) !important;
    text-align: center !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.codice-fiscale {
    font-size: clamp(1.4rem, 5vw, 2.2rem) !important;
}

@media (max-width: 768px) {
    .donazioni-container, 
    .grid-sostienici, 
    .row-sostienici,
    .cinque-per-mille-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 20px !important;
        padding: 0 10px !important;
    }
    .card, .box-donazione {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================
   ENHANCED TRANSPORT FORM STYLES
   ========================================== */
.form-section-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.form-section-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.form-section-card-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    font-family: var(--font-display);
    margin: 0;
}

.form-section-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.radio-group-wrapper {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
    background: var(--light);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: rgba(0, 153, 204, 0.4);
}

@media (max-width: 768px) {
    .form-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    .form-section-card {
        padding: 1.25rem 1rem !important;
    }
}

/* ==========================================
   LINK UTILI SECTION & CARDS
   ========================================== */
.link-utili-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 900px) {
    .link-utili-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

.link-utili-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.link-utili-card .card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.link-utili-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-utili-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark);
    font-family: var(--font-display);
    margin: 0;
}

.link-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    background-color: var(--light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.25s ease;
}

.link-item:hover {
    background-color: rgba(0, 153, 204, 0.08);
    border-color: rgba(0, 153, 204, 0.3);
    color: var(--primary);
    transform: translateX(4px);
}

.link-item .link-icon-arrow {
    color: var(--primary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.link-item:hover .link-icon-arrow {
    transform: translate(2px, -2px);
}




/* ==========================================
   TRANSIZIONI & ANIMAZIONI GLOBALI DI PAGINA/SEZIONE (UNIFORMI ALLA HOME)
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in,
.section-active,
.tab-section.active-section,
.tab-section.section-entered,
.page.active.show,
main,
.page-header .container,
.hero-content,
.alpha-hero-grid,
.service-detail-item,
.organigramma-grid,
.governance-grid,
.form-grid {
    animation: fadeIn 1s ease-out forwards;
    will-change: opacity, transform;
}

/* ==========================================
   VANILLA COOKIECONSENT V3 THEME INTEGRATION
   ========================================== */
#cc-main {
    --cc-font-family: var(--font-sans);
    --cc-btn-primary-bg: #0099cc;
    --cc-btn-primary-hover-bg: #0077a3;
    --cc-btn-primary-color: #ffffff;
    --cc-btn-secondary-bg: #e2e8f0;
    --cc-btn-secondary-hover-bg: #cbd5e1;
    --cc-btn-secondary-color: #0f172a;
    --cc-toggle-on-bg: #0099cc;
}