/* =========================================
   RESET E VARIABILI
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gold: #77551f;
    --dark-blue: #121212;
    --light-grey: #f4f4f4;
    --gold-shadow: rgba(0, 0, 0, 0.65); 
    font-display: swap; 
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, serif; 
    line-height: 1.7;
    color: #333;
    background-color: #f0f2f5; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; 
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   HERO HEADER
   ========================================= */
.hero-container {
    width: 100%;
    position: relative;
    background-color: #000;
    overflow: hidden;
    min-height: 250px; 
	aspect-ratio: 1920 / 800;
	
}

.hero-container picture img {
    width: 100%;
    height: auto; 
    display: block;
    opacity: 0.8;
}

.brand-overlay {
    position: absolute;
    top: 5%; 
    left: 5%;
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    gap: 15px; 
    z-index: 10;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    width: 90%; 
}

.logo-img {
    width: 40%; 
    max-width: 500px; 
    min-width: 150px; 
    opacity: 0;
    animation: fadeInOnly 1s ease-out forwards;
    animation-delay: 0.2s;
}

.brand-text {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.brand-text h1 {
    font-style: italic;
    font-weight: normal;
    font-size: clamp(1.1rem, 2.8vw, 2.2rem); 
    margin: 0;
    letter-spacing: 1px;
    line-height: 1.2;
    opacity: 0;
    animation: textSlideUp 1.2s ease-out forwards;
    animation-delay: 0.7s; 
}

.brand-text .cta-subtitle {
    font-style: italic;
    font-weight: normal;
    font-size: clamp(1.4rem, 4.5vw, 3rem); 
    margin-top: clamp(40px, 15vw, 200px); 
    color: #ffffff;
    letter-spacing: 1px;
    line-height: 1.2;
    opacity: 0;
    display: block;
    text-align: center; 
    width: 100%; 
    animation: textSlideUp 1.2s ease-out forwards;
    animation-delay: 1.8s;
}

/* =========================================
   QUICK LINKS
   ========================================= */
.quick-links-section {
    width: 75vw;
    margin: 30px auto 0 auto;
    display: flex;
    justify-content: center;
}

.icon-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.icon-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    transition: transform 0.2s ease;
}

.icon-item:hover { transform: translateX(5px); }

.icon-svg {
    fill: #77551f; 
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.label {
    margin-left: 10px;
    font-weight: 500;
}

/* =========================================
   MAIN CONTENT (COLONNE INIZIALI)
   ========================================= */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px 0 40px 0;
    width: 75vw; 
    margin: 0 auto;
}

.column {
    font-style: italic;
    flex: 1;
    min-width: 280px;
    background: #fff;
    padding: 25px; 
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    opacity: 0; 
    animation-fill-mode: forwards; 
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    text-align: left; 
}

.column h2 {
    display: flex;
    align-items: center;
    justify-content: center; 
    min-height: 30px;
    margin-bottom: 15px;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    line-height: 1.2;
}

.column img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
}

/* =========================================
   SEZIONI INTEGRATE (OLTRE IL TRASPORTO / TECNOLOGIA)
   ========================================= */
.integrated-section {
    padding: 80px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.integrated-section .text-box {
    text-align: left; /* Testo sempre a sinistra per leggibilità */
}

.integrated-section p {
    font-size: clamp(1rem, 1.2vw, 1.2rem); 
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    margin-bottom: 20px;
}

.grid-container {
    width: 75vw; 
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 5vw, 60px);
    align-items: center;
}

.section-transport-grid { align-items: end; }

.image-box img, .image-box-top img, .image-box-inline img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 5px 5px 0px var(--gold-shadow);
}

.image-box-top { display: none; } 
.image-box-inline { display: block; margin-top: 30px; }

.gold-divider {
    width: 80px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 30px;
}

.section-tech .grid-container {
    grid-template-columns: 1fr 1fr; 
    gap: 40px;
    align-items: start;
}

.section-tech .text-box {
    grid-column: 1 / span 2; 
    margin-top: 40px;
}

.btn-gold {
    background: transparent;
    color: var(--gold);
    padding: clamp(10px, 1.5vw, 15px) clamp(20px, 3vw, 40px); 
    text-decoration: none;
    border: 1px solid var(--gold);
    display: block; 
    width: fit-content; 
    margin-top: 30px; 
    transition: background 0.3s, color 0.3s;
    text-transform: uppercase;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: bold;
    text-align: center;
}

.btn-gold:hover {
    background: var(--gold);
    color: white;
}

/* =========================================
   SERVIZI (DARK SECTION)
   ========================================= */
.services-container {
    background-color: var(--dark-blue);
    color: white;
    padding: 80px 0;
    width: 100%; 
}

.services-header {
    text-align: center; 
    margin-bottom: 40px;
    padding: 0 10px;
}

.services-grid {
    width: 75vw;
    margin: 50px auto 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.service-card { text-align: center; }

.service-card h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.5rem); 
    margin-bottom: 15px;
    color: var(--gold);
}

