/* Royal Blu Travel - stili specifici del sito (caricato dopo style.css) */

/* ==================================================
   INTRO / SLIDER HOME
================================================== */

#intro.intro-fullscreen {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

/* ==================================================
   BACKGROUND SLIDER
================================================== */

#introSlider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#introSlider .carousel-inner,
#introSlider .carousel-item {
    width: 100%;
    height: 100%;
}

/* Fondo scuro sotto le slide: se una foto non e' ancora arrivata non si vede mai uno spazio bianco. */
#introSlider,
#introSlider .carousel-inner {
    background: #01335e;
}

/*
 * Ogni slide occupa sempre tutto il riquadro dell'hero (posizionata in assoluto), in qualunque stato del carosello
 * (attiva, in entrata, in uscita): la larghezza non dipende dal flusso della pagina. La dissolvenza tra le slide
 * e' gia' in bootstrap.css (.carousel-fade).
 */
#introSlider .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
}

#introSlider .intro-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/*
 * La foto riempie sempre tutto il riquadro dell'hero (a tutta larghezza e altezza), ritagliata al centro se il
 * formato e' diverso da quello dello schermo: mai bordi o spazi vuoti. max-width: none batte le regole di Bootstrap
 * sulle immagini.
 */
#introSlider .intro-slide img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}


/*OVERLAY*/

#intro .intro-overlay {
    position: absolute;
    inset: 0;

    background:linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgb(0 0 0 / 37%) 50%, rgba(0, 0, 0, 0.18) 100%);

    z-index: 2;
    pointer-events: none;
}


/* ==================================================
   LOGO / CONTENT
================================================== */

#intro .intro-caption-waper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    z-index: 3;

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

    width: 100%;
    height: 100%;
}

#intro .intro-full-height {
    width: 100%;
    height: 100%;

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

#intro .intro-content {
    width: 100%;

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

    text-align: center;
}

#intro .intro-content-inner {
    width: 100%;
}

#intro .titleIntro {
    margin: 0;
    padding: 0;
    width: 100%;
}

#intro .titleIntro img {
    display: block;
    width: 50vw;
    max-width: 1000px;
    height: auto;
    margin: 0 auto;

    transform: translateY(70px);
}


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

@media (max-width: 991.98px) {

    #intro .titleIntro img {
        width: 50vw;
        max-width: 800px;
    }

}


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

@media (max-width: 767.98px) {

    /*
     * theme.js imposta l'altezza dell'hero uguale a quella della finestra (stile inline): su un telefono in
     * verticale un'immagine orizzontale a tutta altezza mostra solo il 35-40% della larghezza. Qui l'hero e'
     * circa quadrato (altezza = larghezza dello schermo, tra 340 e 480 px), cosi' si vede molto piu' della foto.
     * !important serve a battere lo stile inline di theme.js.
     */
    #intro.intro-fullscreen,
    #intro .intro-full-height {
        height: clamp(340px, 100vw, 480px) !important;
        min-height: 0 !important;
    }

    #intro .titleIntro img {
        width: 85vw;
        max-width: none;
    }

}

/* ==================================================
   TOUR
================================================== */

/* =========================================================
   TOUR SECTION
========================================================= */

.tour-section {
    padding: 70px 40px;
    background: #fff;
}


/* =========================================================
   CARD
========================================================= */

.tour-card {
    height: 100%;
    text-align: center;
}

.tour-card-image {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.tour-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.tour-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform .6s ease;
}

.tour-card:hover .tour-card-image img {
    transform: scale(1.03);
}


/* =========================================================
   CARD CONTENT
========================================================= */

.tour-card-content {
    padding: 35px 12px 0;
    text-align: left;
}

