﻿
.mw-400 {
    max-width: 400px;
}

.display-none {
    display: none !important;
}
.bg-color-cream, .bg-cream {
    background-color: var(--cream) !important;
}
/*
* Buttons header 
*/
.custom-btn-style-1 {
    position: relative;
    transition: ease transform 300ms;
}

    .custom-btn-style-1 > span {
        position: relative;
        z-index: 1;
    }

    .custom-btn-style-1:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: inherit;
        opacity: 0.7;
        border-radius: inherit;
        transform: translate3d(5px, 5px, 0);
        transition: ease transform 300ms;
        z-index: 0;
    }

    .custom-btn-style-1:hover {
        transform: translate3d(2.5px, 2.5px, 0);
    }

        .custom-btn-style-1:hover:before {
            transform: translate3d(0, 0, 0);
        }

/* Iscrizione Gare mobile (sotto il logo): testo e altezza ridotti */
.custom-btn-iscrizione-mobile {
    font-size: 0.85rem;
    line-height: 1.2;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/*
* end Buttons header
*/

/* Logo mobile: senza il pulsante accanto può essere più grande */
@media (max-width: 991px) {
    #header .header-logo img {
        max-width: 220px;
        height: auto;
    }
}


/*
* Card news (NewsLista e bc3-NewsHp): immagine ad altezza fissa,
* ritagliata senza deformarla e inquadrata dall'alto (titolo delle locandine)
*/
.custom-news-card-img img {
    width: 100%;
    height: 205px;
    object-fit: cover;
    object-position: top;
}

/*
* Box data delle card news (NewsLista e bc3-NewsHp): giorno, mese, anno.
* Le dimensioni sono relative al box (text-5-5): il mese resta custom-font-size-1 (0.6em)
*/
.custom-date-giorno {
    font-size: 0.85em;
}

.custom-font-size-2 {
    /*font-size: 0.5em;*/
    font-size: 0.6em; /* uguale al mese (custom-font-size-1) */
    line-height: 1.3;
}

/*
* Dettaglio foto gallery (FotoGalleryDettaglio): miniature Flickr e scroll a blocchi
*/
.custom-foto-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Foto oltre il primo blocco: mostrate dallo script durante lo scroll */
.custom-foto-nascosta {
    display: none !important;
}

.custom-foto-sentinella {
    height: 1px;
}

/*
* Video gallery (VideoGalleryLista): icona play al centro dell'anteprima
*/
.custom-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding-left: 4px; /* centra otticamente il triangolo */
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.4rem;
    transform: translate(-50%, -50%);
    transition: background-color 300ms, transform 300ms;
    pointer-events: none;
}

