/* Prevenzione Layout Shift Globale */
img.truck-image, img.promo-img {
    content-visibility: auto;
    contain-intrinsic-size: 500px 300px;
}

img.promo-img {
    contain-intrinsic-size: 100% 350px;
}

/* Hero Section - Homepage */
.hero {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue-darker));
    height: 400px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 20%),
                     radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    opacity: 0.8;
}

.hero-content {
    display: flex;
    height: 100%;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 100px;
    animation: slideInFromLeft 1s ease-out forwards;
}

.hero-headline {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.hero-subheadline {
    font-size: 20px;
    font-weight: 300;
    opacity: 0;
    margin-bottom: 30px;
    max-width: 500px;
    line-height: 1.6;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    background: var(--secondary-blue);
    color: white;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.9s forwards, pulse 2s infinite 2s;
    max-width: fit-content;
}

.hero-cta:hover {
    background: var(--secondary-blue-dark);
    transform: translateY(-3px);
}

.hero-cta i {
    margin-right: 10px;
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    animation: fadeIn 1.5s ease-out 0.5s forwards;
    min-height: 300px;
}

.truck-image {
    width: 500px;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    transform: perspective(1000px) rotateY(-15deg);
    filter: drop-shadow(5px 10px 30px rgba(0, 0, 0, 0.3));
    background: linear-gradient(135deg, #f0f2f5, #e2e8f0);
    display: block;
    margin: 0 auto;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: perspective(1000px) rotateY(-15deg) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-15deg) translateY(-15px); }
    100% { transform: perspective(1000px) rotateY(-15deg) translateY(0); }
}

/* Prevenzione Layout Shift per immagini */
.truck-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f2f5, #e2e8f0);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.truck-image.loaded::before {
    opacity: 0;
}

.promo-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f2f5, #e2e8f0);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.promo-img.loaded::before {
    opacity: 0;
}

/* Stats Section */
.stats {
    display: flex;
    justify-content: center;
    gap: 120px;
    padding: 40px 100px 20px;
    background: white;
    margin-bottom: 0;
}

.stat-item {
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.3s; }
.stat-item:nth-child(2) { animation-delay: 0.5s; }
.stat-item:nth-child(3) { animation-delay: 0.7s; }

.stat-number {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--primary-blue-dark);
    position: relative;
    display: inline-block;
}

.stat-number::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--secondary-blue);
    border-radius: 3px;
}

.stat-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--neutral-dark);
    margin-top: 15px;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 60px 60px;
}

.service-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative;
    border: 1px solid rgba(42, 82, 152, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-blue);
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

.service-icon-container {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue-darker));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.service-icon-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                     radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0.6;
    animation: rotate 20s linear infinite;
}

.service-icon {
    font-size: 50px;
    color: white;
    position: relative;
    z-index: 1;
}

.service-content {
    padding: 25px;
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.service-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-blue);
    border-radius: 1.5px;
}

.service-description {
    font-size: 15px;
    line-height: 1.6;
}

/* Vehicle Cards */
.vehicle-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(42, 82, 152, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInRight 0.8s ease-out forwards;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--secondary-blue);
}

.vehicle-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue-darker));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
    flex-shrink: 0;
}

.vehicle-info {
    flex: 1;
}

.vehicle-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin-bottom: 8px;
}

.vehicle-count {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary-blue);
    margin-bottom: 8px;
}

.vehicle-description {
    font-size: 14px;
    line-height: 1.4;
}

/* Contact Form */
.contact-form {
    background: var(--neutral-light);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    animation: fadeInRight 1s ease-out forwards;
    opacity: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-blue);
    border-radius: 1.5px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-blue-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(42, 82, 152, 0.2);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
}

.form-textarea {
    height: 120px;
    resize: none;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232a5298' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    padding-right: 40px !important;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue-darker));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(42, 82, 152, 0.2);
}

.submit-btn i {
    margin-right: 10px;
}

/* Promotional Sections */
.promo-sections {
    background-color: #f8f9fa;
    padding: 0 0 60px;
    margin-top: 0;
}

.promo-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    margin-bottom: 40px;
}

.promo-container:first-child {
    margin-top: -10px;
    padding-top: 30px;
}

.promo-container:last-child {
    margin-bottom: 0;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 80px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 350px;
}

.promo-reverse .promo-content {
    flex-direction: row-reverse;
}

.promo-text {
    flex: 1;
    padding: 50px;
}

.promo-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-blue-dark);
    margin-bottom: 24px;
    line-height: 1.3;
}

.promo-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--neutral-dark);
    margin-bottom: 32px;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue-darker));
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.3);
}

.promo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(42, 82, 152, 0.4);
    background: linear-gradient(135deg, var(--primary-blue-darker), var(--primary-blue-dark));
}

.promo-btn i {
    margin-right: 12px;
    font-size: 18px;
}

