/* ══ BANNER CORSI — striscia orizzontale, immagine di sfondo, pulsante nero (hover invertito) ══ */
.bge-banner-corsi {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 170px;
    margin: 0 0 2rem;
    overflow: hidden;
    border-radius: 6px;
    background: #0a0a0a;
    isolation: isolate;
    box-sizing: border-box;
}
.bge-banner-corsi.bge-banner--fondo { margin: 2.6rem 0 1rem; }
.bge-banner-corsi .bge-banner-img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    z-index: -2;
    transform: scale(1.001);
    transition: transform 1.2s ease;
}
.bge-banner-corsi:hover .bge-banner-img { transform: scale(1.03); }
.bge-banner-velo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.25) 100%);
}
.bge-banner-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "titolo btn" "testo btn";
    align-items: center;
    column-gap: 32px;
    row-gap: 4px;
    width: 100%;
    padding: 26px 40px;
    text-align: left;
    box-sizing: border-box;
}
.bge-banner-titolo { grid-area: titolo; }
.bge-banner-testo  { grid-area: testo; }
.bge-banner-btn    { grid-area: btn; }
.bge-banner-corsi p { margin: 0 !important; }
.bge-banner-titolo {
    font-family: var(--bge-font, 'Cormorant Garamond', Georgia, serif);
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: .02em;
    color: #fff !important;
    text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.bge-banner-testo {
    font-family: var(--bge-font, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.4;
    color: rgba(255,255,255,.92) !important;
    text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.bge-banner-btn {
    display: inline-block;
    padding: 14px 30px;
    white-space: nowrap;
    background: #0a0a0a;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.85); /* visibile anche su immagini scure */
    border-radius: 2px;
    font-family: var(--bge-font, 'Cormorant Garamond', Georgia, serif);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 6px 22px rgba(0,0,0,.35);
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.bge-banner-btn:hover,
.bge-banner-btn:focus-visible {
    background: #fff;
    color: #0a0a0a !important;
    border-color: #fff;
}
.bge-banner-btn:focus-visible { outline: 2px solid #C9A84C; outline-offset: 3px; }

@media (max-width: 640px) {
    .bge-banner-corsi { min-height: 0; border-radius: 4px; }
    .bge-banner-velo { background: rgba(0,0,0,.55); }
    .bge-banner-inner { grid-template-columns: 1fr; grid-template-areas: "titolo" "testo" "btn"; row-gap: 8px; padding: 22px 20px; text-align: center; }
    .bge-banner-btn { justify-self: center; margin-top: 6px; padding: 12px 24px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .bge-banner-corsi .bge-banner-img { transition: none; }
}

/* ── Formato "grande" 16:9: contenuto centrato in colonna ── */
.bge-banner-corsi.bge-banner--grande { aspect-ratio: 16 / 9; min-height: 0; margin-bottom: 2.2rem; }
.bge-banner--grande .bge-banner-velo {
    background:
        radial-gradient(ellipse at center, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 100%),
        linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.05) 60%);
}
.bge-banner--grande .bge-banner-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "titolo" "testo" "btn";
    row-gap: 12px;
    max-width: 760px;
    text-align: center;
}
.bge-banner--grande .bge-banner-titolo { font-size: clamp(26px, 4.2vw, 48px); }
.bge-banner--grande .bge-banner-testo  { font-size: clamp(17px, 2vw, 22px); }
.bge-banner--grande .bge-banner-btn    { justify-self: center; margin-top: 6px; }
@media (max-width: 640px) {
    .bge-banner-corsi.bge-banner--grande { aspect-ratio: auto; min-height: 260px; }
}
