/* Legacy Tattoo Academy — Front-end */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --red: #ff0f0f;
    --red-dark: #e60e0e;
    --red-deep: #d00c0c;
    --red-glow: rgba(255, 255, 255, 0.25);
    --bg-surface: rgba(230, 14, 14, 0.88);
    --bg-surface-solid: #e60e0e;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.82);
    --border: rgba(255, 255, 255, 0.22);
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --header-h: 138px;
    --ticker-h: 0px;
    --anchor-gap: 1.25rem;
    --scroll-offset: calc(var(--header-h) + var(--ticker-h) + var(--anchor-gap));
    --mobile-nav-top: var(--header-h);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--scroll-offset); }

[id^="doc-"] {
    scroll-margin-top: var(--scroll-offset);
}

body {
    font-family: var(--font-body);
    background-color: var(--red);
    background-image: url('../../images/pattern.png');
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== NEWS TICKER ===== */
.news-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #fff;
    color: var(--red);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow: hidden;
    height: 32px;
    display: flex;
    align-items: center;
}

.news-ticker-inner {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.news-ticker:hover .news-ticker-inner {
    animation-play-state: paused;
}

.news-ticker-item {
    flex-shrink: 0;
    padding: 0 3rem;
    color: inherit;
    text-decoration: none;
}

a.news-ticker-item:hover {
    color: inherit;
    opacity: 0.8;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.has-ticker {
    --ticker-h: 32px;
    --mobile-nav-top: calc(var(--header-h) + var(--ticker-h));
    padding-top: 32px;
}

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: var(--header-h);
    background: #ff0f0f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background var(--transition);
    overflow: visible;
}

.has-ticker .site-header { top: 32px; }

.site-header.scrolled {
    background: #e60e0e;
    box-shadow: 0 4px 20px rgba(208, 12, 12, 0.45);
}

.header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.15rem 2rem 1.25rem;
    min-height: var(--header-h);
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    line-height: 0;
    margin-left: 1.1rem;
}

.site-logo {
    width: min(380px, 38vw);
    min-width: 280px;
    height: auto;
    max-height: 92px;
    object-fit: contain;
}

.header-logo-fallback {
    display: none;
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.06em;
    color: #fff;
}

.header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    align-self: stretch;
    gap: 0.75rem;
    min-width: 0;
    padding-bottom: 0.15rem;
    margin-left: auto;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: auto;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    font-size: 1.65rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity var(--transition);
}

.header-social a:hover { opacity: 0.75; color: #fff; }

.header-nav {
    padding: 0;
    width: auto;
    margin-left: auto;
    margin-top: auto;
}

.header-nav .navbar-collapse {
    flex-grow: 0;
    justify-content: flex-end;
}

.mobile-nav-backdrop {
    display: none;
}

@media (min-width: 992px) {
    .header-nav.navbar-expand-lg .navbar-collapse {
        display: flex !important;
    }
}

.header-menu {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    margin-left: auto;
}

.header-toggler { display: none; }

.navbar-nav .nav-link {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text) !important;
    padding: 0.25rem 0.95rem !important;
    position: relative;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after { display: none; }

.navbar-nav .dropdown-toggle::after { display: none; }

.menu-caret {
    font-size: 0.65em;
    margin-left: 0.3em;
    vertical-align: 0.05em;
    opacity: 0.9;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus { opacity: 0.8; }

.navbar-nav .nav-link.active { opacity: 1; font-weight: 600; }

.dropdown-menu {
    background: #ff0f0f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.6rem 1.5rem;
    transition: all var(--transition);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
    padding: 0.4rem 0.6rem;
}

.header-toggler {
    flex-shrink: 0;
}

.navbar-toggler-icon {
    width: 1.75rem;
    height: 1.75rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== HERO SLIDER ===== */
.hero-slider {
    height: 87vh;
    min-height: 592px;
    margin-top: var(--header-h);
}

.has-ticker .hero-slider { margin-top: 37px; }

.hero-slider .carousel-item {
    height: 87vh;
    min-height: 592px;
    position: relative;
}

.hero-slider .carousel-item.has-link {
    cursor: pointer;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.hero-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-slider .carousel-caption {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    max-width: 900px;
    padding: 0;
    z-index: 3;
    pointer-events: none;
    --hero-text-shadow:
        0 0 18px rgba(0, 0, 0, 0.95),
        0 0 36px rgba(0, 0, 0, 0.75),
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 4px 14px rgba(0, 0, 0, 0.85);
}

.hero-caption-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
    padding: 0.35rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    text-shadow: var(--hero-text-shadow);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero-slider .carousel-caption h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6.5rem);
    letter-spacing: 0.04em;
    line-height: 0.95;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: var(--hero-text-shadow);
}

.hero-slider .carousel-caption h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.06em;
    color: #fff;
    margin-bottom: 1.25rem;
    text-shadow: var(--hero-text-shadow);
}

.hero-slider .carousel-caption p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.05em;
    line-height: 1.6;
    text-shadow: var(--hero-text-shadow);
}

