/* =========================================
   FONT IN LOCALE (Inter e Poppins)
   ========================================= */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('inter-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('inter-medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('inter-semibold.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('poppins-semibold.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('poppins-bold.woff2') format('woff2');
}

/* =========================================
   RESET E VARIABILI
   ========================================= */
:root {
    --primary-color: #0A2540; 
    --secondary-color: #0070F3;
    --accent-color: #FF5A00; 
    --text-dark: #1A1F36;
    --text-body: #4A5568;
    --bg-light: #F7FAFC;
    --max-width: 1200px;
    --radius: 12px; 
}

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

/* =========================================
   BASE E TIPOGRAFIA
   ========================================= */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; 
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* === TESTO P 18px MOBILE E DESKTOP === */
p {
    font-size: 18px !important;
    line-height: 1.7;
    color: var(--text-body);
    margin-bottom: 15px;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    line-height: 1.3;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* =========================================
   UTILITY CLASSES
   ========================================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--primary-color); color: white; }
.text-center { text-align: center; }
.section-desc { max-width: 700px; margin: 0 auto 40px auto; }
.divider { border: 0; height: 1px; background: #e2e8f0; margin: 40px 0; }

/* =========================================
   HEADER GLASSMORPHISM
   ========================================= */
#main-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 85px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

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

.menu { display: flex; align-items: center; gap: 30px; }
.menu li a { font-weight: 500; font-size: 1rem; color: var(--primary-color); }
.menu li a:hover { color: var(--secondary-color); }

/* HAMBURGER MENU */
.hamburger { display: none; cursor: pointer; }
.hamburger span {
    display: block; width: 25px; height: 3px; background: var(--primary-color); margin: 5px 0; transition: 0.3s;
}

/* =========================================
   BOTTONI PREMIUM
   ========================================= */
.btn-cta, .btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-cta, .btn-primary {
    background: var(--accent-color);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.3);
}

.btn-cta:hover, .btn-primary:hover { 
    background: #E04D00; 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 0, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid white;
    color: white;
}
.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.9), rgba(0, 112, 243, 0.8)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 85vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: 100px 0;
}

.hero-content h1 { font-size: 3.5rem; margin-bottom: 24px; color: white; }
.hero-content p.subtitle { color: rgba(255,255,255,0.9); font-size: 1.25rem !important; max-width: 800px; margin: 0 auto 40px auto; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* =========================================
   SEZIONE CHI SIAMO E IMMAGINI
   ========================================= */
.row { display: flex; gap: 60px; align-items: center; }
.col-text, .col-img { flex: 1; }

.tech-figure { position: relative; }
.tech-figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}
.tech-figure:hover img { transform: scale(1.02); }

.tech-figure figcaption {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-check {
    background: #10B981;
    color: white;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* =========================================
   GRID SERVIZI E CARDS
   ========================================= */
.grid-servizi {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

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

.card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.card h3 { color: var(--secondary-color); margin-bottom: 15px; font-size: 1.4rem;}

/* =========================================
   LOCAL SEO E ZONE
   ========================================= */
.zone-list {
    margin-top: 40px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
}
.zone-list span {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
}

.local-block {
    margin-bottom: 40px; padding: 40px; background: white;
    border-left: 6px solid var(--secondary-color);
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.local-block h2 { font-size: 1.8rem; margin-bottom: 20px; }

/* =========================================
   TITOLI SEZIONE DETTAGLIO PROVINCE
   ========================================= */
#dettaglio-province h3 {
    font-size: 1.8rem; 
    margin-bottom: 20px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #dettaglio-province h3 {
        font-size: 1.5rem; 
    }
}

/* =========================================
   TITOLI NELLE SEZIONI SCURE
   ========================================= */
.bg-dark h1, 
.bg-dark h2, 
.bg-dark h3, 
.bg-dark h4 {
    color: #ffffff;
}

/* =========================================
   FAQ ACCORDION
   ========================================= */
.faq-grid { max-width: 800px; margin: 40px auto 0; }
.faq-item {
    background: white; margin-bottom: 20px; border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #edf2f7;
}
.faq-item summary {
    padding: 24px; font-weight: 600; cursor: pointer; list-style: none; position: relative; color: var(--primary-color); font-size: 1.1rem;
}
.faq-item summary::after {
    content: '+'; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; color: var(--secondary-color); transition: 0.3s;
}
.faq-item[open] summary::after { content: '−'; transform: translateY(-50%) rotate(180deg); }
.faq-content { padding: 0 24px 24px 24px; }
.faq-item summary::-webkit-details-marker { display: none; }

/* =========================================
   ANIMAZIONI SCROLL (Controllate via JS)
   ========================================= */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   FOOTER PREMIUM
   ========================================= */
#main-footer {
    background-color: var(--primary-color);
    color: #A0AEC0;
    padding-top: 80px;
    margin-top: 80px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

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

.footer-col p {
    font-size: 15px !important;
    color: #A0AEC0;
    line-height: 1.6;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: #A0AEC0;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 15px;
}
.footer-links a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.contact-info p { margin-bottom: 12px; }
.contact-info a { color: #ffffff; font-weight: 500; }
.contact-info a:hover { color: var(--secondary-color); }

.copyright-bar {
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #A0AEC0;
}
.copyright-bar a { color: #A0AEC0; margin: 0 5px; transition: 0.3s; }
.copyright-bar a:hover { color: #ffffff; }

.copyright-bar p {
    color: #A0AEC0 !important;
}

/* =========================================
   RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 992px) {
    .row { flex-direction: column; gap: 40px;}
    .tech-figure figcaption { bottom: 20px; right: 20px; left: 20px; justify-content: center; }
}

@media (max-width: 768px) {
    .menu {
        display: flex; position: absolute; top: 85px; left: -100%; width: 100%;
        background: rgba(255,255,255,0.98); backdrop-filter: blur(10px);
        flex-direction: column; padding: 30px 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: left 0.3s ease;
    }
    .menu.active { left: 0; }
    .hamburger { display: block; }
    
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-content h1 { font-size: 2.2rem; }
    .hero { padding: 60px 0; }
    .btn-cta, .btn-primary, .btn-secondary { width: 100%; }
    .local-block { padding: 25px; }

    #main-footer { padding-top: 50px; margin-top: 50px; }
    .footer-grid { gap: 30px; text-align: left; }
}