﻿
:root {
    --brand-orange: #f6a10a;
    --brand-blue: #0a2b49;
    --text-dark: #0a2b49;
    --tile-shadow: 0 10px 18px rgba(0,0,0,.10);
    --tile-shadow-hover: 0 14px 26px rgba(0,0,0,.14);
}

html, body {
    height: 100%;
    background: #fff;
    font-family: 'Open Sans', sans-serif;
}

body {
    padding-top: 0;
}

/* ===== Header sovrapposto ===== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
}

    .site-header .navbar {
        padding: 12px 0;
        transition: all .2s ease;
    }

        .site-header .navbar .container-fluid {
            padding-left: .5rem;
            padding-right: .5rem;
            margin-left: 64px;
            margin-top: 0px;
        }
/* logo più a sx */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
}
    .navbar-brand img {
        height: 82px;
    }

.brand-text {
    font-weight: 700;
    color: #fff;
    letter-spacing: .2px;
    line-height: 1.1;
    text-shadow: 0 1px 1px rgba(0,0,0,.25);
}

/* ─── MENU DESKTOP (≥ 992px) — pill bianca sotto il logo ─── */
@media (min-width: 992px) {
    #mainNav {
        margin-top: -81px;
        margin-right: 90px;
    }

    .menu-pill {
        display: inline-block;
        background: #fff;
        border-radius: 0 0 8px 8px;
        padding: 0;
        box-shadow: 0 6px 16px rgba(0,0,0,.12);
        border: 2px solid var(--brand-orange);
        border-top: none;
    }

    .menu-pill .navbar-nav {
        flex-direction: row;
    }

    .menu-pill .navbar-nav > .nav-item {
        margin: 0;
        padding: 0;
    }

    .menu-pill .nav-link {
        color: var(--text-dark) !important;
        border-radius: 0;
        padding: .4rem .85rem;
        font-size: 13px;
        display: block;
    }

    /* angoli arrotondati sul primo e ultimo link per seguire la pill */
    .menu-pill .navbar-nav > .nav-item:first-child > .nav-link {
        border-bottom-left-radius: 6px;
    }

    .menu-pill .navbar-nav > .nav-item:last-child > .nav-link {
        border-bottom-right-radius: 6px;
    }

    .menu-pill .dropdown-menu .dropdown-item:hover,
    .menu-pill .dropdown-menu .dropdown-item:focus {
        background: var(--brand-orange) !important;
        color: #fff !important;
    }
}

/* ─── MENU MOBILE (< 992px) ─── */
@media (max-width: 991.98px) {
    #mainNav {
        padding: .5rem 1rem 1rem;
        margin-top: .25rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    .menu-pill {
        display: block;
        width: 100%;
    }

    .menu-pill .navbar-nav {
        width: 100%;
    }

    .menu-pill .nav-link {
        color: #1f2a37 !important;
        font-size: 15px;
        padding: .6rem .25rem;
        border-bottom: 1px solid rgba(0,0,0,.07);
    }

    .menu-pill .nav-item:last-child > .nav-link {
        border-bottom: none;
    }

    /* dropdown mobile: cascata senza posizione assoluta */
    .menu-pill .dropdown-menu {
        position: static !important;
        background: #f8f9fa;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding-left: 1rem;
        float: none;
    }

    .menu-pill .dropdown-menu .dropdown-item {
        color: #1f2a37 !important;
        font-size: 14px;
        padding: .4rem .5rem;
        border-bottom: 1px solid rgba(0,0,0,.05);
        background: transparent;
        border-radius: 0;
    }

    .menu-pill .dropdown-menu .dropdown-item:hover,
    .menu-pill .dropdown-menu .dropdown-item:focus {
        background: var(--brand-orange) !important;
        color: #fff !important;
    }
}


/* ─── Header sfondo scuro quando il menu mobile è aperto ─── */
@media (max-width: 991.98px) {
    .site-header .navbar-toggler[aria-expanded="true"] {
        background: rgba(0,0,0,.15);
        border-radius: 4px;
    }

    /* header diventa opaco quando il collapse è aperto */
    .site-header:has(.navbar-collapse.show) {
        background: #fff !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
    }

    /* brand-text diventa scuro su sfondo bianco */
    .site-header:has(.navbar-collapse.show) .brand-text {
        color: var(--text-dark);
        text-shadow: none;
    }
}

