/* ForumForYou + Spagnolo — tema chiaro fisso */
:root{
  --bg:#fff!important;--bg2:#fff!important;--card:#fff!important;--card-solid:#fff!important;
  --text:#25324a!important;--muted:#66758f!important;--border:#e5eaf2!important;
  --shadow:0 10px 28px rgba(32,55,90,.09)!important;
}
html,body{background:#fff!important;color:#25324a!important;font-family:'Poppins',Arial,sans-serif!important;font-size:16.5px!important}
body::before{display:none!important}
.ffy-spanish-app{background:#fff!important;color:#25324a!important;font-size:1.04em!important}
.ffy-spanish-app p,.ffy-spanish-app li,.ffy-spanish-app label,.ffy-spanish-app input,.ffy-spanish-app button,.ffy-spanish-app a{font-family:'Poppins',Arial,sans-serif}
.ffy-spanish-app p,.ffy-spanish-app li{font-size:1.02em}
.ffy-spanish-app h1,.ffy-spanish-app h2,.ffy-spanish-app h3,.ffy-spanish-app h4{color:#1e2b43}

/* Manteniamo il bellissimo menu Spagnolo scuro/neon */
.ffy-topbar{background:linear-gradient(135deg,#081a35,#102b55)!important;border-radius:0 0 18px 18px;box-shadow:0 7px 22px rgba(18,40,75,.15)}
.ffy-main-nav a{color:#eaf2ff!important;font-size:14px!important}
.ffy-main-nav a:hover{color:#fff!important}

/* Hero e card del corso: bianchi e leggibili */
.hero,.card,.stat,.exercise,.study-list p,.option,.cta,.badge-card{
  background:#fff!important;color:#25324a!important;border:1px solid #e5eaf2!important;box-shadow:0 8px 24px rgba(32,55,90,.07)!important
}
.hero{background:linear-gradient(135deg,#fff,#f8fbff)!important}
.card p,.stat small,.exercise p,.study-list p,.option,.lesson-info,.question-label{color:#66758f!important}
.card a,.hero a{color:#5b50dc}
.badge{background:#f3f0ff!important;color:#5a49c7!important;border:1px solid #ddd7ff!important}
.gradient-text{background:linear-gradient(90deg,#5c54e8,#087ea4,#d93f8c)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important}

/* Dashboard */
.stat .big,.lesson-row strong{color:#1e2b43!important}.mini{background:#edf1f7!important}.score-pill{background:#f3f6fa!important;color:#33425d!important}

/* Giochi: sfondo bianco, contenitori chiari; colori vivaci solo come accento */
.shell,.game-shell{color:#25324a!important}
.game-card{background:#fff!important;border:1px solid #e2e8f1!important;box-shadow:0 8px 24px rgba(32,55,90,.08)!important}
.game-body h3{color:#1e2b43!important}.game-body p{color:#66758f!important}
.filters .filter{background:#fff!important;color:#44536c!important;border:1px solid #d8e0eb!important}
.filters .filter.active{background:linear-gradient(90deg,#6c63ff,#a448db)!important;color:#fff!important;border-color:transparent!important}
.scorebar>div{background:#fff!important;color:#33425d!important;border:1px solid #dce4ef!important}
.play-area{background:#fff!important;color:#25324a!important;border:1px solid #dfe6f0!important;box-shadow:0 12px 35px rgba(32,55,90,.09)!important}
.question-label{color:#66758f!important}.answer-btn,.check-btn{background:#f7f9fc!important;color:#263650!important;border:1px solid #d5deea!important;font-size:17px!important}
.answer-btn:hover,.check-btn:hover{background:#eef3ff!important;border-color:#9ba9e9!important}
.answer-btn.correct{background:#e5f8ed!important;color:#12613e!important;border-color:#67c98e!important}
.answer-btn.wrong{background:#fff0f2!important;color:#a12e48!important;border-color:#e99aaa!important}
.memory-card{background:#f5f7fb!important;color:#25324a!important;border-color:#d9e1ed!important}.memory-card.open,.memory-card.matched{background:#eee8ff!important;color:#5136a5!important}
.dict-input{background:#fff!important;color:#25324a!important;border-color:#ccd7e6!important}.letter-cell{background:#f5f7fb!important;color:#25324a!important;border-color:#d6dfeb!important}.letter-cell.sel{background:#e9e1ff!important;color:#4932a0!important}
.word-chip,.letter-chip{background:#f1f4f9!important;color:#25324a!important;border:1px solid #dce3ed!important}.sentence-line,.letter-answer{border-color:#b9c7da!important;background:#fbfcfe!important}
.pill{background:#f1edff!important;color:#5a45bd!important;border-color:#d8ceff!important}.motivation{color:#3970a5!important;border-color:#e0e7f0!important}

/* Banner resta colorato: testo sempre bianco */
.ffy-learning-banner-inner,.hero-games{color:#fff!important}
.ffy-learning-banner-inner h2,.ffy-learning-banner-inner p,.ffy-learning-banner-inner .ffy-banner-kicker,.hero-games h1,.hero-games h2,.hero-games p{color:#fff!important}

/* Nessun controllo giorno/notte */
.theme-toggle{display:none!important}

/* ForumForYou resta bianco */
.ffy-breadcrumb{background:#fff!important;color:#5f6d82!important}
.ffy-share-box{background:#fff!important}

@media(max-width:700px){html,body{font-size:16px!important}.ffy-spanish-app{font-size:1.02em!important}}

/* ===== REVISIONE LEGGIBILITA FFY v4 ===== */
html,body,.ffy-spanish-page,.ffy-spanish-app{background:#fff!important;color:#26354d!important}
body{font-size:17px!important;line-height:1.68!important}
.ffy-spanish-app{font-size:1.06em!important}
.ffy-spanish-app p,.ffy-spanish-app li,.ffy-spanish-app label{color:#40516b!important}
.ffy-spanish-app h1,.ffy-spanish-app h2,.ffy-spanish-app h3,.ffy-spanish-app h4{color:#17243a!important}

/* Elimina fasce/righe vuote attorno al menu principale FFY */
.ffy-site-navbar,.navbar.ffy-site-navbar{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;min-height:0!important}
.ffy-site-navbar .container,.ffy-site-navbar .navbar-header{margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important}
.ffy-school-cover{margin:0!important;border:0!important}
.ffy-breadcrumb{margin-top:0!important;border-top:0!important}

/* Link e pulsanti: mai chiaro su chiaro */
.ffy-spanish-app a:not(.ffy-main-nav a):not(.ffy-brand){color:#4338ca!important;font-weight:700!important}
.ffy-spanish-app .btn,
.ffy-spanish-app nav:not(.ffy-main-nav) a,
.ffy-spanish-app button:not(.sound-btn):not(.ffy-menu-button):not(.answer-btn):not(.check-btn):not(.memory-card):not(.letter-cell):not(.flash-card-main){
  background:#4338ca!important;color:#fff!important;border:1px solid #3730a3!important;
  box-shadow:0 4px 12px rgba(67,56,202,.14)!important
}
.ffy-spanish-app .btn:hover,.ffy-spanish-app nav:not(.ffy-main-nav) a:hover{background:#3730a3!important;color:#fff!important}

/* Card lezioni home */
.grid .card{background:#fff!important;border:1px solid #dbe3ee!important}
.grid .card .lesson-number{color:#5b21b6!important;font-weight:800!important}
.grid .card h3{color:#17243a!important;font-size:1.22rem!important}
.grid .card p{color:#53647c!important;font-size:1.02rem!important}
.grid .card a{display:inline-block!important;margin-top:7px!important;padding:8px 12px!important;border-radius:11px!important;background:#eef2ff!important;color:#3730a3!important;border:1px solid #c7d2fe!important}
.grid .card a:hover{background:#4338ca!important;color:#fff!important}

/* Lezioni: ogni riga e' cliccabile per ascoltare */
.study-row{display:flex!important;align-items:center!important;gap:10px!important;margin:10px 0!important;padding:0!important;border-radius:15px!important;background:#f8fafc!important;border:1px solid #dbe3ee!important;cursor:pointer!important;transition:.18s ease!important}
.study-row:hover{background:#eef4ff!important;border-color:#aabce0!important}
.study-list .study-row p{flex:1!important;margin:0!important;padding:14px 16px!important;background:transparent!important;border:0!important;color:#31445f!important;font-size:1.04rem!important}
.sound-btn{flex:0 0 auto!important;background:#e9e7ff!important;color:#3f35a8!important;border:1px solid #c9c5ff!important;min-width:44px!important;min-height:44px!important;border-radius:12px!important;margin-right:8px!important}

/* Quiz */
.exercise{background:#fff!important;border:1px solid #dbe3ee!important;color:#26354d!important}
.exercise h3{color:#17243a!important;font-size:1.16rem!important}
.option{background:#f8fafc!important;border:1px solid #d8e1ed!important;color:#26354d!important;font-size:1.02rem!important}
.option:hover{background:#eef4ff!important;border-color:#aabce0!important}
.result{background:#eaf8f0!important;border:1px solid #84cba3!important;color:#14532d!important;font-size:1.08rem!important;line-height:1.65!important}
.result .btn{margin:8px 5px 0 0!important;color:#fff!important}
.progress{background:#edf1f6!important;border-color:#d8e0eb!important}

/* Giochi: contrasto completo */
.game-title h1,.big-word{color:#17243a!important}
.game-title p,.question-label{color:#52637b!important}
.game-message{margin:14px auto!important;min-height:64px!important;border-radius:14px!important;color:#26354d!important;background:#f8fafc!important;border:1px solid #dbe3ee!important}
.game-message.ok{background:#e7f8ee!important;color:#11613c!important;border-color:#73c894!important}
.game-message.error{background:#fff0f2!important;color:#9f2741!important;border-color:#e99aaa!important}
.answer-btn,.check-btn{background:#f4f7fb!important;color:#1f3049!important;border:1px solid #cbd7e6!important;font-size:17.5px!important}
.answer-btn:hover,.check-btn:hover{background:#eaf0ff!important;color:#17243a!important}
.answer-btn.correct{background:#dff7e9!important;color:#0d5a35!important;border:2px solid #4db779!important}
.answer-btn.wrong{background:#ffe7eb!important;color:#92233c!important;border:2px solid #dd7186!important}
.play-area.area-ok{background:#effbf4!important;border-color:#62bf88!important}
.play-area.area-bad{background:#fff3f5!important;border-color:#df8798!important}
.dict-input{background:#fff!important;color:#17243a!important;border:1px solid #aebdd0!important}
.scorebar>div{background:#f5f7fb!important;color:#26354d!important;border-color:#d5deea!important}

/* Dashboard */
.stat,.badge-card,.cta{background:#fff!important;color:#26354d!important;border-color:#dbe3ee!important}
.stat .big,.lesson-row strong,.badge-card strong{color:#17243a!important}
.stat small,.lesson-info,.badge-card div{color:#52637b!important}

@media(max-width:700px){body{font-size:16.5px!important}.ffy-spanish-app{font-size:1.04em!important}}


/* ===== FFY v5: contrasto pulsanti + header compatto ===== */
/* Nessuna fascia bianca artificiale sopra/sotto il blocco ForumForYou Lab */
body.ffy-spanish-page{margin:0!important;padding:0!important;background:#fff!important}
body.ffy-spanish-page > :first-child{margin-top:0!important}
.ffy-site-navbar{margin-top:0!important;margin-bottom:0!important}
.ffy-site-navbar + .ffy-school-cover{margin-top:0!important}

/* CTA della lezione: sempre visibili, anche senza hover */
.ffy-spanish-app .lesson-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important;margin:18px 0 0!important}
.ffy-spanish-app .lesson-actions .lesson-action,
.ffy-spanish-app .lesson-actions .lesson-action:link,
.ffy-spanish-app .lesson-actions .lesson-action:visited{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 min-height:46px!important;padding:11px 17px!important;border-radius:13px!important;
 background:#4338ca!important;color:#fff!important;border:2px solid #4338ca!important;
 text-decoration:none!important;font-weight:800!important;font-size:1rem!important;
 box-shadow:0 4px 12px rgba(67,56,202,.18)!important
}
.ffy-spanish-app .lesson-actions .lesson-action:hover,
.ffy-spanish-app .lesson-actions .lesson-action:focus{
 background:#312e81!important;color:#fff!important;border-color:#312e81!important;text-decoration:none!important
}

/* Navigazione lezioni e quiz */
.ffy-spanish-app a.btn.nav-btn,
.ffy-spanish-app a.btn.nav-btn:link,
.ffy-spanish-app a.btn.nav-btn:visited,
.ffy-spanish-app a.btn.result-btn,
.ffy-spanish-app a.btn.result-btn:link,
.ffy-spanish-app a.btn.result-btn:visited{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 min-height:44px!important;padding:10px 15px!important;margin:5px 4px!important;
 background:#4338ca!important;color:#fff!important;border:2px solid #4338ca!important;
 border-radius:12px!important;text-decoration:none!important;font-weight:800!important;
 text-shadow:none!important;box-shadow:0 3px 10px rgba(67,56,202,.16)!important
}
.ffy-spanish-app a.btn.nav-btn:hover,.ffy-spanish-app a.btn.nav-btn:focus,
.ffy-spanish-app a.btn.result-btn:hover,.ffy-spanish-app a.btn.result-btn:focus{
 background:#312e81!important;color:#fff!important;border-color:#312e81!important;text-decoration:none!important
}
.ffy-spanish-app .lesson-pager{display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin:18px 0!important}

/* Risultato quiz: testo ben contrastato */
.ffy-spanish-app .result,.ffy-spanish-app .result *:not(.btn){color:#14532d!important}
.ffy-spanish-app .result a.btn{color:#fff!important}

@media(max-width:600px){
 .ffy-spanish-app .lesson-actions .lesson-action{width:100%!important}
 .ffy-spanish-app a.btn.nav-btn,.ffy-spanish-app a.btn.result-btn{flex:1 1 100%!important;margin:3px 0!important}
}

/* ===== FFY v6: revisione globale testi e CTA su fondo bianco ===== */
.ffy-spanish-app, .ffy-spanish-app *{text-shadow:none!important}
.ffy-spanish-app p,.ffy-spanish-app li,.ffy-spanish-app label,.ffy-spanish-app .muted,.ffy-spanish-app .subtitle{color:#3f4f67!important}
.ffy-spanish-app h1,.ffy-spanish-app h2,.ffy-spanish-app h3,.ffy-spanish-app h4,.ffy-spanish-app h5,.ffy-spanish-app h6{color:#18263c!important}

/* Hero home: il vecchio nav ereditava colori trasparenti/scuri */
.ffy-spanish-app .hero p{color:#40516b!important;font-size:1.08rem!important}
.ffy-spanish-app .hero nav{display:flex!important;flex-wrap:wrap!important;gap:12px!important;margin-top:20px!important}
.ffy-spanish-app .hero nav a,
.ffy-spanish-app .hero nav a:link,
.ffy-spanish-app .hero nav a:visited{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 min-height:48px!important;padding:12px 19px!important;border-radius:13px!important;
 background:#4338ca!important;color:#fff!important;border:2px solid #4338ca!important;
 text-decoration:none!important;font-weight:800!important;font-size:1.02rem!important;
 box-shadow:0 5px 14px rgba(67,56,202,.18)!important
}
.ffy-spanish-app .hero nav a:hover,.ffy-spanish-app .hero nav a:focus{
 background:#312e81!important;color:#fff!important;border-color:#312e81!important;text-decoration:none!important
}

/* Tutte le CTA/link che si comportano da pulsante */
.ffy-spanish-app a.btn,.ffy-spanish-app a.btn:link,.ffy-spanish-app a.btn:visited,
.ffy-spanish-app .cta a,.ffy-spanish-app .cta a:link,.ffy-spanish-app .cta a:visited{
 color:#fff!important;background:#4338ca!important;border-color:#4338ca!important;text-decoration:none!important
}
.ffy-spanish-app a.btn:hover,.ffy-spanish-app a.btn:focus,.ffy-spanish-app .cta a:hover,.ffy-spanish-app .cta a:focus{
 color:#fff!important;background:#312e81!important;border-color:#312e81!important
}

/* Cards e testi descrittivi */
.ffy-spanish-app .card p,.ffy-spanish-app .game-card p,.ffy-spanish-app .lesson-info,
.ffy-spanish-app .study-list p,.ffy-spanish-app .question-label{color:#465a75!important}
.ffy-spanish-app .card h3,.ffy-spanish-app .game-card h3{color:#18263c!important}
.ffy-spanish-app .card>a:not(.btn){color:#3730a3!important;background:#eef2ff!important;border-color:#c7d2fe!important}
.ffy-spanish-app .card>a:not(.btn):hover{color:#fff!important;background:#4338ca!important;border-color:#4338ca!important}

/* Form, opzioni e feedback */
.ffy-spanish-app input,.ffy-spanish-app select,.ffy-spanish-app textarea{color:#1f3049!important;background:#fff!important}
.ffy-spanish-app .option,.ffy-spanish-app .answer-btn,.ffy-spanish-app .check-btn{color:#1f3049!important}
.ffy-spanish-app .result{color:#14532d!important}

@media(max-width:600px){.ffy-spanish-app .hero nav a{width:100%!important}}

/* v7 - elimina lo spazio bianco superiore senza alterare i menu FFY */
html, body.ffy-spanish-page { margin-top:0!important; padding-top:0!important; }
body.ffy-spanish-page > script:first-child + * { margin-top:0!important; }
.ffy-site-navbar { margin-top:0!important; top:auto!important; }
/* Bootstrap assegna 20px di margin-bottom alla navbar: qui non serve */
.ffy-site-navbar.navbar { margin-bottom:0!important; }
/* Il blocco scritto da res_header.js non deve introdurre margini verticali esterni */
body.ffy-spanish-page > div:first-of-type,
body.ffy-spanish-page > header:first-of-type { margin-top:0!important; }


/* ===== FFY v10: integrazione pulita, senza spostare la pagina ===== */
html, body.ffy-spanish-page {
  margin:0 !important;
  padding:0 !important;
  background:#fff !important;
}
body.ffy-spanish-page {
  position:static !important;
  top:auto !important;
  transform:none !important;
  min-height:0 !important;
}
/* La navbar FFY non deve ereditare margini dal CSS del corso */
body.ffy-spanish-page > .ffy-site-navbar,
body.ffy-spanish-page > nav.ffy-site-navbar {
  margin:0 !important;
  padding:0 !important;
  top:auto !important;
  transform:none !important;
}
/* Cover subito dopo il menu, senza fasce aggiuntive */
.ffy-school-cover { margin:0 !important; padding:0 !important; line-height:0 !important; }
.ffy-school-cover img { margin:0 !important; vertical-align:top !important; }
/* Il contenuto non crea spazio fantasma prima del footer */
.ffy-spanish-app { margin:0 !important; padding-bottom:0 !important; min-height:0 !important; }
.ffy-spanish-app > *:last-child { margin-bottom:0 !important; }
.ffy-share-box { margin-bottom:0 !important; }
/* Footer ForumForYou: lascia che sia main.css a gestirlo; niente regole del corso */
#bottom, #footer { margin-bottom:0 !important; }
body.ffy-spanish-page > #footer:last-of-type { margin-bottom:0 !important; }
.highslide-container { z-index:100000 !important; }
.highslide-html, .highslide-html-content { background:#fff !important; color:#26354d !important; }
.highslide-wrapper, .highslide-outline { z-index:100001 !important; }
