/* /assets/css/typography.css (esempio) */

/* Regular (400) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Regular.woff2") format("woff2"),
        url("../fonts/Aventa-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Italic (400) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-LightItalic.woff2") format("woff2"),
        url("../fonts/Aventa-LightItalic.woff") format("woff");
    font-weight: 400;
    /* se hai Aventa-RegularItalic usa quello; altrimenti mappa questo a 400 */
    font-style: italic;
    font-display: swap;
}

/* Medium (500) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Medium.woff2") format("woff2"),
        url("../fonts/Aventa-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* SemiBold (600) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-SemiBold.woff2") format("woff2"),
        url("../fonts/Aventa-SemiBold.woff") format("woff");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Bold (700) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Bold.woff2") format("woff2"),
        url("../fonts/Aventa-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Bold Italic (700 italic) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-BoldItalic.woff2") format("woff2"),
        url("../fonts/Aventa-BoldItalic.woff") format("woff");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Black (900) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Black.woff2") format("woff2"),
        url("../fonts/Aventa-Black.woff") format("woff");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Black Italic (900 italic) */
@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-BlackItalic.woff2") format("woff2"),
        url("../fonts/Aventa-BlackItalic.woff") format("woff");
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* Imposta Aventa come font principale di Bootstrap */
:root {
    --bs-body-font-family: "Aventa", system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}



/* ---- Topbar (mini nav) ---- */
#site-header .topbar {
    background: #0f1e4e;
    /* scuro coerente con brand */
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: transform .25s ease, opacity .25s ease;
}

#site-header .topbar .topbar-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: .2px;
}

#site-header .topbar .topbar-link:hover {
    opacity: .9;
}

/* Stato nascosto allo scroll */
#site-header.is-scrolled .topbar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* ---- Navbar glass principale ---- */
/* ---- Topbar che collassa (niente "buco") ---- */
#site-header .topbar {
    background: #0f1e4e;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    /* Collasso fluido */
    max-height: 40px;
    /* altezza visiva */
    overflow: hidden;
    padding-block: 6px;
    /* py-1 circa */
    transition: max-height .25s ease, padding .25s ease, opacity .2s ease, border-color .2s ease;
}

#site-header .topbar .topbar-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: .2px;
}

#site-header .topbar .topbar-link:hover {
    opacity: .9;
}

/* Stato nascosto allo scroll: rimuovi anche l’altezza */
#site-header.is-scrolled .topbar {
    max-height: 0;
    padding-block: 0;
    opacity: 0;
    border-bottom-color: transparent;
}

/* ---- Navbar: solida in cima, glass quando si scorre ---- */
.navbar-glass {
    /* dimensioni “cicciotte” */
    --pad-y: .9rem;
    padding-top: var(--pad-y);
    padding-bottom: var(--pad-y);

    /* IN CIMA: solido scuro */
    background: #0f1e4e;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: background .2s ease, box-shadow .2s ease, padding .2s ease, border-color .2s ease, backdrop-filter .2s ease;
}

/* ON SCROLL: effetto vetro (si vede il contenuto sotto) */
#site-header.is-scrolled .navbar-glass {
    --pad-y: .7rem;
    background: rgba(15, 30, 78, .45);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    border-bottom-color: rgba(0, 0, 0, .08);
}

/* ---- Tipografia link menu ---- */
.navbar .nav-link {
    text-transform: uppercase;
    font-weight: 700;
    font-size: .85rem;
    /* un po’ più piccolo */
    letter-spacing: .04em;
    opacity: .95;
    padding: .5rem .75rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    opacity: 1;
}

/* Brand leggermente compatto */
.navbar .navbar-brand {
    font-size: 1rem;
    font-weight: 700;
}

/* Dropdown */
.navbar .dropdown-menu {
    border-radius: .75rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

/* Burger */
.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, .25);
}

/* Focus accessibile su sfondo scuro */
#site-header a:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}



/* Footer istituzionale */
.footer-edu {
    --footer-bg: #0f1e4e;
    /* scuro coerente con #203F93 */
    --footer-accent: #203F93;
    /* brand */
    background: radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .06) 0%, transparent 55%), var(--footer-bg);
}

