/* ============================================================
   style.css — Centro Diagnostico Latorre
   Stili condivisi da tutte le pagine
   ============================================================ */

/* --- 1. GOOGLE FONTS & VARIABILI --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --primary-blue: #1F2A44;
    --accent-cyan: #009CDF;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --text-dark: #333333;
    --text-light: #666666;
}

/* --- 2. RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

a { text-decoration: none; transition: color 0.3s, background 0.3s, transform 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- 3. TOP BAR --- */
.top-bar {
    background-color: var(--primary-blue);
    color: var(--white);
    font-size: 0.82rem;
    padding: 9px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.contact-info i { margin-right: 6px; color: var(--accent-cyan); }
.contact-info span { margin-right: 20px; }
.top-bar a { color: var(--white); }
.top-bar a:hover { color: var(--accent-cyan); }

/* --- 4. HEADER & NAVBAR --- */
header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%;
    height: 85px;
}

.logo img { max-height: 60px; width: auto; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    padding-bottom: 4px;
}

/* Sottolineatura animata al hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--accent-cyan); }
.nav-link.active { color: var(--accent-cyan); }

/* Bottone Prenota */
.btn-prenota {
    background-color: var(--accent-cyan);
    color: var(--white) !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: 2px solid var(--accent-cyan);
    white-space: nowrap;
}
.btn-prenota::after { display: none !important; }
.btn-prenota:hover {
    background-color: transparent;
    color: var(--accent-cyan) !important;
}

/* --- 5. HAMBURGER --- */
.hamburger { display: none; cursor: pointer; }
.bar {
    display: block; width: 25px; height: 3px;
    margin: 5px auto; transition: all 0.35s ease-in-out;
    background-color: var(--primary-blue);
    border-radius: 2px;
}
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- 6. PAGE HERO (pagine interne) --- */
.page-hero {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(31,42,68,0.82), rgba(0,156,223,0.45));
}
.page-hero-content {
    position: relative; z-index: 1;
    color: var(--white);
    padding: 0 20px;
}
.page-hero-content h1 { font-size: 3rem; font-weight: 700; margin-bottom: 12px; line-height: 1.15; }
.page-hero-content p { font-size: 1.1rem; opacity: 0.9; }