.promo-image {
    flex: 1;
    height: 350px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f2f5, #e2e8f0);
    position: relative;
}

.promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

.promo-container:hover .promo-img {
    transform: scale(1.05);
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--primary-blue-darker), var(--primary-blue-dark));
    color: white;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 30%),
                     radial-gradient(circle at 80% 80%, rgba(0, 188, 212, 0.1) 0%, transparent 40%);
    opacity: 0.8;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 60px 30px;
}

.footer-info {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.company-details {
    padding-right: 20px;
}

.footer-company-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary-blue);
    margin-bottom: 20px;
}

.footer-detail {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 8px;
}

.footer-links {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.8fr;
    gap: 35px;
}

.footer-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-blue);
    margin-bottom: 16px;
    position: relative;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-blue);
    border-radius: 1px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 8px;
}

/* Stile compatto per la lista servizi */
.footer-section:first-child .footer-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-section:first-child .footer-list li {
    margin-bottom: 0;
}

.footer-section:first-child .footer-link {
    font-size: 13.5px;
    padding: 2px 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    line-height: 1.4;
}

.footer-link:hover {
    color: var(--secondary-blue);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-link:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-legal {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.legal-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: var(--secondary-blue);
}

.footer-copyright {
    font-size: 13px;
    opacity: 0.7;
}

/* Responsive Design for Promotional Sections and Footer */
@media (max-width: 1200px) {
    .hero-text {
        padding-left: 50px;
    }
    
    .hero-headline {
        font-size: 42px;
    }
    
    .truck-image {
        width: 400px;
        margin: 0 auto;
    }
    
    .stats {
        padding: 40px 50px 15px;
    }
    
    .services-grid {
        padding: 0 40px 40px;
        gap: 25px;
    }
    
    .promo-container {
        padding: 0 40px;
    }
    
    .promo-content {
        gap: 60px;
    }
    
    .promo-text {
        padding: 50px;
    }
    
    .footer-content {
        padding: 50px 40px 25px;
    }
}

@media (max-width: 968px) {
    .hero {
        height: auto;
        min-height: 400px;
        padding: 40px 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        padding: 0 30px;
        margin-bottom: 30px;
    }
    
    .hero-headline {
        font-size: 36px;
    }
    
    .hero-subheadline {
        font-size: 18px;
        max-width: 100%;
    }
    
    .truck-image {
        width: 300px;
        transform: none;
        filter: none;
        margin: 0 auto;
    }
    
    .floating {
        animation: none;
    }
    
    .stats {
        flex-wrap: wrap;
        gap: 30px;
        padding: 30px 30px 15px;
        justify-content: center;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 15px);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 30px 30px;
        gap: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .promo-container {
        padding: 0 20px;
        margin-bottom: 40px;
    }
    
    .promo-content {
        flex-direction: column;
        gap: 0;
        min-height: auto;
    }
    
    .promo-reverse .promo-content {
        flex-direction: column;
    }
    
    .promo-text {
        padding: 40px 30px;
        text-align: center;
    }
    
    .promo-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .promo-description {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .promo-image {
        height: 300px;
    }
    
    .footer-info {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-links {
        grid-template-columns: 1.2fr 1fr;
        gap: 25px;
    }
    
    .footer-content {
        padding: 40px 20px 20px;
    }
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 28px;
    }
    
    .hero-subheadline {
        font-size: 16px;
    }
    
    .hero-cta {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .truck-image {
        width: 250px;
        margin: 0 auto;
    }
    
    .stats {
        padding: 20px;
        margin-bottom: 0;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 20px;
    }
    
    .service-title {
        font-size: 18px;
    }
    
    .service-description {
        font-size: 14px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-title {
        font-size: 20px;
    }
    
    .promo-text {
        padding: 30px 20px;
    }
    
    .promo-title {
        font-size: 24px;
    }
    
    .promo-description {
        font-size: 15px;
    }
    
    .promo-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .promo-image {
        height: 250px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-company-name {
        font-size: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-legal {
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 20px 0;
    }
    
    .hero-text {
        padding: 0 20px;
    }
    
    .hero-headline {
        font-size: 24px;
    }
    
    .hero-subheadline {
        font-size: 14px;
    }
    
    .truck-image {
        width: 200px;
        margin: 0 auto;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .stat-item {
        flex: none;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .services-grid {
        padding: 0 15px 15px;
    }
    
    .service-content {
        padding: 20px;
    }
    
    .vehicle-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .vehicle-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .promo-container {
        margin-bottom: 30px;
    }
    
    .promo-text {
        padding: 25px 15px;
    }
    
    .promo-title {
        font-size: 20px;
    }
    
    .promo-description {
        font-size: 14px;
    }
    
    .promo-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .promo-image {
        height: 200px;
    }
    
    .footer-content {
        padding: 30px 15px 15px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-legal {
        gap: 15px;
        flex-direction: column;
    }
} 