/* ========================================
   Bruga Viaggi - Style
   Mobile-first, SEO-friendly, performant
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: #cc0000;
    --red-dark: #a00000;
    --red-light: #ff2a2a;
    --black: #1a1a1a;
    --gray-900: #222;
    --gray-700: #555;
    --gray-400: #999;
    --gray-200: #e5e5e5;
    --gray-100: #f5f5f5;
    --white: #ffffff;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }
address { font-style: normal; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
    color: var(--red);
    background: rgba(204, 0, 0, 0.05);
}

.nav-link--cta {
    background: var(--red);
    color: var(--white) !important;
    font-weight: 600;
}

.nav-link--cta:hover {
    background: var(--red-dark) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--gray-900);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 70px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0d0d0d 0%, #1a0a0a 25%, #3d0c0c 50%, #8b1a1a 75%, #c45c2a 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(196, 92, 42, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(139, 26, 26, 0.3) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 70%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(30deg, rgba(255,255,255,0.03) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.03) 87.5%),
        linear-gradient(150deg, rgba(255,255,255,0.03) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.03) 87.5%),
        linear-gradient(30deg, rgba(255,255,255,0.03) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.03) 87.5%),
        linear-gradient(150deg, rgba(255,255,255,0.03) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.03) 87.5%);
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 0;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* --- Sections --- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--black);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-700);
    font-size: 1.05rem;
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Services --- */
.servizi {
    background: var(--gray-100);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: rgba(204, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--red);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--black);
}

.service-card p {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Noleggio --- */
.noleggio {
    background: var(--white);
}

.noleggio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.noleggio-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.badge {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.noleggio-content h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--black);
}

.noleggio-desc {
    color: var(--gray-700);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.noleggio-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.noleggio-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--gray-900);
}

.noleggio-features li svg {
    width: 22px;
    height: 22px;
    color: var(--red);
    flex-shrink: 0;
}

.noleggio-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.noleggio-cta .btn-outline {
    color: var(--gray-900);
    border-color: var(--gray-200);
}

.noleggio-cta .btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(204,0,0,0.05);
}

/* --- Sedi --- */
.sedi {
    background: var(--gray-100);
}

.sedi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.sede-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.sede-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.sede-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: rgba(204, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sede-icon svg {
    width: 28px;
    height: 28px;
    color: var(--red);
}

.sede-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sede-badge {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sede-address {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--gray-900);
}

.sede-cap {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 16px;
}

.sede-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 20px;
    transition: color var(--transition);
}

.sede-phone:hover {
    color: var(--red-dark);
}

.sede-phone svg {
    width: 20px;
    height: 20px;
}

.sede-card .btn-outline {
    color: var(--gray-700);
    border-color: var(--gray-200);
}

.sede-card .btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(204,0,0,0.05);
}

/* --- Gite Scolastiche Highlight --- */
.service-icon--highlight {
    background: var(--red);
}

.service-icon--highlight svg {
    color: var(--white);
}

#servizio-gite {
    border: 2px solid var(--red);
}

.section-title--white {
    color: var(--white);
}

.section-subtitle--white {
    color: rgba(255,255,255,0.8);
}

/* --- Contact Form Section --- */
.contatti-form-section {
    background: linear-gradient(160deg, #0d1117 0%, #161b22 30%, #1a2332 50%, #2d1a1a 75%, #4a1c1c 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.contatti-form-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 90%, rgba(204, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 10%, rgba(196, 92, 42, 0.1) 0%, transparent 45%);
    pointer-events: none;
}

.contatti-form-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

.contatti-cta-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.contatti-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.btn-cta-white {
    background: var(--white);
    color: var(--red);
    border-color: var(--white);
}

.btn-cta-white:hover {
    background: var(--gray-100);
    border-color: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}


/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--black);
    color: rgba(255,255,255,0.85);
    z-index: 9999;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
    pointer-events: none;
}

.cookie-banner-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.cookie-banner-inner p {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.6;
    min-width: 200px;
}

.cookie-banner-inner a {
    color: var(--red-light);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-reject-btn {
    color: rgba(255,255,255,0.7) !important;
    border-color: rgba(255,255,255,0.3) !important;
}

.cookie-reject-btn:hover {
    color: var(--white) !important;
    border-color: var(--white) !important;
}

/* --- Footer --- */
.footer {
    background: var(--black);
    color: rgba(255,255,255,0.7);
    padding-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img {
    height: 55px;
    width: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.8));
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul,
.footer-contact ul,
.footer-legal ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-contact a,
.footer-legal a {
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-legal a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
}

/* ============================
   RESPONSIVE
   ============================ */

/* Tablet */
@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sedi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 768px) {
    .container {
        padding: 0 32px;
    }

    .section {
        padding: 100px 0;
    }

    .noleggio-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }

    .footer-inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Mobile only */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: -4px 0 24px rgba(0,0,0,0.1);
        padding: 90px 24px 40px;
        transition: right var(--transition);
        z-index: 999;
    }

    .nav.open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: var(--radius-sm);
    }

    .nav-link--cta {
        text-align: center;
        margin-top: 12px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .noleggio-cta {
        flex-direction: column;
    }

    .noleggio-cta .btn {
        justify-content: center;
    }

    .contatti-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contatti-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* --- Legal Pages --- */
.legal-page {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: 100vh;
}

.legal-page h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--black);
    margin-bottom: 8px;
}

.legal-page .legal-updated {
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-page h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
    margin-top: 36px;
    margin-bottom: 12px;
}

.legal-page h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-page p,
.legal-page li {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-page ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-page a {
    color: var(--red);
    text-decoration: underline;
}
