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

:root {
    --primary: #1a1a1a;
    --accent: #034ea2;
    --accent-light: #034ea2;
    --white: #ffffff;
    --gray-light: #f8f8f8;
    --gray-dark: #333333;
}

body {
    font-family: 'Red Hat Display', sans-serif;
    background: var(--white);
    color: var(--primary);
    overflow-x: hidden;
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    height: 90px;
    object-fit: contain;
    cursor: pointer;
    display: block;
}

.nav-left {
    flex: 1;
    display: flex;
}

.nav-left a {
    position: absolute;
    top: 10px;
    left: 40px;
    z-index: 1001;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-center {
    height: 28px;
    object-fit: contain;
    max-width: 100%;
}

.nav-links {
    flex: 1;
    display: flex;
    gap: 100px;
    list-style: none;
    justify-content: flex-end;
    margin-left: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    height: 36px;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--primary);
    font-family: 'Atma', cursive;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a img {
    height: 30px;
    width: auto;
}

.nav-links li:nth-child(3) a img {
    height: 40px;
    position: relative;
    top: -6px;       /* sposta verticalmente 03_nav.png: negativo = su, positivo = giù */
}

.nav-links li:nth-child(4) a img {
    position: relative;
    top: -3px;      /* sposta verticalmente 04_nav.png: negativo = su, positivo = giù */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    display: none;
}


/* FASCIA BOTTONI SPOT */
.spots-band {
    background: #ffffff;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 24px 40px;
    overflow: visible;
    position: relative;
    z-index: 10;
}

/* Tooltip sopra lo spot nella fascia bianca */
.spots-band .spot-tooltip img {
    height: 44px;
}

/* Pulsazione allargata per la fascia bianca: parte dal bordo dell'immagine */
@keyframes pulse-band {
    0% {
        transform: scale(1.5);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.spots-band .spot::before {
    animation-name: pulse-band;
}

.spots-band .spot {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.spots-band .spot::before {
    border-color: rgba(0, 0, 0, 0.15);
}

.spots-band .spot:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* CARDS BAND (flip cards) */
.cards-band {
    background: transparent;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 90px 40px;
    gap: 20px;
    position: relative;
    z-index: 100;
    margin-top: -200px;
}

.flip-card {
    flex: 1;
    max-width: 15.3vw;
    height: auto;
    aspect-ratio: 22 / 27;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.flip-card-front {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flip-card-back {
    background: #034ea2;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.67vw;
}

.card-back-btn svg {
    width: 2.5vw;
    height: 2.5vw;
}

.card-title {
    font-family: 'Atma', cursive;
    font-size: 1.18vw;
    font-weight: 700;
    color: #034ea2;
    text-align: center;
    padding: 1.11vw 0.97vw 0.69vw;
    line-height: 1.3;
    flex-shrink: 0;
}

.card-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    object-fit: cover;
}

[id="5-7-section"] .waveBand,
[id="8-10-section"] .waveBand,
[id="schede-section"] .waveBand {
    margin-top: -20.08vw;
}

[id="schede-section"] .schede-row-2 {
    padding-top: 0;
}


.card-enter-btn {
    background: #ff6d39;
    color: #ffffff;
    border: none;
    border-radius: 1.67vw;
    padding: 0.69vw 2.5vw;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 1.11vw;
    font-weight: 700;
    cursor: pointer;
    margin: 0.97vw;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.card-enter-btn:hover {
    background: #e05a2e;
    transform: translateY(-2px);
}

.card-back-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.56vw;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.83vw;
    padding: 0.83vw 2.22vw;
    color: #ffffff;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 0.97vw;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 9vw;
}

.card-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* WAVE BAND */
.waveBand {
    position: relative;
    width: 100%;
    margin-top: -200px;
    z-index: 100;
}

.waveBand__svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.waveBand__fill {
    fill: #daeeff;
}

.waveBand__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 6.25vw 2.78vw;
    gap: 1.39vw;
}

.waveBand::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
            radial-gradient(rgba(255,255,255,.20) 1px, transparent 1px),
            radial-gradient(rgba(255,255,255,.10) 2px, transparent 2px),
            linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08));
    background-size: 6px 6px, 22px 22px, 100% 100%;
    background-position: 0 0, 8px 10px, 0 0;
    opacity: .55;
    filter: blur(.2px);
}

/* HERO SECTION */
.home-logo-big {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    width: 52vw;
    max-width: 960px;
    z-index: 10;
    pointer-events: none;
}

.hero {
    margin-top: 70px;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102,126,234,0.5) 0%, rgba(118,75,162,0.5) 100%);
    z-index: 2;
}

/* Fallback per caricamento lento */
.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    pointer-events: none;
}

