/* =========================================================
   INFOHOTEL - USER.CSS
   Joomla 6 / Cassiopeia Extended

   Variabili globali, font e stile base
   ========================================================= */

/* ---------------------------------------------------------
   FONT LOCALI
   --------------------------------------------------------- */

@font-face {
    font-family: "Mulish";
    src: url("/media/infohotel/fonts/mulish-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Mulish";
    src: url("/media/infohotel/fonts/mulish-semibold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Mulish";
    src: url("/media/infohotel/fonts/mulish-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Hind";
    src: url("/media/infohotel/fonts/hind-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Hind";
    src: url("/media/infohotel/fonts/hind-semibold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Hind";
    src: url("/media/infohotel/fonts/hind-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}



/* ---------------------------------------------------------
   1. COLORI E VARIABILI GLOBALI
   --------------------------------------------------------- */

:root {

    /* Font */
    --ih-font-body: "Muli", Arial, sans-serif;
    --ih-font-heading: "Muli", Arial, sans-serif;
    --ih-font-accent: "Hind", Arial, sans-serif;

    /* Colore principale InfoHOTEL */
    --ih-primary: #d20b22;
    --ih-primary-dark: #890716;

    /* Testi */
    --ih-text: #686868;
    --ih-heading: #282828;
    --ih-muted: #9b9b9b;

    /* Fondi */
    --ih-white: #ffffff;
    --ih-light: #f2f2f2;
    --ih-light-alt: #f1f2f6;

    /* Aree scure */
    --ih-dark: #20232a;
    --ih-dark-alt: #1b1e23;
    --ih-dark-deep: #17181d;

    /* Testi su fondo scuro */
    --ih-dark-text: #c1c1c1;
    --ih-dark-heading: #e8e8e8;

    /* Bordi */
    --ih-border: rgba(136, 136, 136, .25);

    /* Layout */
    --ih-radius: .1875rem;

}


/* ---------------------------------------------------------
   2. BASE
   --------------------------------------------------------- */

body {
    color: var(--ih-text);
    background-color: var(--ih-white);
    font-family: var(--ih-font-body);
    font-size: 1rem;
    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ---------------------------------------------------------
   3. LINK
   --------------------------------------------------------- */

a {
    color: var(--ih-primary);
    transition: color .2s ease;
}

a:hover,
a:focus {
    color: var(--ih-primary-dark);
}


/* ---------------------------------------------------------
   4. TITOLI
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ih-heading);
    font-family: var(--ih-font-heading);
    font-weight: 700;
}

.ih-section-title,
.ih-module-title {
    font-family: var(--ih-font-accent);
}

/* Dimensioni di riferimento del vecchio sito */

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.75rem;
}

h5 {
    font-size: 1.5rem;
}

h6 {
    font-size: 1.25rem;
}


/* ---------------------------------------------------------
   5. TESTO
   --------------------------------------------------------- */

p {
    margin: 0 0 1rem;
}

.text-muted,
small {
    color: var(--ih-muted);
}


/* ---------------------------------------------------------
   6. ELEMENTI BASE
   --------------------------------------------------------- */

hr {
    border: 0;
    border-bottom: 1px solid var(--ih-border);
}

img {
    max-width: 100%;
    height: auto;
}

/* fine stili di base */

/* =========================================================
   LEGACY COMPATIBILITY
   Compatibilità con contenuti migrati dal vecchio sito
   ========================================================= */


/* ---------------------------------------------------------
   1. BOTTONI LEGACY
   Vecchie classi RocketTheme: .button
   --------------------------------------------------------- */

.button {
    display: inline-block;
    font-weight: 700;
    background-color: var(--ih-primary, #c51f2f);
    color: #ffffff !important;
    font-size: 1rem;
    line-height: 1.5;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid transparent;
    margin: 0 0 .5rem;
    padding: .5rem 1.5rem;
    vertical-align: middle;
    text-shadow: none;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

.button:hover,
.button:focus,
.button:active {
    background-color: var(--ih-primary-dark, #a91a28);
    color: #ffffff !important;
    text-decoration: none;
}

.button.button-2 {
    border-radius: 2rem;
}

/* Variante outline */
.button.button-3 {
    background-color: transparent;
    color: var(--ih-primary, #c51f2f) !important;
    border-color: var(--ih-primary, #c51f2f);
    border-radius: 2rem;
    box-shadow: none;
}

.button.button-3:hover,
.button.button-3:focus,
.button.button-3:active {
    background-color: transparent;
    color: var(--ih-primary-dark, #a91a28) !important;
    border-color: var(--ih-primary-dark, #a91a28);
}


/* Varianti colore legacy */

.button.button-orange {
    background-color: #ee7933;
}

.button.button-orange:hover,
.button.button-orange:focus,
.button.button-orange:active {
    background-color: #c45410;
}

.button.button-blue {
    background-color: #279fba;
}

.button.button-blue:hover,
.button.button-blue:focus,
.button.button-blue:active {
    background-color: #1a697b;
}

.button.button-orange.button-3 {
    background-color: transparent;
    color: #ee7933 !important;
    border-color: #ee7933;
}

.button.button-orange.button-3:hover,
.button.button-orange.button-3:focus,
.button.button-orange.button-3:active {
    color: #c45410 !important;
    border-color: #c45410;
}

.button.button-blue.button-3 {
    background-color: transparent;
    color: #279fba !important;
    border-color: #279fba;
}

.button.button-blue.button-3:hover,
.button.button-blue.button-3:focus,
.button.button-blue.button-3:active {
    color: #1f7f95 !important;
    border-color: #1f7f95;
}



/* ---------------------------------------------------------
   2. GANTRY LEGACY GRID
   Compatibilità con vecchi contenuti che utilizzano
   .g-grid, .g-block, .g-size-* e .size-*
   --------------------------------------------------------- */

.g-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.g-block {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    flex-grow: 0;
    flex-shrink: 0;
}


/* Larghezze Gantry con prefisso g-size */

.g-block.g-size-100 {
    flex-basis: 100%;
    max-width: 100%;
}

.g-block.g-size-75 {
    flex-basis: 75%;
    max-width: 75%;
}

.g-block.g-size-67,
.g-block.g-size-66 {
    flex-basis: 66.666666%;
    max-width: 66.666666%;
}

.g-block.g-size-60 {
    flex-basis: 60%;
    max-width: 60%;
}

.g-block.g-size-50 {
    flex-basis: 50%;
    max-width: 50%;
}

.g-block.g-size-40 {
    flex-basis: 40%;
    max-width: 40%;
}

.g-block.g-size-33 {
    flex-basis: 33.333333%;
    max-width: 33.333333%;
}

.g-block.g-size-25 {
    flex-basis: 25%;
    max-width: 25%;
}

.g-block.g-size-20 {
    flex-basis: 20%;
    max-width: 20%;
}


/* Alcuni vecchi contenuti possono usare size-* senza g- */

.g-block.size-100 {
    flex-basis: 100%;
    max-width: 100%;
}

.g-block.size-75 {
    flex-basis: 75%;
    max-width: 75%;
}

.g-block.size-67,
.g-block.size-66 {
    flex-basis: 66.666666%;
    max-width: 66.666666%;
}

.g-block.size-60 {
    flex-basis: 60%;
    max-width: 60%;
}

.g-block.size-50 {
    flex-basis: 50%;
    max-width: 50%;
}

.g-block.size-40 {
    flex-basis: 40%;
    max-width: 40%;
}

.g-block.size-33 {
    flex-basis: 33.333333%;
    max-width: 33.333333%;
}

.g-block.size-25 {
    flex-basis: 25%;
    max-width: 25%;
}

.g-block.size-20 {
    flex-basis: 20%;
    max-width: 20%;
}


/* Immagini responsive nei vecchi blocchi Gantry */

.g-block img {
    max-width: 100%;
    height: auto;
}


/* Su smartphone i blocchi legacy vengono impilati */

@media (max-width: 767.98px) {

    .g-block[class*="g-size-"],
    .g-block[class*="size-"] {
        flex-basis: 100%;
        max-width: 100%;
    }

}



/* ---------------------------------------------------------
   3. ALERT LEGACY
   Compatibilità con box inseriti nei vecchi articoli.
   Bootstrap 5 mantiene .alert, ma questi stili conservano
   maggiormente l'aspetto dei contenuti precedenti.
   --------------------------------------------------------- */

.alert {
    border-radius: .1875rem;
    padding: .938rem;
    margin-bottom: 1.5rem;
    text-shadow: none;
}

.alert-info {
    color: #3a87ad;
    background-color: #e2eff5 !important;
    border: 1px solid #c7e0ec !important;
}

.alert-success {
    color: #468847;
    background-color: #dfeedf !important;
    border: 1px solid #c4e0c4 !important;
}



/* ---------------------------------------------------------
   4. LABEL E BADGE LEGACY
   Bootstrap moderno non utilizza più .label.
   Necessario per vecchi contenuti Joomla/RocketTheme.
   --------------------------------------------------------- */

.label,
.badge {
    display: inline-block;
    padding: 2px 4px;
    font-size: 11.844px;
    font-weight: 700;
    line-height: 14px;
    color: #ffffff;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 3px;
}

.label-info,
.label-info[href] {
    background-color: #2d6987;
    color: #ffffff;
}

/* fine stili legacy */

/* =========================================================
   INFOHOTEL - HEADER / TOPBAR
   Joomla 6 / Cassiopeia Extended
   ========================================================= */


/* ---------------------------------------------------------
   1. CONTENITORE HEADER CASSIOPEIA
   --------------------------------------------------------- */

.container-header {
    position: relative;
    z-index: 1030;

    width: 100%;

    background: #ffffff;
    background-image: none;

    box-shadow: none;
}


/*
 * La posizione menu di Cassiopeia deve occupare
 * tutta la larghezza.
 */

.container-header .container-nav {
    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;
}


/* Il modulo HTML occupa tutta la larghezza */

.container-header .container-nav > div,
.container-header .mod-custom {
    width: 100%;
}


/* =========================================================
   2. TOPBAR INFOHOTEL
   ========================================================= */

.ih-topbar {
    position: relative;

    width: 100%;

    background-color: #ffffff;
}


.ih-topbar > .container {
    width: 100%;
    max-width: 1200px;

    margin-right: auto;
    margin-left: auto;
}


/*
 * Tre colonne:
 *
 * sinistra = hamburger
 * centro   = logo
 * destra   = social
 *
 * Le due colonne laterali hanno identica larghezza,
 * quindi il logo resta perfettamente centrato.
 */

.ih-topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    width: 100%;
    min-height: 88px;
}


/* =========================================================
   3. HAMBURGER
   ========================================================= */

.ih-topbar-menu {
    justify-self: start;
}


.ih-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    margin: 0;
    padding: 0;

    color: var(--ih-heading);

    background: transparent;

    border: 0;
    border-radius: 0;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition: color .2s ease;
}


.ih-menu-toggle i {
    display: block;

    font-size: 24px;
    line-height: 1;
}


.ih-menu-toggle:hover,
.ih-menu-toggle:focus {
    color: var(--ih-primary);

    background: transparent;
}


.ih-menu-toggle:focus-visible {
    outline: 2px solid var(--ih-primary);
    outline-offset: 3px;
}


/* =========================================================
   4. LOGO
   ========================================================= */

.ih-topbar-logo {
    justify-self: center;
}


.ih-topbar-logo a {
    display: block;

    line-height: 0;
    text-decoration: none;
}


.ih-topbar-logo img {
    display: block;

    width: 220px;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   5. SOCIAL
   ========================================================= */

.ih-topbar-social {
    justify-self: end;

    display: flex;
    align-items: center;

    gap: 8px;
}

.ih-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    background-color: #d6d6d6;
    color: #ffffff;

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

    text-decoration: none;

    border-radius: 4px;

    transition:
        background-color .2s ease,
        opacity .2s ease;
}

.ih-social-link i {
    display: block;

    color: #ffffff;

    line-height: 1;
}


/* Facebook */

.ih-social-link:has(.fa-facebook-f):hover,
.ih-social-link:has(.fa-facebook-f):focus {
    background-color: #0866ff;
}


/* LinkedIn */

.ih-social-link:has(.fa-linkedin-in):hover,
.ih-social-link:has(.fa-linkedin-in):focus {
    background-color: #0a66c2;
}


/* Hover / focus */

.ih-social-link:hover,
.ih-social-link:focus {
    color: #ffffff;

    text-decoration: none;
}


/* Focus da tastiera */

.ih-social-link:focus-visible {
    outline: 2px solid var(--ih-primary);
    outline-offset: 2px;
}

/* =========================================================
   6. HOME DESKTOP
   Header trasparente sopra il carosello
   ========================================================= */

@media (min-width: 768px) {

    body.home .container-header {
        position: absolute;

        top: 0;
        right: 0;
        left: 0;

        width: 100%;

        background: transparent;
        background-image: none;

        box-shadow: none;
    }


    body.home .ih-topbar {
        background: transparent;
    }


    /*
     * Sull'immagine del carosello hamburger e social
     * vengono visualizzati in bianco.
     */

    body.home .ih-menu-toggle {
        color: #ffffff;
    }


    body.home .ih-menu-toggle:hover,
    body.home .ih-menu-toggle:focus {
        color: var(--ih-primary);
    }

}


/* =========================================================
   7. PAGINE INTERNE
   ========================================================= */

body:not(.home) .container-header {
    position: relative;

    background: #ffffff;
    background-image: none;
}


body:not(.home) .ih-topbar {
    background-color: #ffffff;
}


/* =========================================================
   8. OFFCANVAS
   ========================================================= */

.ih-offcanvas {
    width: min(380px, 90vw);

    color: var(--ih-text);

    background-color: #ffffff;

    border-right: 0;
}


.ih-offcanvas .offcanvas-header {
    min-height: 76px;

    padding: 1.25rem 1.5rem;

    border-bottom: 1px solid var(--ih-border);
}


.ih-offcanvas .offcanvas-title {
    margin: 0;

    font-family: var(--ih-font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;

    color: var(--ih-heading);
}


.ih-offcanvas .btn-close {
    margin: 0;

    opacity: .65;
}


.ih-offcanvas .btn-close:hover,
.ih-offcanvas .btn-close:focus {
    opacity: 1;
}


.ih-offcanvas .offcanvas-body {
    padding: .5rem 1.5rem 2rem;
}


/* =========================================================
   9. MODULO MENU JOOMLA NELL'OFFCANVAS
   ========================================================= */

/*
 * Joomla genera:
 *
 * <ul class="mod-menu mod-list nav">
 *
 * .nav di Bootstrap è flex; nell'offcanvas
 * lo trasformiamo in un normale menu verticale.
 */

.ih-offcanvas .mod-menu {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    list-style: none;
}


/* Voci principali */

.ih-offcanvas .mod-menu > li {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    border-bottom: 1px solid var(--ih-border);
}


/* Link principali */

.ih-offcanvas .mod-menu > li > a {
    display: block;

    width: 100%;

    padding: 1rem 0;

    font-family: var(--ih-font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;

    color: var(--ih-heading);

    background: transparent;

    text-decoration: none;

    transition:
        color .2s ease,
        padding-left .2s ease;
}


.ih-offcanvas .mod-menu > li > a:hover,
.ih-offcanvas .mod-menu > li > a:focus {
    color: var(--ih-primary);

    padding-left: .25rem;

    text-decoration: none;
}


/* Voce corrente */

.ih-offcanvas .mod-menu > .active > a,
.ih-offcanvas .mod-menu > .current > a {
    color: var(--ih-primary);
    font-weight: 700;
}


/* Eventuali sottomenu */

.ih-offcanvas .mod-menu ul {
    display: block;

    margin: 0;
    padding: 0 0 .65rem 1rem;

    list-style: none;
}


.ih-offcanvas .mod-menu ul li {
    display: block;

    margin: 0;
    padding: 0;
}


.ih-offcanvas .mod-menu ul a {
    display: block;

    padding: .5rem 0;

    font-family: var(--ih-font-body);
    font-size: .94rem;
    font-weight: 400;
    line-height: 1.35;

    color: var(--ih-text);

    text-decoration: none;
}


.ih-offcanvas .mod-menu ul a:hover,
.ih-offcanvas .mod-menu ul a:focus {
    color: var(--ih-primary);
}


/* =========================================================
   10. MOBILE
   Header sempre bianco
   ========================================================= */

@media (max-width: 767.98px) {

    .container-header,
    body.home .container-header,
    body:not(.home) .container-header {
        position: relative;

        background: #ffffff;
        background-image: none;

        box-shadow: none;
    }


    .ih-topbar,
    body.home .ih-topbar {
        background-color: #ffffff;
    }


    /*
     * Manteniamo tre colonne simmetriche.
     *
     * I social sono nascosti ma la colonna destra resta
     * disponibile per mantenere il logo centrato.
     */

    .ih-topbar-inner {
        grid-template-columns: 48px 1fr 48px;

        min-height: 74px;
    }


    .ih-topbar-menu {
        grid-column: 1;

        justify-self: start;
    }


    .ih-topbar-logo {
        grid-column: 2;

        justify-self: center;
    }


    .ih-topbar-social {
        grid-column: 3;

        display: none;
    }


    .ih-topbar-logo img {
        width: 200px;
    }


    /*
     * In home desktop hamburger e social sono bianchi.
     * Su mobile l'hamburger deve tornare scuro.
     */

    body.home .ih-menu-toggle {
        color: var(--ih-heading);
    }


    body.home .ih-menu-toggle:hover,
    body.home .ih-menu-toggle:focus {
        color: var(--ih-primary);
    }

}


/* =========================================================
   11. TELEFONI PICCOLI
   ========================================================= */

@media (max-width: 420px) {

    .ih-topbar > .container {
        padding-right: 12px;
        padding-left: 12px;
    }


    .ih-topbar-inner {
        min-height: 70px;
    }


    .ih-topbar-logo img {
        width: 180px;
    }


    .ih-menu-toggle {
        width: 40px;
        height: 40px;
    }


    .ih-menu-toggle i {
        font-size: 22px;
    }

}