.tour-card-title {
    max-width: 500px;

    margin: 0 auto 18px;

    color: #123d69;

    font-size: 22px;
    font-weight: 400;
    line-height: 1.35;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.tour-card-description {
    max-width: 500px;

    margin: 0 auto 22px;

    color: #666;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   LEGGI
========================================================= */

.btn-tour-read {
    display: inline-flex;

    align-items: center;

    color: #555;

    font-size: 18px;
    font-weight: 400;

    text-decoration: none;

    transition: color .25s ease;
}

.btn-tour-read span {
    margin-left: 8px;

    font-size: 30px;
    line-height: 1;

    transition: transform .25s ease;
}

.btn-tour-read:hover {
    color: #123d69;
    text-decoration: none;
}

.btn-tour-read:hover span {
    transform: translateX(4px);
}


/* =========================================================
   MODAL
========================================================= */

.tour-modal .modal-dialog {
    max-width: 900px;
}

.tour-modal .modal-content {
    position: relative;

    border: 0;
    border-radius: 0;

    overflow: hidden;

    background: #fff;
}


/* =========================================================
   MODAL CLOSE
========================================================= */

/* La X e' bianca su un riquadro blu scuro: si vede su qualsiasi sfondo (foto chiara, tour senza immagine). */
.tour-modal .tour-modal-close {
    position: absolute;

    top: 14px;
    right: 14px;

    z-index: 10;

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

    width: 48px;
    height: 48px;

    padding: 0 0 4px;

    border: 0;
    background: rgba(1, 51, 94, .88);

    color: #fff;

    font-size: 38px;
    font-weight: 400;
    line-height: 1;

    opacity: 1;

    text-shadow: none;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.tour-modal .tour-modal-close:hover,
.tour-modal .tour-modal-close:focus {
    background: #4c97c9;
    color: #fff;
    opacity: 1;
}

.tour-modal .tour-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}


/* =========================================================
   MODAL IMAGE
========================================================= */

.tour-modal-image {
    width: 100%;
    height: 400px;

    overflow: hidden;
}

.tour-modal-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   MODAL CONTENT
========================================================= */

.tour-modal-content {
    padding: 40px 50px 45px;

    text-align: center;
}

.tour-modal-content h2 {
    margin: 0 0 25px;

    color: #123d69;

    font-size: 28px;
    font-weight: 400;
    line-height: 1.3;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.tour-modal-description {
    max-width: 700px;

    margin: 0 auto 30px;

    color: #555;

    font-size: 16px;
    line-height: 1.8;
}

.tour-modal-description p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   PRENOTA
========================================================= */

.btn-tour-book {
    display: inline-flex;

    align-items: center;

    margin-top: 5px;

    padding: 12px 30px;

    background: #123d69;
    color: #fff;

    font-size: 16px;
    font-weight: 400;

    letter-spacing: 1px;

    text-transform: uppercase;
    text-decoration: none;

    transition:
        background .25s ease,
        color .25s ease;
}

.btn-tour-book span {
    margin-left: 8px;

    font-size: 25px;
    line-height: 1;

    transition: transform .25s ease;
}

.btn-tour-book:hover {
    background: #0c2d50;

    color: #fff;

    text-decoration: none;
}

.btn-tour-book:hover span {
    transform: translateX(4px);
}


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

@media (max-width: 991.98px) {

    .tour-section {
        padding: 60px 20px;
    }

    .tour-card-content {
        padding-left: 15px;
        padding-right: 15px;
    }

}


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

@media (max-width: 767.98px) {

    .tour-section {
        padding: 50px 15px;
    }

    .tour-card-content {
        padding: 25px 10px 0;
    }

    .tour-card-title {
        font-size: 18px;

        letter-spacing: 1.5px;
    }

    .tour-card-description {
        font-size: 14px;
    }

    .tour-modal .modal-dialog {
        margin: 15px;
    }

    .tour-modal-image {
        height: 250px;
    }

    .tour-modal-content {
        padding: 30px 25px 35px;
    }

    .tour-modal-content h2 {
        font-size: 22px;
    }

    .tour-modal-description {
        font-size: 15px;
        line-height: 1.7;
    }

}


/* ==================================================
   CHI SIAMO - RIQUADRI SENZA ICONA
================================================== */

.about-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 2px 5px 11px #ddd;
}


/* ==================================================
   TOUR - SOTTOTITOLO E TESTO
================================================== */

.tour-card-subtitle {
    max-width: 500px;

    margin: -8px auto 14px;

    color: #4c97c9;

    font-size: 14px;
    letter-spacing: 1px;
}

.tour-card-description p:last-child {
    margin-bottom: 0;
}

.tour-modal-subtitle {
    margin: -15px 0 20px;

    color: #4c97c9;

    font-size: 16px;
    letter-spacing: 1px;
}


/* ==================================================
   FORM DI PRENOTAZIONE - CASELLA PRIVACY
   Il tema azzera l'aspetto nativo delle caselle (appearance: none, bordo quasi
   trasparente): qui si disegna una casella ben visibile, con la spunta.
================================================== */

.royal-privacy {
    margin: 6px 0 4px;
    padding-left: 0;
}

.royal-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}

.royal-privacy input[type="checkbox"] {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    padding: 0;
    border: 2px solid #01335e;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 75%;
    cursor: pointer;
}

.royal-privacy input[type="checkbox"]:hover,
.royal-privacy input[type="checkbox"]:focus {
    border: 2px solid #4c97c9;
}

.royal-privacy input[type="checkbox"]:focus-visible {
    outline: 2px solid #4c97c9;
    outline-offset: 2px;
}

.royal-privacy input[type="checkbox"]:checked {
    border-color: #01335e;
    background-color: #01335e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E");
}

.royal-privacy a {
    color: #01335e;
    font-weight: 700;
    text-decoration: underline;
}

.royal-privacy a:hover {
    color: #4c97c9;
}

.royal-privacy .required {
    margin-left: 4px;
    color: #c0392b;
}

.form-group.has-error .royal-privacy input[type="checkbox"] {
    border-color: #c0392b;
}

.form-group.has-error .error.form-text {
    margin-top: 6px;
    color: #c0392b;
    font-size: 13px;
}


/* ==================================================
   GALLERY - RIGHE DI ALTEZZA UGUALE
   Le foto hanno proporzioni diverse (orizzontali, verticali, banner): in ogni riga
   hanno la stessa altezza e la larghezza segue il formato (--ratio, impostato nel
   template), cosi' le orizzontali si adattano alle verticali senza ritagli.
================================================== */

.gallery-popup {
    --gallery-row-height: 280px;
}

.gallery-popup::after {
    /* l'ultima riga non si allarga a tutta la larghezza */
    content: "";
    flex-grow: 100000;
}

.gallery-popup .gallery-item {
    flex: var(--ratio) 1 calc(var(--gallery-row-height) * var(--ratio));
    height: var(--gallery-row-height);
    padding: 2px;
}

.gallery-popup-link {
    display: block;
    height: 100%;
    overflow: hidden;
}

.gallery-popup-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-popup-link:hover img {
    transform: scale(1.04);
}

@media (max-width: 767.98px) {

    /*
     * Su mobile le righe hanno almeno 2 foto: l'altezza di partenza segue la larghezza dello
     * schermo (24vw), cosi' due foto fino a circa 2:1 stanno sempre nella stessa riga. L'altezza
     * non e' fissa: ogni foto ha il suo formato (aspect-ratio) e le larghezze crescono in
     * proporzione, quindi le foto di una riga restano alte uguali e non vengono ritagliate.
     */
    .gallery-popup {
        --gallery-row-height: 24vw;
        gap: 4px;
    }

    /* anche l'ultima riga si allarga a tutta la larghezza: niente miniatura isolata a meta' schermo */
    .gallery-popup::after {
        display: none;
    }

    .gallery-popup .gallery-item {
        height: auto;
        padding: 0;
    }

    .gallery-popup-link {
        height: auto;
        aspect-ratio: var(--ratio);
    }
}


/* ==================================================
   SELETTORE DI LINGUA (traduzione in inglese con Google Translate)
   Stesso aspetto e comportamento del selettore di Colibri: pulsante con globo e codice lingua,
   pannello con l'elenco, pastiglia piena con la X quando la traduzione e' attiva.
   La barra e i riquadri di Google restano nascosti.
================================================== */

.royal-lang {
    --royal-lang-navy: #01335e;
    --royal-lang-blue: #4c97c9;
    --royal-lang-tint: #e6f1f9;
    position: relative;
    float: right;
    margin: 33px 0 0 8px;
    text-align: left;
}

.header-fixed .royal-lang {
    margin-top: 16px;
}

@media all and (max-width: 1024px) {
    .royal-lang,
    .header-fixed .royal-lang {
        margin-top: 14px;
    }
}

.royal-lang__bar {
    display: flex;
    align-items: stretch;
}

.royal-lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    height: 36px;
    padding: 0 .75rem;
    /* Nessun riquadro a riposo: compare al passaggio del mouse, al focus e ad apertura. */
    border: 1.5px solid transparent;
    border-radius: 4px 16px 4px 16px;
    background: transparent;
    color: var(--royal-lang-navy);
    font-family: "Quicksand", sans-serif;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.royal-lang-toggle:hover,
.royal-lang-toggle[aria-expanded="true"] {
    background: var(--royal-lang-tint);
    border-color: var(--royal-lang-blue);
}

.royal-lang-toggle:focus-visible {
    outline: 2px solid var(--royal-lang-navy);
    outline-offset: 2px;
}

.royal-lang-toggle svg {
    width: 18px;
    height: 18px;
}

.royal-lang-toggle .royal-lang-toggle__chevron {
    width: 12px;
    height: 12px;
    transition: transform .2s ease;
}

.royal-lang-toggle[aria-expanded="true"] .royal-lang-toggle__chevron {
    transform: rotate(180deg);
}

/* Pulsazione una tantum finche' non si apre il selettore la prima volta (classe tolta da main.js). */
.royal-lang-toggle.is-hint {
    animation: royal-lang-pulse 2.2s ease-out 1.5s 3;
}

@keyframes royal-lang-pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 151, 201, .55); }
    70%, 100% { box-shadow: 0 0 0 12px rgba(76, 151, 201, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .royal-lang-toggle.is-hint { animation: none; }
}

@media (max-width: 575.98px) {
    .royal-lang-toggle__chevron { display: none; }
}

/* Traduzione attiva: pastiglia piena con "EN" e una X che torna all'originale (la X e' un pulsante
   accanto, perche' i pulsanti annidati non sono HTML valido). */
.royal-lang.is-translated .royal-lang-toggle {
    background: var(--royal-lang-blue);
    border-color: var(--royal-lang-blue);
    color: #fff;
    border-radius: 4px 0 0 16px;
    border-right-color: transparent;
}

.royal-lang.is-translated .royal-lang-toggle:hover,
.royal-lang.is-translated .royal-lang-toggle[aria-expanded="true"] {
    background: var(--royal-lang-navy);
    border-color: var(--royal-lang-navy);
    border-right-color: transparent;
}

.royal-lang-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 36px;
    padding: 0;
    border: 1.5px solid var(--royal-lang-blue);
    border-left: 1px solid rgba(255, 255, 255, .45);
    border-radius: 0 16px 4px 0;
    background: var(--royal-lang-blue);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.royal-lang-clear[hidden] { display: none; }
.royal-lang-clear:hover { background: var(--royal-lang-navy); }
.royal-lang-clear:focus-visible { outline: 2px solid var(--royal-lang-navy); outline-offset: 2px; }
.royal-lang-clear svg { width: 14px; height: 14px; }

.royal-lang-widget {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    z-index: 1050;
    width: 320px;
    max-width: calc(100vw - 2rem);
    max-height: 75vh;
    overflow-y: auto;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 6px 16px 6px 16px;
    box-shadow: 0 1rem 2rem rgba(1, 51, 94, .15);
    color: var(--royal-lang-navy);
    font-family: "Quicksand", sans-serif;
}

.royal-lang-widget[hidden] { display: none; }

.royal-lang-panel__title {
    margin: 0 0 .75rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--royal-lang-navy);
}