.hero-content h1 {
    font-family: 'Atma', cursive;
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SPOTS CONTAINER */
.spots-row {
    position: absolute;
    bottom: 30px;
    right: 120px;
    display: flex;
    gap: 48px;
    z-index: 20;
    align-items: center;
}

/* SPOTS */
.spot {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
}

.spot img {
    width: 150%;
    height: 150%;
    object-fit: contain;
    pointer-events: none;
}

.spot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Sfasa le animazioni pulse per ogni spot */
.spot:nth-child(1)::before { animation-delay: 0s; }
.spot:nth-child(2)::before { animation-delay: 0.3s; }
.spot:nth-child(3)::before { animation-delay: 0.6s; }
.spot:nth-child(4)::before { animation-delay: 0.9s; }
.spot:nth-child(5)::before { animation-delay: 1.2s; }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.spot:hover {
    transform: scale(1.3);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
}

.spot:hover::before {
    animation: pulse 1.2s ease-in-out infinite;
}

/* Tooltip immagine sopra lo spot */
.spot-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    width: max-content;
}

.spot-tooltip img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.spot:hover .spot-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

@media (max-width: 768px) {
    .spots-row {
        bottom: 16px;
        right: 16px;
        gap: 20px;
    }

    .spot {
        width: 40px;
        height: 40px;
    }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-img {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.modal-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="70" r="20" fill="rgba(255,255,255,0.08)"/></svg>');
    animation: movePattern 10s linear infinite;
}

@keyframes movePattern {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 100px); }
}

.modal-content {
    padding: 40px;
}

.modal-content h2 {
    font-family: 'Atma', cursive;
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--primary);
}

.modal-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-dark);
    margin-bottom: 24px;
}

.modal-close {
    display: block;
    margin-left: auto;
    padding: 10px 20px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.modal-close:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

/* ACTION BUTTONS */
.modal-actions {
    display: flex;
    gap: 40px;
    margin: 32px 0;
    justify-content: center;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    padding: 0;
}

.action-btn svg {
    color: var(--accent);
    transition: all 0.3s ease;
}

.action-btn:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.3));
}

.action-btn:hover {
    color: var(--accent-light);
}

/* MEDIA PAGES */
.media-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 40px;
    background: var(--white);
    margin-top: 70px;
}

.media-page.hidden {
    display: none !important;
}

.back-btn {
    position: fixed;
    top: 90px;
    left: 40px;
    background: #ff6d39;
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 500;
}

.back-btn:hover {
    background: #e05a2e;
    transform: translateY(-2px);
}

.video-title-row {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 20px;
    width: 100%;
    min-height: 44px;
}

.video-title-row .back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.video-title-row p {
    flex: 1;
    text-align: center;
    margin: 0;
}

.media-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.video-placeholder {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.game-placeholder {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 32px;
    font-weight: 700;
}

#game-page {
    padding: 0;
    position: relative;
    height: calc(100vh - 70px);
    min-height: 0;
    display: block;
    overflow: hidden;
}

#game-page .media-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px;
    display: block;
}

#game-page .back-btn {
    position: absolute;
    top: auto;
    bottom: 8px;
    left: 24px;
}

#gameFrame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#videoTitle {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.video-container {
    width: 100%;
    max-width: 1100px;
}

.feedback-container {
    width: 100%;
    max-width: 1100px;
    padding: 40px;
    background: var(--gray-light);
    border-radius: 12px;
    animation: fadeInUp 0.6s ease;
    font-family: 'Red Hat Display', sans-serif;
}

.feedback-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
}

.feedback-btn {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    background: #ffe6b3;
    border: 4px solid #ff6d39;
    border-radius: 12px;
    cursor: pointer;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Red Hat Display', sans-serif;
    color: var(--primary);
    transition: all 0.3s ease;
}

.feedback-hover-btn {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: rgba(255, 109, 57, 0.15);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #ff6d39;
    padding: 0;
    transition: background 0.2s;
    z-index: 1;
}

.feedback-hover-btn:active {
    background: rgba(255, 109, 57, 0.35);
}

@media (hover: none) {
    .feedback-hover-btn {
        display: flex;
    }
}

.feedback-btn:hover {
    background: #ff6d39;
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 109, 57, 0.3);
}

.feedback-btn p {
    margin: 0;
    text-align: center;
}

.feedback-response {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    border-left: 4px solid #ff6d39;
    animation: fadeInUp 0.6s ease;
}

.feedback-response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.close-feedback-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #ff6d39;
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Red Hat Display', sans-serif;
    transition: all 0.3s ease;
}

.close-feedback-btn:hover {
    background: #e05a2e;
    transform: translateY(-2px);
}

.audio-response-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ff6d39;
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.audio-response-btn:hover {
    background: #e05a2e;
    transform: scale(1.1);
}

.response-text {
    font-size: 24px;
    line-height: 1.8;
    color: var(--gray-dark);
    text-align: left;
}

/* SEZIONI CONTENUTO */
.content-section {
    min-height: 100vh;
}

.home-content {
    background: var(--white);
    padding: 80px 40px;
    display: flex;
    justify-content: center;
}

.section-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    margin-top: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-content {
    background: var(--white);
    padding: 0 40px 80px;
    margin-top: -30px;
    position: relative;
    z-index: 200;
    display: flex;
    justify-content: center;
}

