/**
 * Widget: hero-content|homepage
 */

/* -----------------------------------------------------------------------
   Sezione principale (sfondo primario)
----------------------------------------------------------------------- */
.hero-content-homepage {
    background-color: var(--website-primary);
    position: relative;
    overflow: hidden;
    padding: var(--website-padding-top-bottom) 0;
}



/* -----------------------------------------------------------------------
   Container: centra il box bianco + bottone CTA
----------------------------------------------------------------------- */
.hero-content-homepage > .container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

/* -----------------------------------------------------------------------
   Box bianco centrale
----------------------------------------------------------------------- */
.hero-content-homepage .homepage-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 42px;
    max-width: var(--website-box-max-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}


/* -----------------------------------------------------------------------
   Titolo h1
----------------------------------------------------------------------- */

/* Testo in evidenza nel titolo */
.hero-content-homepage .homepage-title-emphasis {
    color: var(--website-accent);
    font-style: italic;
    font-weight: 500;
}

/* -----------------------------------------------------------------------
   Corpo del contenuto della pagina
----------------------------------------------------------------------- */
.hero-content-homepage .homepage-content {
    font-weight: 500;
    line-height: 24px;
    color: var(--website-secondary);
    margin: 0;
}

.hero-content-homepage .homepage-content p {
    margin: 0;
}

.hero-content-homepage .homepage-content p + p {
    margin-top: 16px;
}

/* -----------------------------------------------------------------------
   Immagine in evidenza del post (thumbnail) — in fondo al box
----------------------------------------------------------------------- */
.hero-content-homepage .homepage-thumbnail {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
}


/* -----------------------------------------------------------------------
   Bottone CTA (a destra del box principale)
----------------------------------------------------------------------- */
.hero-content-homepage .homepage-btn-cta {
    position: absolute;
    right: var(--bs-gutter-x, 0.75rem);
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #3D3D3D;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-content-homepage .homepage-btn-cta:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-content-homepage .homepage-btn-cta:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* -----------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------- */

@media (max-width: 830px) {
    .hero-content-homepage {
        padding: var(--website-padding-top-bottom-mini) 0;
    }

    .hero-content-homepage .homepage-box {
        padding: 24px 20px;
        gap: 24px;
        border-radius: 8px;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .hero-content-homepage .homepage-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-content-homepage .homepage-thumbnail {
        height: 180px;
    }

    .hero-content-homepage > .container {
        flex-direction: column;
        align-items: center;
    }

    .hero-content-homepage .homepage-btn-cta {
        position: static;
        align-self: center;
        margin-top: 0.5rem;
    }
}

/* -----------------------------------------------------------------------
   FAB: bottone rotondo flottante (visibile quando il trigger principale
   esce dal viewport)
----------------------------------------------------------------------- */
/* Wrapper: contiene il bottone Info (apre modal) + il link Prenota (esterno). */
.homepage-fab-cta-group {
    position: fixed;
    right: 18px;
    bottom: 20px;
    z-index: 999;
    display: flex;
    gap: 12px;
    align-items: stretch;
    opacity: 0;
    /*
    transform: translateY(8px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
     */
}

.homepage-fab-cta-group[hidden] {
    display: none;
}

.homepage-fab-cta-group.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Look condiviso desktop dei due bottoni. */
.homepage-fab-cta,
.homepage-fab-cta-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1861D;
    color: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.22),
        0 2px 6px rgba(0, 0, 0, 0.14);
}

.homepage-fab-cta:hover,
.homepage-fab-cta-book:hover {
    background: #d97515;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.26),
        0 2px 6px rgba(0, 0, 0, 0.16);
}

.homepage-fab-cta:focus-visible,
.homepage-fab-cta-book:focus-visible {
    outline: 3px solid var(--website-primary);
    outline-offset: 3px;
}

.homepage-fab-cta-icon {
    flex-shrink: 0;
}

/* Desktop: cerchio singolo (Info), il "Prenota" è già nell'header. */
.homepage-fab-cta {
    /*
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    */
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

.homepage-fab-cta-book {
    display: none;
}

.homepage-fab-cta-label {
    display: none;
}

.homepage-fab-cta:active,
.homepage-fab-cta-book:active {
    transform: translateY(0) scale(0.95);
}

/* Mobile: 2 card fluttuanti centrate (stesso pattern di modal-button-v01). */
@media (max-width: 1024px) {
    .homepage-fab-cta-group {
        right: 0;
        left: 0;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0));
        padding: 0 0.75rem;
        justify-content: center;
        gap: 1.25rem;
    }

    .homepage-fab-cta,
    .homepage-fab-cta-book {
        flex: 0 1 140px;
        width: 140px;
        min-height: 92px;
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 1rem;
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.3px;
        white-space: nowrap;
        box-shadow:
            0 10px 24px rgba(0, 0, 0, 0.22),
            0 4px 10px rgba(0, 0, 0, 0.14);
    }

    .homepage-fab-cta-book {
        display: inline-flex;
    }

    .homepage-fab-cta:hover,
    .homepage-fab-cta-book:hover {
        transform: scale(1.05);
        box-shadow:
            0 12px 28px rgba(0, 0, 0, 0.26),
            0 6px 12px rgba(0, 0, 0, 0.16);
    }

    .homepage-fab-cta-icon {
        width: 28px;
        height: 28px;
    }

    .homepage-fab-cta-label {
        display: inline;
    }
}

/* Quando il footer entra nel viewport, le card scorrono via verso il basso. */
.homepage-fab-cta-group.is-near-footer {
    transform: translateY(calc(100% + 2rem));
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .homepage-fab-cta-group,
    .homepage-fab-cta,
    .homepage-fab-cta-book {
        transition: opacity 0.15s ease, background-color 0.2s ease;
        transform: none;
    }

    .homepage-fab-cta-group.is-visible {
        transform: none;
    }

    .homepage-fab-cta:hover,
    .homepage-fab-cta-book:hover {
        transform: none;
    }
}

