/*
Theme Name: Casta
*/

/* Custom Home Page Styles */

/*-----------------------------------------------------------------------------*
 *  BLOCCO 1: HERO VIDEO
 *-----------------------------------------------------------------------------*/
.home-hero {
    position: relative;
    /* Almost full viewport height, leaving space for potential elements */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Ensure it takes full width of main content */
}

@media screen and (max-width: 899px) {
    .home-hero {
        height: 100vh;
    }
}

.hero-content-overlay {
    position: relative;
    z-index: 3;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 5vw;
}

@media screen and (max-width: 899px) {
    .hero-content-overlay {
        padding-top: 10vh;
        padding-right: 5vw;
    }
}

@media screen and (max-width: 899px) {
    .intro-font h1 {
        font-size: 2rem;
    }

    .intro-font p {
        font-size: 1.2rem;
    }
}

.home-hero .hero-content-overlay .p-section_text {
    max-width: 500px !important;
}

.home-hero .p-section_content * {
    color: #fff !important;
}

.home-hero .video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.home-hero .video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This makes the video cover the container */
}

.home-hero .video-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.home-hero .scroll-down-container {
    position: relative;
    z-index: 3;
    padding-bottom: 30px;
    text-align: center;
    margin-top: auto;
    /* Pushes it to the bottom */
}

.home-hero .scroll-down-link {
    display: inline-block;
}

.home-hero .scroll-down-icon {
    width: 50px;
    height: 50px;
    stroke: #ffffff;
    fill: none;
    cursor: pointer;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

.main-content {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

/*-----------------------------------------------------------------------------*
 *  BLOCCO 2: CHARACTERISTICS CARDS
 *-----------------------------------------------------------------------------*/
.home-characteristics {
    background-color: #fff;
    width: 100%;
    padding-left: 50px;
    padding-right: 50px;
}

.home-characteristics .l-container {
    max-width: none;
    width: 100%;
    padding: 0;
}

.home-characteristics .l-row {
    align-items: stretch;
}

.characteristic-card {
    background-color: #fff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease-in-out;
    height: 100%;
    /* Assicura che le card nella stessa riga abbiano la stessa altezza */
    display: flex;
    /* Utile per allineare il contenuto se le altezze del testo variano */
    flex-direction: column;
}

.characteristic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.characteristic-card .card__image {
    overflow: hidden;
}

.characteristic-card .card__image img {
    width: 100%;
    height: 300px;
    display: block;
    object-fit: contain;
}

.characteristic-card .card__text {
    padding: 30px;
    flex-grow: 1;
    /* Fa in modo che il box di testo occupi lo spazio rimanente */
}

.characteristic-card .card__text h3 {
    margin-top: 0;
    font-weight: bold;
    color: #2a3542;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.characteristic-card .card__text p {
    color: #596c7f;
    line-height: 1.6;
    padding-top: 10px;
}

@media screen and (max-width: 899px) {
    .home-characteristics .l-container {
        padding: 0 0;
    }

    .home-characteristics .grid-column:not(:last-child) {
        margin-bottom: 10vw;
    }
}

/*-----------------------------------------------------------------------------*
 *  BLOCCO 2.5: BANNER HOST 2025
 *-----------------------------------------------------------------------------*/

.host-banner__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.host-banner__image img {
    max-width: 100% !important;
}

@media screen and (max-width: 899px) {
    .host-banner__image img {
        max-width: 80% !important;
    }
}

.home-host-banner {
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.home-host-banner .l-row {
    align-items: center;
}

.home-host-banner__image img {
    display: block;
    width: 100%;
}

.home-host-banner__text {
    padding-left: 50px;
}

.home-host-banner__text .o-heading {
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
}

.home-host-banner__text p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Responsive per schermi piccoli */
@media screen and (max-width: 899px) {
    .home-host-banner__text {
        padding-left: 0;
        padding-top: 30px;
        text-align: center;
    }
}

/*-----------------------------------------------------------------------------*
 *  BLOCCO 3: FEATURES ALTERNATE
 *-----------------------------------------------------------------------------*/
.home-features {
    background-color: #fff;
}

.feature-item {
    align-items: center;
    /* Allinea verticalmente immagine e testo */
}

.feature-item__image {
    padding: 0;
}

.feature-item__image img {
    display: block;
    width: 100%;
    background-color: #f5f5f5;
}

.feature-item__text-wrap {
    display: flex;
}

.feature-item__text {
    background-color: #fff;
    opacity: 0.95;
    padding: 50px;
    margin-left: -100px;
    /* L'effetto di sovrapposizione */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
    width: calc(100% + 100px);
}

.feature-item--reverse .feature-item__text {
    margin-left: 0;
    margin-right: -100px;
    /* L'effetto di sovrapposizione dall'altra parte */
}

/* Invertiamo l'ordine delle colonne per la versione --reverse */
.feature-item--reverse .feature-item__image {
    order: 2;
}

.feature-item--reverse .feature-item__text-wrap {
    order: 1;
    justify-content: flex-end;
    /* Allinea il box di testo a destra */
}

.feature-item__text .o-heading {
    font-weight: bold;
    color: #2a3542;
    margin-top: 0;
}

.feature-item__text p {
    color: #596c7f;
    line-height: 1.6;
}

.feature-item__link {
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
    color: #4d5966;
    width: fit-content;
    padding: 10px 20px;
    background-color: #fff88c;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.feature-item__link:hover {
    background-color: #fff02a;
    color: #2a3542;
}

.feature-item__link .arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.feature-item__link:hover .arrow {
    transform: translateX(5px);
}

/* Responsive per schermi piccoli */
@media screen and (max-width: 899px) {
    .feature-item {
        align-items: flex-start;
    }

    .feature-item--reverse {
        align-items: flex-end;
    }

    .feature-item,
    .feature-item--reverse {
        flex-direction: column;
    }

    .feature-item__image,
    .feature-item__text-wrap {
        width: 100%;
    }

    .feature-item__text {
        margin: 0;
        margin-top: -50px;
        /* Sovrapposizione in verticale */
        width: 85%;
        align-self: initial;
    }

    .feature-item--reverse .feature-item__text {
        margin: 0;
        margin-top: -50px;
    }

    .feature-item--reverse .feature-item__image,
    .feature-item--reverse .feature-item__text-wrap {
        order: initial;
        /* Rimuoviamo l'ordine per tornare al flusso normale */
    }

    .feature-item__text-wrap {
        justify-content: start;
    }
}

/*-----------------------------------------------------------------------------*
 *  BLOCCO 4: TESTIMONIANZE VIDEO
 *-----------------------------------------------------------------------------*/

.home-testimonials {
    width: 100%;
    max-width: 100%;
}

.testimonials-container {
    padding: 40px 80px 80px 80px;
    margin: 0 auto;
}

.testimonials-intro {
    padding-top: 40px;

    h1 {
        font-size: 2rem;
        font-weight: bold;
        color: #2a3542;
    }

    p {
        font-size: 1.2rem;
        color: #596c7f;
    }
}

.testimonial-card-container {
    margin-top: 30px;
    margin-bottom: 30px;
}

.testimonial-card {
    position: relative;
    margin-bottom: 10px;
}

.testimonial-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card__link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-card__image {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background-color: #f0f0f0;
}

.testimonial-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-card__play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.testimonial-card__link:hover .testimonial-card__play-icon {
    background-color: rgba(255, 255, 255, 1);
}

.testimonial-card__play-icon svg {
    width: 32px;
    height: 32px;
    color: #333;
}

.testimonial-card__title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.testimonial-card__description {
    font-size: 0.95rem;
    color: #666;
}