.icon-service-svg {
    width: 50px;
    height: 50px;
    fill: var(--gold);
    margin-bottom: 20px;
}

/* =========================================
   MAPPA E FOOTER
   ========================================= */
.call-to-action-text {
    text-align: center;
    padding: 40px 20px;
    background-color: #f0f2f5;
}

.call-to-action-text h2 {
    color: var(--gold);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: normal;
    font-style: italic;
}

.map-wrapper {
    width: 100%;
    line-height: 0;
    min-height: 450px;
	background-color: #eee;
}

footer {
    width: 100%;
    padding: 60px 0 0 0; 
    color: #ffffff; 
    text-align: center;
    background-color: var(--dark-blue); 
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
}

.footer-row-top {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    width: 75vw;
    margin: 0 auto;
}

.footer-separator {
    width: 50%;
    height: 1px;
    background-color: #ffffff; 
    margin: 20px auto;
    border: none;
}

.footer-row-bottom { margin-bottom: 20px; }

.footer-partnership {
    position: relative;
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px 20px 0 0; 
}

.footer-partnership::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('images/mercedes-1920.webp'); 
    background-size: cover;
    background-position: center;
    opacity: 0.6; 
    z-index: 1;
}

.partnership-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; 
}

.partnership-logo { max-width: 300px; }

.partnership-content p {
    font-size: clamp(.75rem, 1.8vw, 1.1rem);
    color: #999;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 1);
    line-height: 1.5;
    text-align: center;
}

/* =========================================
   ANIMAZIONI
   ========================================= */
@keyframes fadeInOnly { to { opacity: 1; } }
@keyframes textSlideUp {
    0% { opacity: 0; transform: translateY(60px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft { from { transform: translateX(-100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInUp { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.main-content .column:nth-child(1) { animation: slideInLeft 0.8s 1s ease-out forwards; }
.main-content .column:nth-child(2) { animation: slideInUp 0.8s 1.2s ease-out forwards; }
.main-content .column:nth-child(3) { animation: slideInRight 0.8s 1.4s ease-out forwards; }

.animate-from-left, .animate-from-right {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.8s ease-out, transform 1.2s ease-out; 
}

.animate-from-left { transform: translateX(-100px); }
.animate-from-right { transform: translateX(100px); }

.appear { opacity: 1; transform: translateX(0); }

/* =========================================
   MEDIA QUERIES (FIX CENTRAMENTO BLOCCHI)
   ========================================= */

@media (max-width: 1023px) {
    .grid-container, .main-content, .footer-row-top, .quick-links-section, .services-grid { 
        width: 95vw; 
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
		
	.hero-container {
	aspect-ratio: 800 / 600;
	}

    .section-transport-grid {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centra orizzontalmente l'immagine e il blocco di testo */
    }

    .section-transport-grid .image-box-top { display: block; order: 1; width: 80%; }
    .section-transport-grid .image-box-inline { display: none; }
    .section-transport-grid .image-box { display: block; order: 3; width: 80%; }

    .section-transport-grid .text-box {
        order: 2;
        text-align: left; /* Testo allineato a sinistra */
        width: 100%;
        max-width: 750px; /* Larghezza controllata */
        margin: 0 auto;   /* Centra il contenitore nella pagina */
    }

    .gold-divider { margin-left: 0; margin-right: auto; }
}

@media (max-width: 768px) {
	
	.hero-container {
	aspect-ratio: 480 / 400;
	}

    .icon-container { display: flex; flex-direction: column; width: 95vw !important; margin: 0 auto; padding: 20px; }
    .icon-item { padding: 15px 0 15px 15%; border-bottom: 1px solid var(--gold); }
    .icon-item:last-child { border-bottom: none; }
	
    .column, .service-card { text-align: center !important; }
    
    /* Centra il contenitore della sezione integrata */
    .integrated-section .grid-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Centra il blocco di testo rispetto alla pagina, ma tiene il testo a sinistra */
    .integrated-section .text-box {
        text-align: left !important;
        width: 90%;
        max-width: 500px;
        margin: 0 auto !important;
        order: 2;
    }

    .integrated-section .gold-divider { margin-left: 0 !important; margin-right: auto !important; }
    .btn-gold { margin-left: 0 !important; margin-right: auto !important; }

    .section-transport-grid .image-box-top { display: block; order: 1; width: 100%; }
    .section-transport-grid .image-box-inline { display: none; }
    .section-transport-grid .image-box { order: 3; width: 100%; }

    /* Fix tecnologia in mobile */
    .section-tech .grid-container { display: flex !important; flex-direction: column !important; align-items: center; }
    .section-tech .image-box { width: 100%; }
    .section-tech .img-mobile-top { order: 1 !important; margin-bottom: 20px; }
    .section-tech .img-mobile-bottom { order: 3 !important; margin-top: 20px; }
    
    .logo-img { width: 60%; }
}