.hero-slide-cta {
    display: inline-block;
    margin-top: 1.75rem;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 0.3rem;
    text-shadow: var(--hero-text-shadow);
    transition: color var(--transition), border-color var(--transition);
}

.hero-slider .carousel-item.has-link:hover .hero-slide-cta {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.75);
}

.hero-slider .carousel-indicators {
    z-index: 5;
}

.hero-slider .carousel-indicators button {
    width: 40px;
    height: 3px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    margin: 0 4px;
    transition: all var(--transition);
}

.hero-slider .carousel-indicators button.active {
    background: #fff;
    width: 60px;
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 80px;
    opacity: 0.6;
    transition: opacity var(--transition);
    z-index: 5;
}
.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover { opacity: 1; }

/* ===== SECTIONS ===== */
.content-section {
    padding: 6rem 0;
    position: relative;
}

.content-section.alt { background: var(--bg-surface); }

.section-label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #fff;
    margin-top: 1rem;
}

.section-title-center:after { margin:auto; }

.section-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-top: 1rem;
}

.section-text p { margin-bottom: 1.25rem; }
.section-text p:last-child { margin-bottom: 0; }
.section-text strong { color: var(--text); font-weight: 600; }
.section-text em { font-style: italic; }

.section-text h2,
.section-text h3,
.section-text h4 {
    font-family: var(--font-display);
    color: #fff;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin: 1.75rem 0 0.85rem;
}

.section-text h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.section-text h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.section-text h4 {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-text > h2:first-child,
.section-text > h3:first-child,
.section-text > h4:first-child {
    margin-top: 0;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4 {
    font-family: var(--font-display);
    color: #fff;
    letter-spacing: 0.04em;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.legal-content h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    margin-top: 0;
}

.legal-content h2 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.legal-content h3 { font-size: clamp(1rem, 1.6vw, 1.2rem); }
.legal-content h4 { font-size: 1rem; }

.legal-content ul,
.legal-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
}

.legal-content li {
    margin-bottom: 0.55rem;
    color: var(--text-muted);
}

.legal-content a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color var(--transition);
}

