@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

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

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1A1A1A;
    height: 400px;
    display: flex;
    align-items: center;
    position: relative;
    /* Mobile first - smallest screens */
    background-image: url('assets/hero/hero_mobile_fullbackground.jpg');
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.logo-fastweb {
    width: 180px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero h1 {
    color: #FFFFFF;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

/* Quando Section */
.quando-section {
    background-color: #fff;
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.quando-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.quando-section h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 60px;
    color: #1A1A1A;
}

.protection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.protection-card {
    text-align: left;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.protection-card.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.protection-card:hover {
    transform: translateY(-8px);
    transition: transform 0.3s ease;
}

.protection-card:hover .protection-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.protection-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.protection-card h3 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    color: #1A1A1A;
}

.protection-card .subtitle {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
    color: #1A1A1A;
}

.protection-card ul {
    list-style: none;
    padding: 0;
}

.protection-card ul li {
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0.3px;
    color: #53565B;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.protection-card ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #53565B;
}

/* Come Funziona Section */
.come-funziona-section {
    background-color: #f5f5f5;
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.come-funziona-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.come-funziona-section h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 60px;
    color: #1A1A1A;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
}

.step-card {
    text-align: left;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.step-card.animate-in {
    opacity: 1;
    transform: scale(1);
}

.step-card:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.step-card:hover .step-icon {
    transform: rotate(10deg) scale(1.1);
    transition: transform 0.3s ease;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.step-card h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 38px;
    letter-spacing: 0.3px;
    color: #1A1A1A;
}

/* Gestisci Section */
.gestisci-section {
    background-color: #fff;
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.gestisci-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.gestisci-section h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 60px;
    color: #1A1A1A;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background-color: #F4F4F4;
    padding: 40px 30px;
    text-align: left;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    background-color: #EBEBEB;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    transition: transform 0.3s ease;
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.service-card h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 38px;
    letter-spacing: 0.3px;
    color: #1A1A1A;
    margin-bottom: 30px;
    flex-grow: 1;
}

.btn-yellow {
    background-color: #FDC400;
    color: #000;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-yellow:after {
    content: '→';
    margin-left: 8px;
    font-size: 16px;
}

.btn-yellow:hover {
    background-color: #e6b300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 196, 0, 0.3);
}

/* Contact Section */
.contact-section {
    background-color: #f5f5f5;
    padding: 40px 0;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.contact-section p {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #1A1A1A;
}

.contact-section strong {
    font-weight: 700;
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.footer.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left a {
    color: #818181;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
}

.footer-left a:hover {
    text-decoration: underline;
}

.footer-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-logo {
    height: 50px;
    width: auto;
}

/* Responsive Design - Hero Images for Different Screen Widths */

/* Mobile: up to 768px */
@media screen and (max-width: 768px) {
    .hero {
        background-image: url('assets/hero/hero_mobile_fullbackground.jpg');
        margin: 0 auto;
        height: 491px;
        width: 100%;
    }

    .hero h1 {
        font-size: 32px;
        font-weight: 700;
        line-height: 50px;
        color: #FFFFFF;
    }

    .logo-fastweb {
        width: 240px;
        height: 40px;
    }

    .container {
        padding: 0 20px;
    }

    .protection-grid,
    .steps-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .step-card {
        display: flex;
        align-items: flex-start;
        gap: 20px;
    }

    .step-icon {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    /* Section Titles Mobile */
    .quando-section h2,
    .come-funziona-section h2,
    .gestisci-section h2 {
        font-size: 32px;
        font-weight: 700;
        line-height: 50px;
        letter-spacing: 0.3px;
        color: #1A1A1A;
        margin-bottom: 40px;
    }

    /* Section 1 - Cards Mobile */
    .protection-card h3 {
        font-size: 24px;
        font-weight: 700;
        line-height: 38px;
        letter-spacing: 0.3px;
        color: #1A1A1A;
    }

    .protection-card .subtitle {
        font-size: 20px;
        font-weight: 400;
        line-height: 32px;
        letter-spacing: 0.3px;
        color: #1A1A1A;
    }

    .protection-card ul li {
        font-size: 18px;
        font-weight: 400;
        line-height: 28px;
        letter-spacing: 0.3px;
        color: #53565B;
    }

    /* Section 2 - Steps Mobile */
    .step-card h3 {
        font-size: 24px;
        font-weight: 700;
        line-height: 38px;
        color: #1A1A1A;
    }

    /* Section 3 - Service Cards Mobile */
    .service-card h3 {
        font-size: 24px;
        font-weight: 700;
        line-height: 38px;
        letter-spacing: 0.3px;
        color: #1A1A1A;
    }

    .btn-yellow {
        font-size: 16px;
        font-weight: 500;
    }

    /* Contact Section Mobile */
    .contact-section p {
        font-size: 24px;
        font-weight: 700;
        line-height: 38px;
        letter-spacing: 0.3px;
        color: #1A1A1A;
    }

    .contact-section strong {
        white-space: nowrap;
    }

    /* Footer Mobile */
    .footer-left a {
        font-size: 16px;
        font-weight: 400;
        color: #818181;
    }

    .quando-section,
    .come-funziona-section,
    .gestisci-section {
        padding: 50px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-left {
        order: 3;
        margin-top: 30px;
    }

    .footer-right {
        flex-direction: column;
        gap: 15px;
        order: 1;
        justify-content: center;
        align-items: center;
        margin-bottom: 15px;
    }
}

/* Tablet: 769px to 1024px */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero {
        background-image: url('assets/hero/hero_dsktp_1440_fullbackground.jpg');
    }

    .protection-grid,
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 1025px to 1440px */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
    .hero {
        background-image: url('assets/hero/hero_dsktp_1440_fullbackground.jpg');
    }
}

/* Large Desktop: 1441px and above */
@media screen and (min-width: 1441px) {
    .hero {
        background-image: url('assets/hero/hero_dsktp_1920_fullbackground.jpg');
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Mobile Retina */
    @media screen and (max-width: 768px) {
        .hero {
            background-image: url('assets/hero/hero_mobile_fullbackground@2x.jpg');
        }
    }

    /* Tablet/Desktop 1440 Retina */
    @media screen and (min-width: 769px) and (max-width: 1440px) {
        .hero {
            background-image: url('assets/hero/hero_dsktp_1440_fullbackground@2x.jpg');
        }
    }

    /* Large Desktop 1920 Retina */
    @media screen and (min-width: 1441px) {
        .hero {
            background-image: url('assets/hero/hero_dsktp_1920_fullbackground@2x.jpg');
        }
    }
}