.footer-edu a {
    text-decoration: none;
}

.footer-edu .link-opacity-75-hover:hover {
    opacity: .9;
}

.footer-edu .footer-bottom {
    background: rgba(255, 255, 255, .05);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* Bottoncino “torna su” */
.footer-edu .back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}

.footer-edu .back-to-top.show {
    display: inline-flex;
}

/* Accessibilità: focus visibile su link nel footer scuro */
.footer-edu a:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Riduci intensità effetti se preferenze di movimento ridotte */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
}



/**
========================================
HOME PAGE - HERO CON TITOLO E VIDEO
========================================
*/
.hero-split {
    --hero-bg: #203F93;
}

.hero-split .bg-euganeo {
    background: var(--hero-bg);
}

/* wrapper waves */
.it-hero-wrapper {
    position: relative;
    z-index: 0;
}

.it-hero-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("/assets/images/waves.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.10;
    pointer-events: none;
}

.it-hero-wrapper,
.it-hero-wrapper::before {
    border-radius: inherit;
}

.hero-split .media-wrap {
    position: relative;
    /* min-height: 360px; */
}

@media (min-width: 992px) {
    .hero-split .media-wrap {
        /* min-height: 560px; */
    }
}

/* video cover */
.hero-split .media-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Allinea il testo a sx con il contenuto della navbar (.container) */
.align-with-container {
    padding-right: 1rem;
    padding-left: 1rem;
}

/* default mobile */
/* Bootstrap container max-widths: lg=960px, xl=1140px, xxl=1320px */
@media (min-width: 992px) {

    /* lg */
    .align-with-container {
        padding-left: calc((100vw - 960px)/2 + .75rem);
        padding-right: 2rem;
    }
}

@media (min-width: 1200px) {

    /* xl */
    .align-with-container {
        padding-left: calc((100vw - 1140px)/2 + .75rem);
    }
}

@media (min-width: 1400px) {

    /* xxl */
    .align-with-container {
        padding-left: calc((100vw - 1320px)/2 + .75rem);
    }
}

/* rispetto preferenze utente */
@media (prefers-reduced-motion: reduce) {
    .hero-split .media-wrap video {
        display: none;
    }
}


/**
========================================
HOME PAGE - INDIRIZZI
========================================
*/
/* ---------- Card base ---------- */
.card-percorso {
    --card-bg: #203F93;
    --radius: 1rem;

    position: relative;
    color: #fff;
    background: var(--card-bg);
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;

    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.card-percorso:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.card-percorso .card-body {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem 1rem 1.25rem 1.25rem;
}

/* overlay per leggibilità del titolo, sopra l’immagine */
.card-percorso::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg,
            color-mix(in srgb, var(--card-bg) 80%, transparent) 0%,
            color-mix(in srgb, var(--card-bg) 60%, transparent) 55%,
            transparent 85%),
        linear-gradient(0deg,
            color-mix(in srgb, var(--card-bg) 70%, transparent) 0%,
            transparent 55%);
}

.card-percorso h3 {
    margin: 0;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .14);
}

/* immagine scontornata che “sborda” in basso a destra */
.card-percorso .card-figure {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    /* transform: translate(6%, 6%); */
    pointer-events: none;
}

/* ---------- Layout: griglia desktop/tablet ---------- */
/* per default nascondiamo la griglia e mostriamo il carosello (mobile-first) */
.grid-percorsi {
    display: none;
}

.carousel-percorsi {
    display: grid;
}

/* ≥576px: attiva la griglia e spegni il carosello */
@media (min-width: 576px) {
    .grid-percorsi {
        display: grid;
    }

    .carousel-percorsi {
        display: none;
    }
}