.legal-content a:hover { color: #fff; }

.legal-content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.legal-content b,
.legal-content strong { color: var(--text); }

/* ===== CORSI CARDS ===== */
.corso-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    height: 100%;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.corso-card-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.corso-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.corso-card:hover .corso-card-media img {
    transform: scale(1.04);
}

.corso-card-body {
    padding: 2rem 2.5rem 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.corso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #fff;
    transition: height var(--transition);
    z-index: 1;
}

.corso-card:hover {
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(208, 12, 12, 0.35);
}

.corso-card:hover::before { height: 100%; }

.corso-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.corso-card .corso-date {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0;
}

.corso-card .btn-legacy {
    margin-top: auto;
    align-self: flex-start;
}

/* Corso detail + static page lead image */
.corso-detail-media,
.page-lead-image {
    margin: 0 0 2.5rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.corso-detail-media img,
.page-lead-image img {
    width: 100%;
    display: block;
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

.page-lead-image .lightbox-link {
    display: block;
    line-height: 0;
}

.page-lead-image .lightbox-link img {
    cursor: zoom-in;
}

.text-center .page-lead-image {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== TIROCINIO — STUDI ASSOCIATI ===== */
.internship-studios {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.internship-studio + .internship-studio {
    padding-top: 3.5rem;
    border-top: 1px solid var(--border);
}

.internship-studio-media {
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
}

.internship-studio-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.internship-studio-name {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.internship-studio-address {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.internship-studio-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    transition: opacity var(--transition);
}

.internship-studio-link:hover {
    opacity: 0.75;
    color: #fff;
}

@media (max-width: 767px) {
    .internship-studios {
        gap: 2.5rem;
    }

    .internship-studio + .internship-studio {
        padding-top: 2.5rem;
    }
}

/* ===== MODULI GRID ===== */
.modulo-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    text-align: left;
    width: 100%;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}

.modulo-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modulo-btn h4 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.modulo-btn span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ===== MODAL ===== */
.legacy-modal .modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
}

.legacy-modal .modal-header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
}

.legacy-modal .modal-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.04em;
}

.legacy-modal .btn-close {
    filter: invert(1);
    opacity: 0.6;
}

.legacy-modal .modal-body { padding: 2rem; }

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lightbox-link {
    display: block;
    cursor: zoom-in;
    line-height: 0;
}

.modal-gallery .lightbox-link img,
.docente-preview-photos .lightbox-link img,
.expand-item-thumb .lightbox-link img,
.news-thumb .lightbox-link img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
    transition: opacity var(--transition);
}

.lightbox-link:hover img {
    opacity: 0.88;
}

.docente-preview-photos .lightbox-link img {
    width: 88px;
    height: 88px;
}

.expand-item-thumb .lightbox-link {
    width: 100%;
    height: 100%;
}

.expand-item-thumb .lightbox-link img {
    height: 100%;
}

.school-gallery-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
    letter-spacing: 0.04em;
}

.modal-docenti {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-docenti span,
.modal-docenti a {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    color: inherit;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
}

.modal-docenti a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.55);
    color: inherit;
}

/* ===== WORKSHOP / NEWS CARDS ===== */
.card-legacy {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    transition: all var(--transition);
}

.card-legacy:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(208, 12, 12, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.card-legacy img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-legacy-body { padding: 1.75rem; }

.card-legacy-date {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.card-legacy h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

.card-legacy p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ===== TEAM ===== */
.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    aspect-ratio: 3/4;
}

.team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%);
    transition: all 0.6s ease;
}

.team-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(transparent, rgba(255, 15, 15, 0.95));
}

.team-info h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.team-info p {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.team-card.founder::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--red-glow);
}

/* ===== CONTACT ===== */
.contact-block { margin-bottom: 2rem; }

.contact-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.contact-value {
    font-size: 1.05rem;
    color: var(--text);
}

.contact-value a {
    transition: color var(--transition);
}

.contact-value a:hover { color: #fff; opacity: 0.85; }

/* ===== BUTTONS ===== */
.btn-legacy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    background: #fff;
    color: var(--red);
    border: 2px solid #fff;
    border-radius: 2px;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-legacy:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--red-glow);
}

.btn-legacy-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: all var(--transition);
}

.btn-legacy-outline:hover {
    background: #fff;
    color: var(--red);
    border-color: #fff;
}

/* ===== CTA ===== */
.cta-section {
    position: relative;
    padding: 5.5rem 0;
    text-align: center;
    background: url('../../images/aula.jpeg') center center / cover no-repeat;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.cta-section-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(20, 0, 0, 0.82) 0%,
        rgba(255, 15, 15, 0.55) 100%
    );
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section .section-title,
.cta-section .section-text {
    color: #fff;
}

.cta-section .section-text {
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HOME VIDEO GRID ===== */
.home-video-grid {
    width: 100%;
    margin: 0;
    padding: 0;
}

.home-video-grid-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.home-video-col {
    position: relative;
    aspect-ratio: 753 / 413;
    min-height: 180px;
    overflow: hidden;
}

.home-video-trigger {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

.home-video-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.home-video-trigger:hover img {
    transform: scale(1.03);
}

.home-video-split {
    display: flex;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.home-video-half {
    flex: 0 0 50%;
    height: 100%;
    position: relative;
}

.home-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem;
    text-align: center;
    background: rgba(255, 15, 15, 0);
    transition: background var(--transition);
}

.home-video-trigger:hover .home-video-overlay,
.home-video-trigger:focus-visible .home-video-overlay {
    background: rgba(255, 15, 15, 0.78);
}

.home-video-overlay .bi-play-fill {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    margin-bottom: 0.25rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity var(--transition), transform var(--transition);
}

.home-video-trigger:hover .home-video-overlay .bi-play-fill,
.home-video-trigger:focus-visible .home-video-overlay .bi-play-fill {
    opacity: 1;
    transform: scale(1);
}

.home-video-studio {
    font-size: clamp(0.62rem, 1.1vw, 0.72rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition);
}

.home-video-artist {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);
    letter-spacing: 0.06em;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition);
}

