/* ============================
   HERO SECTION — AZZURRO
============================ */

.hero {
    position: relative;
    background: url('../img/home-bg.webp') center/cover no-repeat;
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

/* Nessun overlay */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: none;
}

/* BLOCCO CENTRALE */
.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    max-width: 700px;
    padding: 10px;
}

/* Gradient dietro al testo */
.hero-content::before {
    content: "";
    position: absolute;
    inset: 0px -5px;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0.45));
    z-index: -1;
    border-radius: 10px;
    opacity: 0.55;
}

@media (max-width: 768px) {
    .hero-content::before {
        opacity: 0.40;
    }
}

/* TESTI HERO */

.hero-content h1,
.hero-content p {
    color: #fff;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.9),
        0 0 14px rgba(0, 0, 0, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.9),
        0 0 22px rgba(0, 0, 0, 0.7);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 30px;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 28px;
}

/* ============================
    Scorrimento HomePage 
==============================*/

/* Il link esterno che racchiude tutto il blocco */
.scroll-link-block {
    text-decoration: none;
    display: block;
    width: fit-content;
    /* Ridotto al minimo (era 80px), regola questo valore se vuoi cambiare di pochi pixel */
    margin: 10px auto 0 auto;
    cursor: pointer;
    text-align: center;
}

/* Contenitore principale */
.scroll-container {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
    /* Rimuove eventuali bordi o sfondi estranei ereditati */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Testo "Scorri per scoprire di più" */
.scroll-container p {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
    /* Ridotto anche lo spazio tra il testo e la freccia per compattare tutto */
    line-height: 1.2;
    /* Forza la riga di testo a non occupare spazio extra in altezza */
    color: #ffffff;
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.9), 0px 1px 3px rgba(0, 0, 0, 0.9);
}

/* Contenitore delle frecce */
.scroll-arrow {
    display: inline-block;
    width: 24px;
    height: 24px;
}

/* Singoli segmenti delle frecce */
.scroll-arrow span {
    display: block;
    width: 13px;
    height: 13px;
    border-bottom: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
    transform: rotate(45deg);
    margin: -5px auto 0 auto;
    /* Riavvicinate leggermente per renderle più compatte e armoniose */

    /* Ombra potenziata sulle frecce */
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.9));

    animation: freccia-animata 1.5s infinite ease-in-out;
    /* Animazione leggermente più lenta ed elegante */
}

/* Ritardo per la seconda freccia */
.scroll-arrow span:nth-child(2) {
    animation-delay: -0.2s;
}

/* Animazione fluida e contenuta */
@keyframes freccia-animata {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-8px, -8px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(8px, 8px);
    }
}

/* ============================
   LOGO RESPONSIVE DINAMICO
============================ */

.hero-logo {
    width: clamp(120px, 18vw, 220px);
    max-width: 45%;
    margin: 0 auto 20px;
    display: block;

    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.hero-logo:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}

/* ============================
   MOBILE VERTICALE
============================ */

@media (max-width: 768px) and (orientation: portrait) {
    .hero {
        background-image: url('../img/home_mob-vert.webp');
        height: 75vh;
        padding: 0 15px;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

    .hero-logo {
        width: clamp(100px, 28vw, 160px);
        max-width: 55%;
    }
}

/* ============================
   MOBILE ORIZZONTALE
============================ */

@media (max-height: 480px) {

    .hero {
        background-image: url('../img/home_mob-orizz.webp');
        height: 100vh;
        padding: 0 10px;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        max-width: 96%;
        padding: 10px;
        transform: translateY(-4px);

        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .hero-content::before {
        inset: 0px -5px;
        opacity: 0.32;
    }

    /* LOGO XL */
    .hero-logo {
        width: clamp(110px, 26vh, 170px);
        margin-bottom: 10px;
    }

    /* Titolo XL */
    .hero h1 {
        font-size: clamp(1.8rem, 6.2vh, 2.6rem);
        line-height: 1.18;
        margin-bottom: 8px;
    }

    /* Sottotitolo XL */
    .hero h2 {
        font-size: clamp(1.3rem, 4.8vh, 1.9rem);
        line-height: 1.18;
        margin-bottom: 8px;
    }

    /* Paragrafo XL */
    .hero p {
        font-size: clamp(1.1rem, 4vh, 1.45rem);
        line-height: 1.26;
        margin-bottom: 10px;
    }
}

/* ============================
   TABLET VERTICALE
============================ */

@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .hero {
        background-image: url('../img/home_mob-vert.webp');
        height: 80vh;
    }
}

/* ============================
   TABLET ORIZZONTALE
============================ */

@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        background-image: url('../img/home_mob-orizz.webp');
        height: 80vh;
    }
}

/* ============================
   INTRO CARDS SECTION — AZZURRO
============================ */

.intro-cards {
    padding: 90px 10%;
    text-align: center;
    background: linear-gradient(to bottom, #e3edf0, #d7e4e8);
    border-top: 1px solid rgba(77, 121, 139, 0.25);
}

.intro-cards h2 {
    font-family: "Quicksand", sans-serif;
    font-size: 2.6rem;
    margin-bottom: 15px;
    color: #1e2f36;
}

.intro-subtitle {
    font-family: "Quicksand", sans-serif;
    font-size: 1.2rem;
    color: #3a4f57;
    max-width: 700px;
    margin: 0 auto 50px auto;
    line-height: 1.7;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

/* CARD INTRO */

.card {
    background: #ffffff;
    border: 1px solid rgba(77, 121, 139, 0.35);
    border-radius: 18px;
    padding: 40px 32px;
    width: 300px;
    text-align: center;
    color: #1e2f36;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform-style: preserve-3d;

    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card h3 {
    font-family: "Quicksand", sans-serif;
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: #1e2f36;
}

.card p {
    font-family: "Quicksand", sans-serif;
    font-size: 1rem;
    color: #3a4f57;
}

.card:hover {
    transform: translateY(-14px) scale(1.04) rotateX(3deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
    border-color: #4d798b;
    background: #f0f6f8;
}

/* ICONA CARD */

.card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px auto;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4d798b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #4d798b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: 0.35s ease;
    transform: translateZ(20px);
}

.card:hover .card-icon {
    transform: translateZ(30px) scale(1.12);
    background: #e3edf0;
    border-color: #355866;
    color: #355866;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}