/* ==========================================================================
   Variabili CSS & Reset
   ========================================================================== */
   :root {
    /* Colori Istituzionali */
    --primary-color: #004b9b; /* Blu Gianni Selmi */
    --secondary-color: #fdb927; /* Arancione/Oro Gianni Selmi */
    
    /* Colori Testo e Sfondo - Tema Scuro/Blu */
    --bg-main: #004b9b;
    --bg-alt: #003a7a;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);
    --bg-white: #ffffff;
    
    /* Tipografia */
    --font-primary: 'Inter', sans-serif;
    
    /* Spaziature */
    --section-padding: 5rem 0;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

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

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

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

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

a:hover {
    color: #fff;
}

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

ul {
    list-style: none;
}

/* ==========================================================================
   Animazioni Scroll
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ==========================================================================
   Layout Base & Utilities
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-alt);
}

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

.section-header {
    margin-bottom: 3rem;
}

.section-header .subtitle {
    display: block;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #ffffff;
    line-height: 1.2;
}

/* Pulsanti */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-color: #e5a015;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   Header & Navigazione
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 75, 155, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all var(--transition-speed);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Rende il logo bianco */
}

.nav-menu {
    display: none;
}

.nav-menu ul {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffffff;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.header-cta {
    display: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--secondary-color);
    border-radius: 3px;
    transition: all var(--transition-speed);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-alt);
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    z-index: 999;
    padding-top: 100px;
    transition: right var(--transition-speed);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
}

.mobile-nav a.mobile-link {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    display: block;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding-top: 80px; 
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 75, 155, 0.95) 0%, rgba(0, 75, 155, 0.6) 100%);
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-content .slogan {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
}

/* ==========================================================================
   Chi Siamo Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 8px solid var(--bg-main);
    transform: scale(0.8);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.experience-badge .number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   Servizi Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    background-color: rgba(255, 255, 255, 0.08);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(253, 185, 39, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   Dove Siamo Section
   ========================================================================== */
.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.info-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(253, 185, 39, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
}

.info-highlight svg {
    color: var(--secondary-color);
    flex-shrink: 0;
}

.info-highlight p {
    margin: 0;
    color: #ffffff;
}

.contact-details {
    margin-bottom: 2.5rem;
}

.contact-item {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.contact-item strong {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item span,
.contact-item a {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 500;
}

.location-map {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #00224d;
    color: rgba(255,255,255,0.7);
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.footer h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

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

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul a {
    color: rgba(255,255,255,0.7);
}

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

.footer-bottom {
    background-color: #001127;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Media Queries (Desktop)
   ========================================================================== */
@media (min-width: 768px) {
    .section-header h2 {
        font-size: 3rem;
    }
    
    .hero-content h1 {
        font-size: 4.5rem;
    }

    .hero-overlay {
        background: linear-gradient(to right, rgba(0, 75, 155, 0.9) 0%, rgba(0, 75, 155, 0.7) 50%, rgba(0, 75, 155, 0) 100%);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .experience-badge {
        bottom: 20px;
        right: 20px;
        transform: scale(1);
    }
}

@media (min-width: 992px) {
    .nav-menu {
        display: block;
    }

    .header-cta {
        display: block;
    }

    .mobile-menu-btn {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .location-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }

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