.home-video-trigger:hover .home-video-studio,
.home-video-trigger:hover .home-video-artist,
.home-video-trigger:focus-visible .home-video-studio,
.home-video-trigger:focus-visible .home-video-artist {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .home-video-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .home-video-grid-inner {
        grid-template-columns: 1fr;
    }

    .home-video-col {
        aspect-ratio: 16 / 10;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 3.5rem 0 2.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto;
    align-items: start;
    gap: 2rem 3rem;
}

.footer-brand-name {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    transition: opacity var(--transition);
}

.footer-brand-name:hover {
    opacity: 0.8;
    color: #fff;
}

.footer-brand-logo {
    display: block;
    width: min(180px, 100%);
    height: auto;
    margin-top: 1rem;
    opacity: 0.92;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-line {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.03em;
}

.footer-line a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-line a:hover {
    color: #fff;
}

.footer-sep {
    margin: 0 0.55rem;
    color: rgba(255, 255, 255, 0.28);
}

.footer-social,
.contact-social {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-social {
    justify-content: flex-end;
}

.footer-social a,
.contact-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-social a:hover,
.contact-social a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.04);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-legal a:hover {
    color: #fff;
}

.footer-copy {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 991px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-social {
        justify-content: flex-start;
    }
}

@media (max-width: 575px) {
    .site-footer {
        padding: 2.75rem 0 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-sep {
        margin: 0 0.4rem;
    }
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transition: opacity 0.7s ease;
}

.reveal.visible {
    opacity: 1;
}

/* ===== INNER PAGES ===== */
body.page-inner { padding-top: var(--header-h); }
body.page-inner.has-ticker { padding-top: calc(var(--header-h) + 32px); }

.site-main { min-height: 50vh; }

.page-hero {
    padding: 4rem 0 3rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.page-hero-split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2.5rem 3.5rem;
    align-items: center;
}

.page-hero-text {
    min-width: 0;
}

.page-hero-media {
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
    width: 100%;
}

.page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-hero .section-title { margin-bottom: 0.5rem; }
.page-hero .section-title::after { margin-top: 0.75rem; }

.page-hero-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 0;
}

/* Pagina dettaglio — testo + form sticky */
.page-detail-layout {
    display: block;
}

.page-detail-layout.has-form {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2.5rem 3rem;
    align-items: start;
}

.page-detail-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
}

.expand-panel-inner .page-detail-sidebar {
    top: 1rem;
}

.page-form-panel {
    padding: 1.75rem 1.35rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.page-form-panel--placeholder {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.page-form-panel--placeholder h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 0.75rem 0 0.5rem;
}

.page-form-panel--placeholder p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.page-form-panel--placeholder .form-placeholder-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.page-form-panel-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mailerlite-embed--sidebar {
    margin-top: 0;
}

.mailerlite-embed--sidebar .ml-embedded {
    min-height: 100px;
}

@media (max-width: 991px) {
    .page-hero-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-hero-media {
        order: -1;
        max-width: min(100%, 420px);
        margin-inline: auto;
    }

    .page-detail-layout.has-form {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-detail-sidebar {
        position: static;
    }
}

.navbar-nav .nav-link.active { opacity: 1; }

/* Home quick links */
.home-link-card {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2rem;
    height: 100%;
    transition: all var(--transition);
}

.home-link-card:hover {
    border-color: #fff;
    transform: translateY(-4px);
    color: var(--text);
}

.home-link-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.9;
}

.home-link-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.04em;
    margin: 0.5rem 0;
}

.home-link-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Expand panels */
.expand-list { display: flex; flex-direction: column; gap: 1rem; }

.expand-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.expand-item.is-open { border-color: rgba(255, 255, 255, 0.5); }

.expand-item-header {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    align-items: flex-start;
}

.expand-item-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
}

.expand-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expand-item-summary { flex: 1; min-width: 0; }
.expand-item-summary h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.expand-item-summary p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.btn-expand {
    background: none;
    border: none;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0;
    cursor: pointer;
    transition: opacity var(--transition);
}