.content-column {
    max-width: 700px;
    width: 100%;
}

.section-title {
    font-family: 'Atma', cursive;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary);
    line-height: 1.2;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.section-subtitle {
    font-family: 'Atma', cursive;
    font-size: 48px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.content-text {
    font-size: 20px;
    line-height: 1.8;
    color: var(--gray-dark);
    margin-bottom: 32px;
    text-align: left;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.content-text.bold {
    font-weight: 700;
}

/* HAMBURGER MENU */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
    flex-shrink: 0;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    z-index: 999;
    flex-direction: column;
    padding: 8px 40px 24px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    text-decoration: none;
    color: var(--primary);
    font-family: 'Atma', cursive;
    font-size: 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--accent);
}

@media (max-width: 1200px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .content-text {
        font-size: 22px;
        text-align: left;
    }

    .section-content {
        padding: 40px 20px;
    }

    nav {
        padding: 0 20px;
    }

    .logo {
        height: 70px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .modal-box {
        max-width: 90%;
    }

    .modal-content {
        padding: 30px;
    }

    .modal-content h2 {
        font-size: 24px;
    }

}

/* ── MAESTRA OVERLAY ── */
.maestra-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 900;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.maestra-overlay.hidden {
    display: none;
}

.maestra-overlay-img {
    height: 82vh;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* ── MAESTRA CAPOLINO ── */
.maestra-capolino {
    position: fixed;
    right: 0;
    top: 80px;
    z-index: 899;
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    display: flex;
    align-items: flex-end;
}

.maestra-capolino.visible {
    transform: translateX(0);
    pointer-events: auto;
    cursor: pointer;
}

.maestra-capolino img {
    height: clamp(120px, 18vw, 220px);
    display: block;
}

#bubbleHome {
    height: clamp(98px, 14.7vw, 180px);
    width: auto;
    margin-right: clamp(6px, 1vw, 12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: right bottom;
}

#bubbleHome.hidden {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.maestra-close-btn {
    position: absolute;
    top: 90px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: #ff6d39;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.maestra-close-btn:hover {
    background: #e05a2e;
}

/* Solo telefoni */
@media (max-width: 480px) {
    /* Schede: immagini 1000×560 (25:14) – nessun ritaglio né banda */
    [id="schede-section"] .waveBand__content .flip-card {
        aspect-ratio: auto;
        height: calc((100vw - 32px) * 14 / 25 + 140px);
    }

    [id="schede-section"] .card-image {
        flex: none;
        width: 100%;
        aspect-ratio: 25 / 14;
        object-fit: contain;
    }

    /* Cards in colonna verticale */
    .waveBand__content {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 16px;
        gap: 16px;
    }

    .waveBand__content .flip-card {
        max-width: none;
        flex: none;
        width: 100%;
    }

    .card-title {
        font-size: 24px;
        padding: 18px 12px 10px;
    }

    .card-enter-btn {
        font-size: 20px;
        padding: 12px 32px;
        border-radius: 22px;
        margin: 16px;
    }

    .flip-card-back {
        gap: 20px;
    }

    .card-back-btn {
        gap: 10px;
        border-radius: 14px;
        padding: 16px 40px;
        font-size: 18px;
        width: 75%;
    }

    .card-back-btn svg {
        width: 40px;
        height: 40px;
    }

    /* Video page – tasti freccia */
    .video-title-row {
        margin-top: 12px;
        min-height: 36px;
    }

    .video-title-row .back-btn,
    .close-feedback-btn {
        font-size: 0;
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .video-title-row .back-btn::before,
    .close-feedback-btn::before {
        content: "";
        display: block;
        width: 11px;
        height: 11px;
        border-left: 3px solid white;
        border-top: 3px solid white;
        border-radius: 2px;
        transform: rotate(-45deg) translate(2px, 2px);
    }

    .video-title-row p {
        padding-left: 44px;
        padding-right: 44px;
    }

    #videoTitle {
        font-size: 13px !important;
    }

    .section-title {
        font-size: 18px;
    }

    .section-subtitle {
        font-size: 30px;
    }

    .content-text {
        font-size: 16px;
    }

    .maestra-overlay {
        align-items: flex-start;
    }

    #maestraOverlay {
        padding-top: 170px;
    }

    .maestra-overlay-img {
        height: 65vh;
        object-position: top;
    }


    #videoTitle {
        font-size: 22px !important;
    }

    #feedbackQuestionText {
        font-size: 18px !important;
    }

    .feedback-options {
        flex-direction: column;
    }

    .feedback-btn {
        font-size: 15px;
        padding: 14px 12px;
    }

    .feedback-container {
        padding: 20px 16px;
    }

    .response-text {
        font-size: 16px;
    }
}
/* FOOTER */
.site-footer {
    background: var(--gray-light);
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 32px 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    text-align: center;
}

.footer-logo {
    height: 40px;
    object-fit: contain;
}

.footer-links {
    gap: 24px;
}

.footer-links a {
    color: var(--gray-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    font-size: 13px;
    color: #888;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
}