/* DROPDOWN desktop: senza stondature */
@media (min-width: 992px) {
    .dropdown-menu {
        border-radius: 0;
        border: 1px solid #eee;
    }

    .dropdown-item:focus, .dropdown-item:hover {
        color: #fff;
        background-color: var(--brand-orange);
    }
}

/* header scrolled */
.site-header.scrolled {
    position: fixed;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

    .site-header.scrolled .brand-text {
        display: none;
        color: #1f2a37;
        text-shadow: none;
    }

    .site-header.scrolled .navbar-dark .navbar-nav .nav-link {
        color: #1f2a37;
    }

/* toggler icon: bianca di default, scura quando scrolled o aperto */
.site-header .navbar {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

    .site-header.scrolled .navbar,
    .site-header .navbar .navbar-toggler[aria-expanded="true"] {
        --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(31,42,55,0.9)' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

/* ===== HERO ===== */
.home-hero {
    position: relative;
    width: 100%;
    height: 780px;
    overflow: hidden;
    z-index: 1;
}

    .home-hero .carousel, .home-hero .carousel-inner, .home-hero .carousel-item {
        height: 780px;
    }

    .home-hero .carousel-item {
        background-size: cover;
        background-position: center;
    }

    .home-hero .overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.15) 40%, rgba(0,0,0,0));
        z-index: 1;
    }

    .home-hero .caption {
        position: absolute;
        bottom: 20%;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        color: #fff;
        z-index: 2;
        padding: 0 16px;
    }

        .home-hero .caption h2 {
            font-size: 38px;
            font-weight: 700;
            margin: 0 0 8px;
            text-shadow: 0 2px 8px rgba(0,0,0,.4);
        }

        .home-hero .caption p {
            font-size: 18px;
            text-shadow: 0 2px 6px rgba(0,0,0,.35);
        }

    .home-hero .carousel-control-prev, .home-hero .carousel-control-next {
        width: auto;
        height: auto;
        top: 50%;
        transform: translateY(-50%);
        padding: .25rem .5rem;
        z-index: 3;
    }

.control-circle {
    background: rgba(0,0,0,.35);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease;
}

    .control-circle:hover {
        background: rgba(0,0,0,.55);
    }

/* ===== Dropdown leggibile (1 col) ===== */
.dropdown-readable .dropdown-menu {
    min-width: 22rem;
    max-width: 28rem;
    max-height: 70vh;
    overflow: auto;
    padding: .5rem;
}

.dropdown-readable .dropdown-header {
    font-weight: 700;
    color: #1f2a37;
    font-size: 14px;
    padding: .25rem .5rem;
    margin-top: .25rem;
}

.dropdown-readable .dropdown-item {
    white-space: normal;
    line-height: 1.3;
}

/* ===== Feature cards ===== */
.feature-strip {
    position: relative;
    margin-top: -70px;
    z-index: 20;
}

.feature-strip2 {
    margin-top: 40px;
}

.feature-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ececec;
    padding: 18px;
    text-align: center;
    box-shadow: var(--tile-shadow);
    transition: all .18s ease;
    height: 100%;
    text-decoration: none;
}

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--tile-shadow-hover);
        text-decoration: none;
    }

    .feature-card .thumb {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border-radius: 10px;
        overflow: hidden;
        height: 170px;
        margin-bottom: 10px;
    }

        .feature-card .thumb img {
            max-height: 100%;
            max-width: 100%;
        }

    .feature-card h3 {
        margin: 8px 0 4px;
        font-size: 18px;
        font-weight: 700;
        color: #1f2a37;
    }

    .feature-card p {
        margin: 0;
        color: #6b7280;
    }

/* ===== Sections ===== */
.section {
    padding: 48px 28px;
}

    .section h2 {
        text-align: center;
        font-weight: 700;
        margin: 0 0 18px;
        color: #1f2a37;
    }

    .section .lead {
        font-size: 14px;
        line-height: 22px;
        color: #1f2937;
        max-width: 980px;
        margin: 0 auto;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 18px;
    }

/* Corsi */
.corsi-wrap {
    max-width: 980px;
    margin: 0 auto;
}

.corsi-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--tile-shadow);
}

    .corsi-card img {
        width: 100%;
        border-radius: 10px;
    }