/* Griglia responsive: 2 col (sm), 3 col (md), 5 col (lg+) */
.grid-percorsi {
    gap: 1rem;
    /* le colonne si definiscono per breakpoint */
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .grid-percorsi {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* DESKTOP: 5 colonne fisse ⇒ con 10 elementi ottieni 2 righe */
@media (min-width: 992px) {
    .grid-percorsi {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Le card riempiono le celle; altezza fissa per avere 2 righe omogenee */
.grid-percorsi .card-percorso {
    width: 100%;
    height: 320px;
    /* puoi portarla a 360px se vuoi più aria */
    border-radius: 1rem;
}

/* ---------- Layout: carosello mobile con “peek” ---------- */
.carousel-percorsi {
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    /* mostra ~28% della card successiva (peek) */
    gap: 1rem;
    overflow-x: auto;
    padding: .5rem 1rem 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-percorsi .card-percorso {
    width: auto;
    /* larghezza determinata da grid-auto-columns */
    height: 300px;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

/* nascondi la scrollbar visivamente, ma lascia lo scroll */
.carousel-percorsi {
    scrollbar-width: none;
}

.carousel-percorsi::-webkit-scrollbar {
    display: none;
}

/* schermi molto larghi: un filo più grandi (opzionale) */
@media (min-width: 1400px) {
    .grid-percorsi .card-percorso {
        height: 340px;
    }
}


/**
========================================
HOME PAGE - SCEGLI NOI
========================================
*/

#perche-noi .vp {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}

#perche-noi .vp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#perche-noi .vp-ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #203F93;
    color: #fff;
    margin-bottom: .75rem;
    font-size: 1.25rem;
}

/**
========================================
HOME PAGE - progetti
========================================
*/
/* Card con immagine “coperta” + overlay gradiente per leggibilità */
.card-progetto {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #203F93;
    /* fallback sotto all'immagine */
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.card-progetto:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.card-progetto-media {
    position: relative;
}

.card-progetto-media img {
    object-fit: cover;
    border: 0;
    border-radius: 0;
}

/* overlay sopra l’immagine, sotto al testo */
.card-progetto-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, 0) 100%);
}

/* spaziatura del corpo e contrasto */
.card-progetto .card-body {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(32, 63, 147, .75) 100%);
    /* il gradiente del body “si appoggia” sull’immagine per dare base al testo */
    padding: 1rem 1.25rem 1.25rem;
}

.card-progetto h3 {
    margin-bottom: .25rem;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

.card-progetto p {
    margin-bottom: 1rem;
}


/**
========================================
HOME PAGE - testimonianze
========================================
*/
/* Testimonianze */
.quote-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}

.quote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .1);
}

.quote-card blockquote p {
    font-size: 1.05rem;
    line-height: 1.5;
    text-wrap: balance;
}

.quote-card .avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    background: #eee;
}

/* Accessibilità: riduci movimento */
@media (prefers-reduced-motion: reduce) {
    .quote-card {
        transition: none;
    }
}


/**
========================================
HOME PAGE - call to action
========================================
*/
/* CTA conversion */
#cta-prenota .cta-box {
    background: linear-gradient(135deg, #203F93 0%, #2F5FDB 100%);
    color: #fff;
    border: 0;
    border-radius: 1.25rem;
    padding: 1.5rem 1.5rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

@media (min-width: 768px) {
    #cta-prenota .cta-box {
        padding: 2rem 2.25rem;
    }
}

#cta-prenota .cta-copy h2 {
    letter-spacing: .2px;
}

#cta-prenota .btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

#cta-prenota .btn:hover {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    #cta-prenota .btn:hover {
        transform: none;
    }
}


/**
========================================
HOME PAGE - info e faq
========================================
*/
/* Info pratiche – card & lista */
#info .info-card,
#info .map-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .05);
}

#info .info-list li {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .5rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, .06);
}

#info .info-list li:last-child {
    border-bottom: 0;
}

#info .info-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: .75rem;
    background: #203F93;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    flex: 0 0 36px;
}

/* Riduci ombre in motion-reduce */
@media (prefers-reduced-motion: reduce) {

    #info .info-card,
    #info .map-card {
        box-shadow: none;
    }
}

.map-card {
    background: #f8f9fa;
}

.map-wrap {
    height: 320px;
}

@media (min-width: 768px) {
    .map-wrap {
        height: 420px;
    }
}

@media (min-width: 1200px) {
    .map-wrap {
        height: 480px;
    }
}



