
/* === FONT E VARIABILI GLOBALI === */

:root {
    --colore-primario: #FFC800; /* Giallo Asso Cars */
    --colore-secondario: #000000; /* Nero */
    --colore-testo: #333333;
    --colore-bianco: #FFFFFF;
    --transizione-rapida: 0.3s ease;
    --max-width: 1200px;
}

/* === RESET E STILI DI BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--colore-testo);
    background-color: var(--colore-bianco);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 900;
    color: var(--colore-secondario);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--colore-primario);
    text-decoration: none;
    transition: var(--transizione-rapida);
}

a:hover {
    filter: brightness(0.9);
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.hidden {
    display: none;
}


/* === HEADER E MENU DI NAVIGAZIONE === */
.header {
    background-color: var(--colore-secondario);
    color: var(--colore-bianco);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transizione-rapida);
}

.header.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--colore-bianco);
}

.logo span {
    color: var(--colore-primario);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--colore-bianco);
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--colore-primario);
    transition: var(--transizione-rapida);
}

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

.cta-button {
    background-color: var(--colore-primario);
    color: var(--colore-secondario);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    border: 2px solid transparent;
}

.cta-button:hover {
    background-color: var(--colore-secondario);
    color: var(--colore-primario);
    border: 2px solid var(--colore-primario);
}

/* New style for primary CTA buttons */
.cta-button-primary {
    background-color: #E50914; /* Rosso vivo */
    color: var(--colore-bianco); /* Bianco */
    padding: 1rem 2.5rem; /* Larger padding */
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    border: 2px solid transparent;
    font-size: 1.2rem; /* Slightly larger text */
    transition: var(--transizione-rapida);
}

.cta-button-primary:hover {
    background-color: #b80710; /* Rosso più scuro */
    color: var(--colore-bianco);
}

.cta-button-whatsapp {
    background-color: #25D366; /* Verde WhatsApp */
    color: var(--colore-bianco);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex; /* Use flex to align icon and text */
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* Space between icon and text */
    text-decoration: none;
    border: 2px solid transparent;
    transition: var(--transizione-rapida);
}

.cta-button-whatsapp:hover {
    background-color: #1DA851; /* Verde più scuro */
    color: var(--colore-bianco);
}

.cta-button-whatsapp svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* === HAMBURGER MENU (MOBILE) === */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--colore-bianco);
}


/* === HERO SECTION === */
.hero {
    height: 100vh;
    padding-top: 90px; /* Offset for fixed header */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/20250811_094100.webp') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--colore-bianco);
    padding-left: 2rem;
    padding-right: 2rem;
}

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

.hero h1 {
    color: var(--colore-bianco);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    font-size: 3.5rem;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.2;
}

.hero h1 .brand-name {
    color: var(--colore-primario);
    display: block;
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* === SEZIONE GALLERIA FOTO === */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* === SEZIONI INTERNE === */
.page-header {
    padding-top: 150px;
    padding-bottom: 50px;
    background: var(--colore-secondario);
    color: var(--colore-bianco);
    text-align: center;
}

.page-header h1 {
    color: var(--colore-bianco);
    font-size: 3.5rem; /* Default for desktop */
    line-height: 1.1;
}

.page-header h1 .main-title-line {
    display: block;
    color: var(--colore-primario); /* Yellow */
    font-size: 4.5rem; /* Large and prominent */
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.page-header h1 .sub-title-line {
    display: block;
    color: var(--colore-bianco); /* White */
    font-size: 2rem; /* Subtitle size */
    font-weight: 700;
}

.content-section {
    padding: 4rem 0;
}

.service-list {
    list-style: none;
    margin-top: 2rem;
}

.service-list li {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23FFC800" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') no-repeat left center;
    padding-left: 35px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* === PAGINA CONTATTI === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.contact-info .icon {
    font-weight: bold;
    color: var(--colore-secondario);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.map-container {
    margin-top: 4rem;
    border: 5px solid var(--colore-primario);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* === FOOTER === */
.footer {
    background-color: var(--colore-secondario);
    color: var(--colore-bianco);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--colore-primario);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.footer-col p, .footer-col a {
    color: #ccc;
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: var(--colore-bianco);
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 2rem;
    color: #aaa;
}

/* === PAGINA 404 === */
.error-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
}
.error-page h1 {
    font-size: 8rem;
    color: var(--colore-primario);
}
.error-page p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}


/* === MEDIA QUERIES PER RESPONSIVE DESIGN === */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .section { padding: 4rem 0; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px; /* Altezza header */
        flex-direction: column;
        background-color: var(--colore-secondario);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        gap: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1.5rem 0;
        width: 100%;
    }
    
    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background-color: var(--colore-primario);
        color: var(--colore-secondario);
    }

    .hamburger {
        display: block;
    }

    .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);
    }
    
    h1 { font-size: 2.5rem; }

    .hero {
        height: auto;
        min-height: 90vh; /* Better for mobile toolbars */
        padding-top: 100px; /* Extra padding to clear header */
        padding-bottom: 40px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero h1 .brand-name {
        font-size: 2.8rem; /* Smaller for mobile */
        letter-spacing: 1px;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin: 1rem auto 2rem;
    }

    .hero-buttons {
        gap: 0.8rem;
    }

    .page-header h1 {
        font-size: 2rem; /* Adjust base h1 size in page-header for mobile */
    }

    .page-header h1 .main-title-line {
        font-size: 3rem; /* Smaller main title on mobile */
    }

    .page-header h1 .sub-title-line {
        font-size: 1.5rem; /* Smaller subtitle on mobile */
    }

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