.btn-expand:hover { opacity: 0.75; }

.expand-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.expand-panel.is-open {
    max-height: 3000px;
    opacity: 1;
    overflow: visible;
}

.expand-panel-inner {
    padding: 0 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0;
    padding-top: 1.5rem;
    position: relative;
}

.expand-close {
    position: absolute;
    top: 0.75rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.expand-close:hover { color: var(--text); }

.badge-archivio {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

/* Docenti page */
.founder-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.founder-card.is-open {
    border-color: rgba(255, 255, 255, 0.5);
}

.founder-card-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    color: var(--text);
}

.founder-card-btn img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    filter: grayscale(40%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.founder-card:hover .founder-card-btn img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.founder-card-info {
    padding: 1.25rem;
}

.founder-card-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    margin: 0;
}

.founder-card-info p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.founders-row { --bs-gutter-x: 1rem; }

.founders-panels {
    margin-top: 1.25rem;
}

.founder-expand-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color var(--transition);
}

.founder-expand-panel.is-open {
    border-color: rgba(255, 255, 255, 0.5);
}

.founder-expand-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
    border-top: none;
    margin-top: 0;
    padding-top: 1.5rem;
}

@media (min-width: 768px) {
    .founder-expand-inner--with-gallery {
        grid-template-columns: minmax(240px, 2fr) 3fr;
        align-items: start;
        gap: 2rem;
        padding: 2rem;
    }

    .founder-expand-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .founder-expand-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.founder-expand-content h4 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.docente-item-header {
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.docente-item-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.docente-preview-photos {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

.docente-preview-photos .lightbox-link img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border);
}

.docente-list-item.is-open .docente-preview-photos {
    display: none;
}

.docente-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: 1.25rem;
}

.docente-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: opacity var(--transition);
}

.docente-social-link:hover {
    opacity: 0.8;
    color: #fff;
}

.docente-social-link i {
    font-size: 1.15rem;
    text-decoration: none;
}

.docente-list-thumb {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
}

.docente-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.docente-list-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-surface-solid);
}

.docente-materia {
    font-size: 0.8rem;
    color: #fff;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem !important;
}

/* Moduli list (corsi.php) */
.moduli-list .modulo-item-header {
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.moduli-list .modulo-preview-photos {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

.moduli-list .modulo-preview-photos .lightbox-link img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border);
}

.moduli-list .modulo-list-item.is-open .modulo-preview-photos {
    display: flex;
}

.moduli-list .modulo-list-thumb {
    border-radius: 50%;
}

/* Form placeholder */
.form-placeholder {
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 3rem 2rem;
    text-align: center;
}

.form-placeholder-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }

.form-placeholder h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.form-placeholder p { color: var(--text-muted); margin-bottom: 1.5rem; }

.form-placeholder-box {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border);
    padding: 2.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mailerlite-embed {
    width: 100%;
}

.mailerlite-embed .ml-embedded {
    min-height: 120px;
}

.placeholder-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 4px;
}

.news-thumb { width: 100px; height: 100px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 1200px) {
    .site-logo {
        width: min(435px, 36vw);
        min-width: 365px;
        max-height: 106px;
    }
}