/**
PAGINA INTERNA - SCUOLA APERTA
*/
/* step indicator */
.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e9ecef;
    font-weight: 700
}

.step-active {
    background: #203F93;
    color: #fff
}

.step-line {
    height: 3px;
    background: linear-gradient(90deg, #203F93 50%, transparent 50%);
    background-size: 16px 3px;
    background-repeat: repeat-x;
    opacity: .25
}

/* card selezionabili (radio sotto) */
.card-select {
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.card-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.card-select input:checked+.card-body,
.card-select input:checked~.card-body,
.card-select.card-checked .card-body {}

.card-select input:checked~*,
.card-select.card-checked {
    border-color: #203F93;
    box-shadow: 0 0 0 3px rgba(32, 63, 147, .15);
}

/* mini card indirizzo (colore pieno) */
.card-percorso-mini {
    color: #fff;
    border: 0;
    background: var(--card-bg, #203F93);
    min-height: 84px;
}

.card-percorso-mini .card-body {
    display: flex;
    align-items: flex-end;
}

.card-percorso-mini::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 60%);
}

/* orari a pillola-card */
.time-card {
    border: 2px solid #dee2e6;
    border-radius: .75rem;
    padding: .6rem .9rem;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
}

.time-card.active {
    border-color: #203F93;
    box-shadow: 0 0 0 3px rgba(32, 63, 147, .15);
}

/* sede evidenziata */
.sede-card {
    border: 2px solid #e9ecef;
}

.sede-card.active {
    border-color: #203F93;
    box-shadow: 0 0 0 3px rgba(32, 63, 147, .15);
}

/* riduci motion */
@media (prefers-reduced-motion: reduce) {
    .card-select {
        transition: none
    }
}


/* Bottoni data “segna/attiva” */
#sa-hero .sa-date {
    border-radius: 999px;
    padding: .375rem .875rem;
}

#sa-hero .sa-date input:checked+span,
#sa-hero .sa-date.active span {
    font-weight: 700;
}

/* Progress in slot box */
#sa-slots .progress {
    height: 10px;
}

/* Avatar rotondi coerenti */
#sa-team img {
    object-fit: cover;
}

/* Riduci motion */
@media (prefers-reduced-motion: reduce) {

    .btn,
    .accordion-button {
        transition: none !important;
    }
}

/**
PAGINA INTERNA - MINISTAGE
*/
#ms-hero .form-select:focus,
#ms-hero .form-control:focus {
    box-shadow: 0 0 0 .25rem rgba(32, 63, 147, .15);
}

/**
PAGINA INTERNA - INDIRIZZO SINGOLA
*/
/* usa il colore della pagina come background dell'hero */
.section-hero.hero-colored {
    position: relative;
    background: var(--brand, #203F93);
    color: #fff;
    overflow: hidden;
}

.section-hero.hero-colored>.container {
    position: relative;
    z-index: 1;
}

/* texture waves opzionale (commenta se non la vuoi) */
.section-hero.hero-colored::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('/assets/images/waves.png');
    background-size: cover;
    background-position: center;
    opacity: .08;
}

/* testi/link su fondo scuro */
.section-hero.hero-colored .lead {
    color: rgba(255, 255, 255, .92) !important;
}

.section-hero.hero-colored .link-light {
    color: #fff !important;
    opacity: .9;
}

.section-hero.hero-colored .link-light:hover {
    opacity: 1;
}

/* bottoni */
.section-hero.hero-colored .btn-outline-light {
    border-color: rgba(255, 255, 255, .65);
}

.section-hero.hero-colored .btn-outline-light:hover {
    background: #fff;
    color: var(--brand, #203F93);
}

/* icona a sinistra del titolo (mostrata solo se presente nello style) */
.hero-titlewrap {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.hero-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    background-image: var(--icon-url);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .12));
    opacity: .95;
}

/* se non hai page.icon, il browser imposta background-image:none → nascondi lo spazio */
.hero-icon[style*="--icon-url: url("] {
    display: inline-block;
}

.hero-icon {
    display: none;
}

.bg-brand {
    background: var(--brand, #203F93);
}

/* mobile: icona più piccola */
@media (max-width:575.98px) {
    .hero-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}