.met_button {
    border-radius: 20px;
    padding: 10px 18px;
    background: var(--brand-blue);
    color: #fff;
    display: inline-block;
    text-decoration: none;
}

    .met_button:hover {
        background: var(--brand-orange);
        color: #fff;
    }

/* ===== Ribbon: solo striscia arancione ===== */
.ribbon-orange {
    background: #f6a10a;
    height: 12px;
    padding: 0;
    border: 0;
}

    .ribbon-orange .ribbon-inner {
        display: none;
    }

/* ===== Footer colori originali ===== */
footer.met_bgcolor3 {
    width: 100%;
    background: #656870;
    color: #fff;
}

    footer.met_bgcolor3 a {
        color: var(--brand-orange);
    }

footer .met_content {
    width: 100%;
    padding: 28px;
}

/* Banda whistleblowing: più scura del footer (non nero puro) */
.met_footer_copyright {
    background: #3f424a;
    color: #fff;
}

    .met_footer_copyright a {
        color: var(--brand-orange);
    }

    .met_footer_copyright .met_content {
        padding: 0 28px 18px;
    }

@media (max-width: 991.98px) {
    .home-hero, .home-hero .carousel, .home-hero .carousel-inner, .home-hero .carousel-item {
        height: 460px;
    }

    .feature-strip {
        margin-top: 20px;
    }

    .brand-text {
        display: none;
    }
}

/* Hover arancione sui link di primo livello (desktop) */
@media (min-width:992px) {
    .menu-pill .navbar-nav > .nav-item > .nav-link {
        transition: background-color .15s ease, color .15s ease;
    }

    .menu-pill .navbar-nav > .nav-item > .nav-link:hover,
    .menu-pill .navbar-nav > .nav-item > .nav-link:focus,
    .menu-pill .navbar-nav > .nav-item.show > .nav-link,
    .menu-pill .navbar-nav > .nav-item > .nav-link.active {
        background: var(--brand-orange);
        color: #fff !important;
    }
}

.dropdown-item {
    font-size: 13px;
}

/* Titolo con accento arancione */
.section-title {
    position: relative;
    font-weight: 800;
    letter-spacing: .2px;
}

    .section-title:after {
        content: "";
        display: block;
        width: 88px;
        height: 4px;
        background: var(--brand-orange);
        margin: .5rem auto 0;
        border-radius: 2px;
    }

/* Drop cap nel primo paragrafo */
.lead.dropcap::first-letter {
    float: left;
    font-size: 3.4rem;
    line-height: .8;
    padding: .15rem .4rem .15rem 0;
    color: var(--brand-blue);
    font-weight: 700;
}

/* Punti chiave con check */
.checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

    .checklist li {
        padding-left: 30px;
        position: relative;
        margin: .35rem 0;
    }

        .checklist li:before {
            content: "✓";
            position: absolute;
            left: 0;
            top: 0;
            color: var(--brand-orange);
            font-weight: 800;
        }

/* Piccole statistiche */
.stat {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 9999px;
    box-shadow: var(--tile-shadow);
    margin: .25rem .25rem 0 0;
}

    .stat strong {
        font-weight: 800;
        color: var(--brand-blue);
    }

/* Cornice per immagine */
.img-frame {
    position: relative;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--tile-shadow);
    background: #fff;
}

    .img-frame:before {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        top: -6px;
        height: 6px;
        background: var(--brand-orange);
        border-radius: 6px 6px 0 0;
    }

/* Card hero Corsi */
.course-hero {
    border-radius: 16px;
    background: linear-gradient(135deg,#0a2b49 0%, #134a7c 60%);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--tile-shadow-hover);
}

    .course-hero .badge {
        background: #ffffff15;
        border: 1px solid #ffffff33;
        font-weight: 700;
    }

    .course-hero .btn-cta {
        background: var(--brand-orange);
        border: 0;
    }

        .course-hero .btn-cta:hover {
            filter: brightness(.95);
        }

/* Immagine corsi a destra responsive */
.course-hero-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width:992px) {
    .course-hero-figure {
        min-height: 320px;
    }
}

@media (max-width:991.98px) {
    .course-hero-figure {
        max-height: 260px;
    }
}