@media (max-width: 991px) {
    :root { --header-h: 120px; }

    body.mobile-nav-open { overflow: hidden; }

    .site-header {
        height: var(--header-h);
        min-height: 0;
    }

    .header-inner {
        flex-wrap: nowrap;
        align-items: center;
        height: 100%;
        min-height: 0;
        padding: 0.85rem 1.15rem 0.9rem;
        gap: 0.75rem;
    }

    .header-logo {
        margin-left: 0;
        flex: 1 1 auto;
        min-width: 0;
        align-self: center;
    }

    .site-logo {
        width: min(235px, 50vw);
        min-width: 0;
        max-height: 58px;
    }

    .header-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        padding: 0;
        border: none;
        border-radius: 0;
        margin-right: -0.15rem;
        transition: opacity var(--transition);
    }

    .header-toggler:hover,
    .header-toggler:focus-visible {
        opacity: 0.8;
        background: none;
        border-color: transparent;
    }

    .header-toggler[aria-expanded="true"] {
        opacity: 1;
        background: none;
        border-color: transparent;
    }

    .header-toggler .navbar-toggler-icon {
        width: 2.15rem;
        height: 2.15rem;
    }

    .header-right {
        flex: 0 0 auto;
        flex-direction: column;
        align-items: flex-end;
        align-self: center;
        justify-content: center;
        gap: 0;
        padding-bottom: 0;
    }

    .header-controls {
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        gap: 0.45rem;
        width: auto;
        margin-left: 0;
    }

    .header-social {
        gap: 0.15rem;
        flex-wrap: nowrap;
    }

    .header-social a {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .header-nav {
        position: static;
        flex: none;
        width: auto;
        margin: 0;
        padding: 0;
        height: 0;
        overflow: visible;
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: var(--mobile-nav-top) 0 0;
        z-index: 1040;
        background: rgba(8, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .header-nav .navbar-collapse {
        position: fixed;
        top: var(--mobile-nav-top);
        left: 0;
        right: 0;
        z-index: 1050;
        display: block;
        max-height: calc(100vh - var(--mobile-nav-top));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0.35rem 0 1rem;
        background: var(--red-dark);
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 0 0 10px 10px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.28s ease,
            visibility 0.28s ease;
    }

    .header-nav .navbar-collapse.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .header-nav .navbar-collapse.collapsing {
        height: auto !important;
        overflow: hidden;
        transition: none !important;
    }

    .header-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        margin: 0;
        padding: 0.25rem 0.85rem 0;
    }

    .header-menu .nav-item {
        width: 100%;
    }

    .header-menu .nav-item + .nav-item {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .navbar-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.95rem 0.35rem !important;
        white-space: normal;
        text-align: left;
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }

    .header-menu .dropdown-toggle .menu-caret {
        margin-left: auto;
        transition: transform 0.22s ease;
    }

    .header-menu .dropdown-toggle.show .menu-caret {
        transform: rotate(180deg);
    }

    .header-menu .dropdown-menu {
        position: static !important;
        transform: none !important;
        inset: auto !important;
        float: none;
        display: none;
        width: calc(100% - 0.5rem);
        margin: 0 0 0.65rem 0.5rem;
        padding: 0.35rem 0;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.16);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .header-menu .dropdown-menu.show {
        display: block;
    }

    .header-menu .dropdown-divider {
        margin: 0.35rem 0.85rem;
        border-color: rgba(255, 255, 255, 0.18);
        opacity: 1;
    }

    .header-menu .dropdown-item {
        display: block;
        max-width: 100%;
        text-align: left;
        padding: 0.7rem 1rem;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.45;
        letter-spacing: 0.08em;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.9);
        border-radius: 4px;
        margin: 0 0.35rem;
        width: calc(100% - 0.7rem);
    }

    .header-menu .dropdown-item:hover,
    .header-menu .dropdown-item:focus {
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
    }

    .header-menu .dropdown-item:active {
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
    }

    .docente-item-header { flex-wrap: wrap; }

    .docente-preview-photos {
        width: 100%;
        justify-content: flex-end;
    }

    .docente-preview-photos .lightbox-link img {
        width: 72px;
        height: 72px;
    }

    .moduli-list .modulo-preview-photos {
        width: 100%;
        justify-content: flex-end;
    }

    .moduli-list .modulo-preview-photos .lightbox-link img {
        width: 72px;
        height: 72px;
    }

    .content-section { padding: 4rem 0; }
}

@media (max-width: 768px) {
    :root { --header-h: 108px; }

    .site-logo {
        width: min(210px, 52vw);
        max-height: 52px;
    }

    .header-social {
        gap: 0.1rem;
    }

    .header-social a { width: 28px; height: 28px; font-size: 1.1rem; }

    .docente-preview-photos .lightbox-link img {
        width: 64px;
        height: 64px;
    }

    .moduli-list .modulo-preview-photos .lightbox-link img {
        width: 64px;
        height: 64px;
    }

    .hero-slider .carousel-caption { bottom: 10%; }
}