.custom-video-popup:hover .custom-video-play {
    background-color: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Immagine principale del dettaglio news: cursore "zoom" (si ingrandisce al clic) */
.custom-img-zoom {
    cursor: zoom-in;
}

/*
* Form iscrizioni (Controls/FormIscrizione.ascx): errori dei campi.
* Copiato dal vecchio progetto (Assets/css/Master.css): FormManager.AddClassError aggiunge "panel-error" al pannello del campo
*/
.panel-error label {
    --bs-text-opacity: 1;
    color: rgba(220, 53, 69, var(--bs-text-opacity)) !important;
}

.panel-error input,
.panel-error textarea,
.panel-error select {
    border-color: #dc3545 !important;
}

.form-group span.span-error {
    display: none;
}

.panel-error .span-error {
    display: flex !important;
}

/* ANTISPAM: campo trappola (honeypot) fuori dallo schermo, invisibile agli utenti ma presente nell'html per i bot */
.custom-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/*
* Consenso cookie (Controls/CookieBanner.ascx + js/cookie-consenso.js): base = stili GDPR di Porto (.gdpr-bar, .gdpr-preferences-popup)
*/
.custom-cookie-bar {
    padding-right: 3.5rem;
}

    .custom-cookie-bar .custom-cookie-chiudi {
        position: absolute;
        top: 0.75rem;
        right: 1rem;
        font-size: 1.2rem;
        opacity: 0.8;
    }

        .custom-cookie-bar .custom-cookie-chiudi:hover {
            opacity: 1;
        }

    /* Tre azioni (Personalizza / Rifiuta / Accetta tutti) che vanno a capo su schermi piccoli */
    .custom-cookie-bar .custom-cookie-bar-azioni {
        flex-wrap: wrap;
        gap: 0.75rem 1.5rem;
        justify-content: flex-end;
    }

        .custom-cookie-bar .custom-cookie-bar-azioni .btn {
            margin-left: 0 !important;
        }

.custom-cookie-popup-footer {
    flex-wrap: wrap;
    gap: 1rem;
}

    .custom-cookie-popup-footer .custom-cookie-popup-pulsanti {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

/* Contenuto bloccato in attesa del consenso (CookieManager.ProteggiIframe) */
.custom-consenso-embed {
    position: relative;
    min-height: 220px;
    margin-bottom: 1rem;
}

    .custom-consenso-embed > template {
        display: none;
    }

.custom-consenso-avviso {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 220px;
    padding: 1.5rem;
    text-align: center;
    background-color: #212529;
    color: #fff;
    font-size: 0.9rem;
}

/* Video bloccato nel popup Magnific della video gallery */
.custom-video-bloccato {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

/*
* Barra avvisi (PanelNoticeTopBar in HeadTop.ascx): lo sfondo si sceglie dal CMS (Altrocampo2 dell'articolo Home -> classe bg-...).
* Solo con sfondo GIALLO (bg-tertiary = giallo del tema, bg-warning = giallo Bootstrap) testo e link diventano blu (--quaternary);
* con tutti gli altri colori restano bianchi.
*/
.notice-top-bar.bg-tertiary .text-color-light,
.notice-top-bar.bg-warning .text-color-light {
    color: var(--quaternary) !important;
}

.notice-top-bar.bg-tertiary .custom-text-underline-1,
.notice-top-bar.bg-warning .custom-text-underline-1 {
    border-bottom-color: rgba(7, 42, 64, 0.7); /* --quaternary al 70%, come prima il bianco */
}

/*
* Menu principale (HeadTop.ascx) solo desktop: voci più grandi; sottomenu blu tono su tono con l'header (--quaternary #072A40), testo bianco più grande.
* Su mobile resta lo stile di Porto.
*/
:root {
    --custom-menu-bg: #0E3A56;       /* sfondo del sottomenu (header un po' più chiaro) */
    --custom-menu-bg-hover: #15496B; /* voce al passaggio del mouse */
}

@media (min-width: 992px) {
    /* Voci del menu principale: Porto 14px -> 16px */
    #header .header-nav-main nav > ul > li > a {
        /*font-size: 16.8px;*/
        font-size: 16px;
    }

    #header .header-nav-main nav > ul > li.dropdown .dropdown-menu {
        background-color: var(--custom-menu-bg);
        border-top-color: var(--custom-menu-bg);
        box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.35);
    }

        #header .header-nav-main nav > ul > li.dropdown .dropdown-menu li a {
            color: #fff;
            /*font-size: 0.95em;*/
            font-size: 0.90em;
            font-weight: 500;
            letter-spacing: 0;
            border-bottom-color: rgba(255, 255, 255, 0.08);
        }

            #header .header-nav-main nav > ul > li.dropdown .dropdown-menu li:hover > a,
            #header .header-nav-main nav > ul > li.dropdown .dropdown-menu li:focus > a,
            #header .header-nav-main nav > ul > li.dropdown .dropdown-menu li.active > a,
            #header .header-nav-main nav > ul > li.dropdown .dropdown-menu li a:hover,
            #header .header-nav-main nav > ul > li.dropdown .dropdown-menu li a:focus {
                background-color: var(--custom-menu-bg-hover);
                color: #fff;
            }
}

/*
* Card sponsor (SponsorLista): riquadro ad altezza fissa,
* logo intero e centrato (non ritagliato) su sfondo bianco
*/
.custom-sponsor-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    padding: 20px;
    background-color: #fff;
}

    .custom-sponsor-card-img img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.counters [class*="fa-"] {
    display: inline !important;
}

@media (max-width: 576px) {

    .img-fluid-mobile {
        max-width: 100%;
        height: auto;
    }

}

.page-header.page-header-modern.page-header-background.page-header-background-sm {
    padding: 25px 0 !important;
}