/* ═══════════════════════════════════════
   RIMESSAGGIO LA MANDRIA – style.css
   Mobile-first · Blu & Bianco
═══════════════════════════════════════ */

:root {
    --blue-dark: #0d2b5e;
    --blue-mid: #1a4b8c;
    --blue-bright: #2563eb;
    --blue-light: #dbeafe;
    --blue-xlight: #eff6ff;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --wa-green: #25d366;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(13, 43, 94, .12);
    --transition: .25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ─── HEADER ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blue-dark);
    box-shadow: 0 2px 16px rgba(0, 0, 0, .3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    background: var(--white);
    border-radius: 12px;
    padding: 6px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

/* Nav */
.nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    padding: 12px 0 20px;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.nav.open {
    display: flex;
}

.nav a {
    color: rgba(255, 255, 255, .9);
    padding: 10px 24px;
    font-size: .95rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--white);
}

.nav-cta {
    margin: 8px 20px 0;
    background: var(--blue-bright);
    color: var(--white) !important;
    border-radius: 8px;
    text-align: center;
    padding: 10px 20px !important;
}

/* Burger */
.burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
    .burger {
        display: none;
    }

    .nav {
        display: flex !important;
        flex-direction: row;
        position: static;
        background: none;
        padding: 0;
        border-top: none;
        gap: 4px;
        align-items: center;
    }

    .nav a {
        padding: 8px 14px;
        border-radius: 8px;
        font-size: .9rem;
    }

    .nav-cta {
        margin: 0 !important;
    }
}

/* ─── HERO ─── */
.hero {
    position: relative;
    min-height: 88vh;
    background: url('img/RimessaggioLamandria3.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(13, 43, 94, .78) 0%, rgba(26, 75, 140, .55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 24px;
    max-width: 680px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--white);
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50px;
    padding: 5px 18px;
    margin-bottom: 14px;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-content p {
    color: rgba(255, 255, 255, .88);
    font-size: clamp(.95rem, 2.5vw, 1.15rem);
    margin-bottom: 32px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.btn-primary {
    background: var(--white);
    color: var(--blue-dark);
}

.btn-whatsapp {
    background: var(--wa-green);
    color: var(--white);
}

/* ─── SECTIONS ─── */
.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--gray-100);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--blue-dark);
    text-align: center;
    margin-bottom: 8px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--blue-bright);
    border-radius: 2px;
    margin: 10px auto 0;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    font-size: .95rem;
    margin-bottom: 36px;
}

.sub-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue-dark);
    text-align: center;
    margin: 40px 0 20px;
}

/* ─── CHI SIAMO ─── */
.chi-siamo-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 36px;
}

.chi-siamo-text p {
    margin-bottom: 14px;
    color: var(--gray-800);
    font-size: 1rem;
}

.chi-siamo-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.badge {
    background: var(--blue-xlight);
    border: 1px solid var(--blue-light);
    border-radius: var(--radius);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-size: .9rem;
    font-weight: 600;
    color: var(--blue-dark);
    transition: transform var(--transition), box-shadow var(--transition);
}

.badge:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.badge-icon {
    font-size: 2rem;
}

@media (min-width: 768px) {
    .chi-siamo-grid {
        flex-direction: row;
        align-items: flex-start;
    }

    .chi-siamo-text {
        flex: 1.4;
    }

    .chi-siamo-badges {
        flex: 1;
    }
}

/* ─── SERVICES TABLE ─── */
.services-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: .95rem;
}

.services-table thead tr {
    background: var(--blue-mid);
    color: var(--white);
}

.services-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
}

.services-table td {
    padding: 12px 18px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.services-table tbody tr:nth-child(odd) {
    background: var(--blue-xlight);
}

.services-table tbody tr:nth-child(even) {
    background: var(--blue-light);
}

.services-table tbody tr:hover {
    background: #bfdbfe;
}

.icon {
    margin-right: 6px;
}

/* Vehicle cards */
.vehicle-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.vehicle-card {
    background: var(--blue-dark);
    color: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.8;
    font-size: 2rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .vehicle-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ─── GALLERY ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 43, 94, .75) 0%, transparent 55%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    transition: opacity var(--transition);
}

.gallery-overlay span {
    color: var(--white);
    font-size: .85rem;
    font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, .5);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: opacity var(--transition);
}

.lightbox-close:hover {
    opacity: .6;
}

/* ─── DOVE SIAMO ─── */
.location-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.location-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--blue-light);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 2px 8px rgba(13, 43, 94, .07);
}

.loc-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .location-grid {
        flex-direction: row;
        align-items: flex-start;
    }

    .location-info {
        flex: 1;
    }

    .map-wrap {
        flex: 1.2;
    }
}

/* ─── CONTATTI ─── */
.contact-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .contact-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 32px 20px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(13, 43, 94, .18);
}

.contact-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 4px;
}

.phone-icon {
    background: var(--blue-xlight);
}

.email-icon {
    background: #eef2ff;
}

.wa-icon {
    background: var(--wa-green);
}

.review-icon {
    background: #fef3c7;
}

.contact-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--blue-dark);
}

.contact-value {
    color: var(--blue-bright);
    font-weight: 600;
    font-size: 1rem;
}

.contact-hint {
    font-size: .8rem;
    color: var(--gray-600);
}

/* ─── FOOTER ─── */
.footer {
    background: var(--blue-dark);
    color: rgba(255, 255, 255, .85);
    text-align: center;
    padding: 48px 20px 32px;
}

.footer-logo {
    height: 60px;
    margin: 0 auto 20px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.footer p {
    margin-bottom: 6px;
    font-size: .95rem;
}

.footer a {
    color: #93c5fd;
    transition: color var(--transition);
}

.footer a:hover {
    color: var(--white);
}

.footer-copy {
    margin-top: 20px;
    font-size: .8rem;
    opacity: .55;
}

/* ─── FLOATING BUTTONS ─── */
.floating-btns {
    position: fixed;
    bottom: 24px;
    right: 18px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fab {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
    transition: transform var(--transition), box-shadow var(--transition);
}

.fab:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}

.fab-phone {
    background: var(--blue-bright);
}

.fab-wa {
    background: var(--wa-green);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeUp .5s ease both;
}

/* Scroll reveal */
.anim-ready {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s ease, transform .55s ease;
}

.anim-ready.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Active nav link */
.nav a.active-link {
    color: var(--white) !important;
    background: rgba(255, 255, 255, .15);
    border-radius: 8px;
}