/* --- 7. SECTION HEADER --- */
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { color: var(--primary-blue); font-size: 2.4rem; margin-bottom: 12px; }
.section-header p { color: var(--text-light); font-size: 1rem; max-width: 600px; margin: 0 auto; }
.divider {
    height: 4px; width: 70px;
    background: linear-gradient(90deg, var(--accent-cyan), #0076b0);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- 8. CTA SECTION --- */
.cta-section {
    background-color: var(--primary-blue);
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    color: var(--white);
    padding: 80px 5%;
    text-align: center;
}
.cta-section h2 { font-size: 2.2rem; }
.cta-section p { margin-top: 15px; font-size: 1.05rem; opacity: 0.88; }

.btn-white {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 14px 38px;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 28px;
    font-size: 1rem;
    border: 2px solid var(--white);
    transition: all 0.3s;
}
.btn-white:hover { background-color: var(--accent-cyan); border-color: var(--accent-cyan); color: var(--white); }

/* --- 9. STATS STRIP --- */
.stats-strip {
    background: var(--primary-blue);
    padding: 50px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item { color: var(--white); }
.stat-number {
    font-size: 3rem; font-weight: 700;
    color: var(--accent-cyan); line-height: 1;
    display: block; margin-bottom: 8px;
}
.stat-label { font-size: 0.88rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; }

/* --- 10. FOOTER --- */
footer {
    background-color: #151b2b;
    color: #a0a8b8;
    padding: 60px 5% 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
footer h4 {
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-cyan);
    display: inline-block;
}
footer ul li { margin-bottom: 10px; }
footer ul li a, footer ul li { color: #a0a8b8; font-size: 0.9rem; }
footer ul li a:hover { color: var(--accent-cyan); padding-left: 4px; }
footer ul li i { margin-right: 8px; color: var(--accent-cyan); width: 16px; }
.footer-bottom {
    text-align: center;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    color: #666e7e;
}

/* --- 11. WHATSAPP FLOAT --- */
.whatsapp-float {
    position: fixed;
    width: 58px; height: 58px;
    bottom: 38px; right: 38px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(37,211,102,0.45);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.whatsapp-float:hover { background-color: #128C7E; transform: scale(1.12); color: #fff; }

/* --- 12. COOKIE BANNER --- */
.cookie-banner.nascosto { display: none !important; }
.cookie-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(21, 27, 43, 0.97);
    color: var(--white);
    padding: 14px 5%;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-shadow: 0 -3px 20px rgba(0,0,0,0.25);
    font-size: 0.88rem;
    backdrop-filter: blur(8px);
}
.btn-cookie {
    background-color: var(--accent-cyan);
    color: white; border: none;
    padding: 9px 22px; border-radius: 6px;
    cursor: pointer; font-weight: 700;
    white-space: nowrap; transition: background 0.3s;
    font-family: inherit; font-size: 0.88rem;
}
.btn-cookie:hover { background-color: #0076b0; }

/* --- 13. SERVICE CARDS (homepage) --- */
.services-section { padding: 80px 5%; background: var(--light-gray); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 0;
}
@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .services-grid { grid-template-columns: 1fr; }
}
.service-card {
    background: var(--white);
    padding: 38px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--accent-cyan);
    text-align: center;
    display: block;
    color: inherit;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.icon-box { font-size: 2.4rem; color: var(--accent-cyan); margin-bottom: 18px; }
.service-card h3 { color: var(--primary-blue); font-size: 1.25rem; margin-bottom: 12px; }
.service-card p { color: var(--text-light); font-size: 0.92rem; }

/* --- 14. MAP SECTION --- */
.map-section iframe { display: block; width: 100%; height: 400px; border: 0; }

/* --- 15. RESPONSIVE --- */
@media (max-width: 900px) {
    .hamburger { display: block; }
    .nav-menu {
        position: fixed; top: 85px; left: -100%; width: 100%;
        background: var(--white);
        flex-direction: column; gap: 0;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        transition: left 0.35s ease;
        padding: 20px 0 30px;
        z-index: 999;
    }
    .nav-menu.active { left: 0; }
    .nav-menu li { width: 100%; text-align: center; }
    .nav-link { display: block; padding: 14px 20px; font-size: 0.95rem; }
    .btn-prenota { margin: 10px auto 0; display: inline-block; }
    .nav-link::after { display: none; }
}

@media (max-width: 768px) {
    .top-bar { font-size: 0.78rem; flex-direction: column; text-align: center; gap: 5px; }
    .page-hero-content h1 { font-size: 2.1rem; }
    .section-header h2 { font-size: 1.9rem; }
    .stat-number { font-size: 2.4rem; }
    .cookie-banner { flex-direction: column; text-align: center; }
    .btn-cookie { width: 100%; }
    .cta-section h2 { font-size: 1.8rem; }
    .whatsapp-float { bottom: 20px; right: 20px; width: 52px; height: 52px; font-size: 24px; }
}

/* --- 16. NAV DROPDOWN --- */
.nav-dropdown { position: relative; }
.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 12px;
}
.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 230px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 8px 0;
    z-index: 1001;
    border-top: 3px solid var(--accent-cyan);
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu li { width: 100%; text-align: left; }
.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 11px 20px;
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
}
.nav-dropdown .dropdown-menu a:hover {
    background: var(--light-gray);
    color: var(--accent-cyan);
    padding-left: 26px;
}
.nav-dropdown .dropdown-menu a::after { display: none; }
@media (max-width: 900px) {
    .nav-dropdown .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        border-left: 3px solid var(--accent-cyan);
        margin: 0 0 0 20px;
        display: none;
        min-width: unset;
        padding: 4px 0;
    }
    .nav-dropdown .dropdown-menu.open { display: block; }
    .nav-dropdown .dropdown-menu a { padding: 10px 16px; }
}