/* Optional: sfondo più morbido alla sezione */
.section.alt-bg {
    background: linear-gradient(180deg,#fff 0,#f9fafb 100%);
}

.met_footer_copyright .met_content {
    padding: 0;
}
    /* niente padding sbilanciato */
    .met_footer_copyright .met_content .container {
        display: flex;
        align-items: center; /* centratura verticale */
        justify-content: center; /* centratura orizzontale */
        min-height: 64px; /* altezza banda, regola a piacere */
        text-align: center;
    }

.met_footer_copyright p {
    margin: 0;
    font-size: 12px;
}

/* Card: altezza fissa + centratura verticale */
.feature-card {
    height: 350px; /* richiesta */
    display: flex;
    flex-direction: column;
    justify-content: center; /* centro verticale */
    align-items: center; /* centro orizzontale */
    text-align: center;
}

    /* Thumbnail centrata e dimensionata in modo sicuro */
    .feature-card .thumb {
        flex: 0 0 160px; /* spazio riservato all’immagine */
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 12px;
    }

        .feature-card .thumb img {
            max-height: 100%;
            max-width: 100%;
            object-fit: contain;
        }

    /* (opzionale) riduci un filo lo spazio sotto i testi */
    .feature-card h3 {
        margin: 8px 0 4px;
    }

    .feature-card p {
        margin: 0;
    }
/* Pill - stili globali (non dipendenti dal breakpoint) */
.menu-pill .navbar-nav {
    gap: 0;
}

.menu-pill .nav-link {
    margin: 0;
    color: var(--text-dark) !important;
    transition: background-color .15s ease, color .15s ease;
}

    /* HOME: sempre arancione */
    .menu-pill .nav-link.nav-home {
        background: var(--brand-orange);
        color: #fff !important;
    }

/* Hover/attivo sui link di primo livello */
.menu-pill .navbar-nav > .nav-item > .nav-link:hover,
.menu-pill .navbar-nav > .nav-item > .nav-link:focus,
.menu-pill .navbar-nav > .nav-item.show > .nav-link,
.menu-pill .navbar-nav > .nav-item > .nav-link.active {
    background: var(--brand-orange);
    color: #fff !important;
}

/* Dropdown: bordi squadrati */
.menu-pill .dropdown-menu {
    border-radius: 0;
    margin-top: 0;
}
/* attacca alla voce */
/* Home sempre arancione */
.nav-home {
    background: var(--brand-orange) !important;
    color: white !important;
    border-bottom-left-radius: 8px !important;
}

    .nav-home > .nav-link {
        background: var(--brand-orange) !important;
        color: white !important;
        border-bottom-left-radius: 8px !important;
    }

    .nav-home:hover {
        background: var(--brand-orange) !important;
        color: white !important;
        border-bottom-left-radius: 8px !important;
    }

    .nav-home > .nav-link:hover {
        background: var(--brand-orange) !important;
        color: white !important;
        border-bottom-left-radius: 8px !important;
    }

.nav-last {
    border-bottom-right-radius: 8px !important;
}

    .nav-last:hover {
        border-bottom-right-radius: 8px !important;
    }

    .nav-last > .nav-link {
        border-bottom-right-radius: 8px !important;
    }

    .nav-last:hover > .nav-link {
        background: var(--brand-orange) !important;
        color: white !important;
        border-bottom-right-radius: 8px !important;
    }

.gallery-thumb {
    width: 100%;
    height: 200px; /* fissa l’altezza */
    overflow: hidden;
    border-radius: .75rem; /* angoli arrotondati come Bootstrap */
    background: #f8f9fa; /* colore di sfondo neutro */
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gallery-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* riempie il box mantenendo proporzioni */
        display: block;
    }

.partner-thumb {
    width: 100%;
    height: 110px; /* altezza fissa per uniformità */
    border-radius: .75rem;
    background: #fff; /* sfondo bianco/neutro */
    border: 1px solid #e0e0e0; /* opzionale: cornice sottile */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem; /* un po’ di margine interno */
}

    .partner-thumb img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* mostra tutto il logo senza tagliarlo */
        display: block;
    }


.partner-caption {
    margin-top: .5rem;
    font-size: .9rem;
    font-weight: 500;
}

.partner-card {
    text-decoration: none;
}

    .partner-card:hover .partner-caption {
        text-decoration: underline;
    }