.royal-lang-panel__credit {
    margin: .75rem 0 0;
    font-size: .72rem;
    color: #6b7785;
}

.royal-lang-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.royal-lang-item {
    appearance: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid transparent;
    border-radius: 3px 12px 3px 12px;
    background: transparent;
    color: var(--royal-lang-navy);
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.royal-lang-item small {
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .65;
}

.royal-lang-item:hover { background: var(--royal-lang-tint); border-color: var(--royal-lang-blue); }
.royal-lang-item:focus-visible { outline: 2px solid var(--royal-lang-navy); outline-offset: 1px; }
.royal-lang-item.is-active { background: var(--royal-lang-blue); border-color: var(--royal-lang-blue); color: #fff; }

/* Il <select> di Google resta nella pagina (e' lui che traduce) ma e' invisibile: usano l'elenco sopra. */
.royal-lang-gadget {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Il contorno di Google: la barra in alto (iframe) che compare con la traduzione attiva e lo spazio che
   aggiunge al body, il suo font, il fumetto "Testo originale" al passaggio sul testo tradotto e il link
   "Seleziona lingua" (apre un iframe che non si puo' stilare: si usa il <select> di Google, nascosto). */
.goog-te-banner-frame,
iframe.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }

#goog-gt-tt,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }

body { top: 0 !important; }

.goog-te-gadget { font-family: inherit !important; font-size: 0 !important; }
.goog-te-gadget-simple { display: none !important; }

.goog-te-gadget .goog-te-combo {
    display: inline-block !important;
    width: 100%;
    min-width: 0;
    font-size: .9rem;
}


/* ==================================================
   RECENSIONI (testimonial-carousel)
   L'altezza della sezione e' FISSA: non cambia ne' al cambio di slide ne' se si aggiungono recensioni piu' lunghe.
   Il testo di ogni recensione sta in un riquadro alto sempre lo stesso numero di righe (--testimonial-lines, per
   larghezza dello schermo), centrato in verticale; se e' piu' lungo viene troncato con "..." (line-clamp).
   Le righe sono calcolate per le recensioni attuali con un po' di margine: se ne servono di piu' si alza il
   numero per la larghezza interessata. autoHeight di Owl e' spento in theme.js.
================================================== */

#testimonials {
    --testimonial-lines: 7;
}

@media (max-width: 767.98px) {
    #testimonials { --testimonial-lines: 9; }
}

@media (max-width: 575.98px) {
    #testimonials { --testimonial-lines: 10; }
}

@media (max-width: 414px) {
    #testimonials { --testimonial-lines: 13; }
}

@media (max-width: 360px) {
    #testimonials { --testimonial-lines: 16; }
}

#testimonials .testimonial p.lead {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(var(--testimonial-lines) * 1.6em); /* 1.6 = line-height dei paragrafi */
}

#testimonials .testimonial .testimonial-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--testimonial-lines);
    overflow: hidden;
}

#testimonials .testimonial .quote-author {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