/* ===== LEGACY LIGHTBOX (Bootstrap Modal + Carousel) ===== */
.legacy-lightbox .modal-content,
.legacy-video-lightbox .modal-content {
    background: rgba(14, 0, 0, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.legacy-lightbox .modal-body,
.legacy-video-lightbox .modal-body {
    position: relative;
    padding: 0;
}

.legacy-lightbox-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 6;
    opacity: 0.85;
}

.legacy-lightbox-close:hover {
    opacity: 1;
}

.legacy-lightbox .carousel-item {
    min-height: 240px;
    padding: 2.5rem 3.5rem 1.5rem;
}

.legacy-lightbox .carousel-item.active,
.legacy-lightbox .carousel-item-next,
.legacy-lightbox .carousel-item-prev {
    display: flex;
    align-items: center;
    justify-content: center;
}

.legacy-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: min(82vh, 900px);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.legacy-lightbox-nav {
    width: 12%;
    opacity: 0.75;
    z-index: 5;
}

.legacy-lightbox-nav:hover {
    opacity: 1;
}

.legacy-lightbox-caption {
    margin: 0;
    padding: 0.85rem 1.25rem 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.legacy-lightbox-counter {
    position: absolute;
    top: 0.95rem;
    left: 1rem;
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.legacy-video-lightbox .modal-body {
    padding: 0;
}

.legacy-video-frame iframe {
    border: 0;
}

@media (max-width: 575px) {
    .legacy-lightbox .carousel-item {
        padding: 2.25rem 1rem 1rem;
    }

    .legacy-lightbox-nav {
        width: 18%;
    }
}

/* ===== COOKIE CONSENT ===== */
.legacy-consent {
    position: relative;
    z-index: 1200;
}

.legacy-consent-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
    padding: 0.7rem 0 0.8rem;
}

.legacy-consent-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legacy-consent-copy {
    flex: 1;
    min-width: 0;
}

.legacy-consent-title {
    margin: 0 0 0.2rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.legacy-consent-text,
.legacy-consent-modal-intro {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.58);
}

.legacy-consent-text a,
.legacy-consent-modal-intro a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.28);
    text-underline-offset: 0.12em;
}

.legacy-consent-text a:hover,
.legacy-consent-modal-intro a:hover {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.legacy-consent-actions,
.legacy-consent-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex-shrink: 0;
}

.legacy-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    border: 1px solid transparent;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}

.legacy-consent-btn--primary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.28);
}

.legacy-consent-btn--primary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
}

.legacy-consent-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    border-color: rgba(255, 255, 255, 0.14);
}

.legacy-consent-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.88);
}

.legacy-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 1210;
}

.legacy-consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.legacy-consent-modal-panel {
    position: relative;
    width: min(520px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin: 1rem auto;
    padding: 1.1rem 1.15rem 1rem;
    background: rgba(18, 0, 0, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

body.legacy-consent-modal-open {
    overflow: hidden;
}

.legacy-consent-close {
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.legacy-consent-close:hover {
    color: rgba(255, 255, 255, 0.85);
}

.legacy-consent-modal-title {
    margin: 0 0 0.55rem;
    padding-right: 1.75rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.legacy-consent-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0.9rem 0 1rem;
}

.legacy-consent-option {
    display: block;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.legacy-consent-option--locked {
    cursor: default;
    opacity: 0.88;
}

.legacy-consent-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.legacy-consent-option h3 {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.legacy-consent-option p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.52);
}

.legacy-consent-badge {
    flex-shrink: 0;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.legacy-consent-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.legacy-consent-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.legacy-consent-switch-ui {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    transition: background var(--transition);
}

.legacy-consent-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    transition: transform var(--transition);
}

.legacy-consent-switch input:checked + .legacy-consent-switch-ui {
    background: rgba(255, 255, 255, 0.28);
}

.legacy-consent-switch input:checked + .legacy-consent-switch-ui::after {
    transform: translateX(16px);
}

.legacy-consent-switch input:focus-visible + .legacy-consent-switch-ui {
    outline: 1px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}

@media (max-width: 991px) {
    .legacy-consent-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .legacy-consent-actions,
    .legacy-consent-modal-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575px) {
    .legacy-consent-bar {
        padding: 0.65rem 0 0.75rem;
    }

    .legacy-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
    }

    .legacy-consent-actions .legacy-consent-btn--primary {
        grid-column: 1 / -1;
    }

    .legacy-consent-modal-panel {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
        padding: 1rem 0.85rem 0.85rem;
    }

    .legacy-consent-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .legacy-consent-modal-actions .legacy-consent-btn {
        width: 100%;
    }
}
