/* ============================================================
   stile-questionario-riepilogo-limiti.css
   Foglio di stile per la pagina "Esercizi di riepilogo sui
   limiti", v3. Copia identica di stile-questionario-limiti-notevoli.css,
   solo rinominata per questa pagina.
   ============================================================ */

:root {
    --green: #009966;
    --green-dk: #009966;
    --green-title: #009966;
    --border-green: #009900;
    --green-lt: #f0fdf4;
    --border: #dbe4dc;
    --text: #2c3e50;
    --muted: #666;
    --bg: #f8f9fa;
    --radius: 8px;
    --container: 1000px;
}
* { box-sizing: border-box; }
html { overflow-y: scroll; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 10px;
    background-color: var(--bg);
    color: var(--text);
}

/* ---------- Header ---------- */
.page-wrap {
    max-width: var(--container);
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 20px;
}
.header-box {
    width: 100%;
    border: 2px dashed var(--border-green);
    box-sizing: border-box;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 15px;
    cursor: pointer;
    gap: 15px;
}
.header-box .brand-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-box .brand-left img { height: 50px; width: auto; }
.header-box .brand-left .site-url {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
}
.header-box .brand-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-box .brand-right .logo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.header-box .brand-right img { height: 50px; width: auto; }
.header-box .brand-right .since {
    font-size: 0.78rem;
    color: #999;
    font-style: italic;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 20px;
}
.breadcrumb a { color: var(--green-dk); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Nav principale ---------- */
.main-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 25px;
    padding: 5px;
    border: 1px solid var(--border-green);
    border-radius: 8px;
    background: #f4f7f5;
}
.main-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
.main-menu a:hover { background: var(--green); color: white; }
.main-menu a.current { background: var(--green); color: white; }
.main-menu a.current:hover { background: var(--green); }

.main-page-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin: 6px 0 8px;
    color: var(--green-title);
}

.page-intro {
    background-color: var(--green-lt);
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* ---------- Footer ---------- */
footer {
    margin-top: 16px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
    text-align: center;
    font-size: 0.88rem;
    color: #555;
}
.license-box {
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #777;
}
.validation-link {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #999;
}
.validation-link a { color: #999; text-decoration: none; }
.validation-link a:hover { text-decoration: underline; }
footer p { margin: 0; }

/* ---------- Punti a/b/c ---------- */
.point-block { margin-bottom: 28px; }
.point-block h2 {
    color: var(--green-dk);
    font-size: 1.1rem;
    padding-bottom: 6px;
}

/* Linea sfumata (separatore) */
.fade-green {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--green), transparent);
    margin: 15px 0;
}

/* Bottone "Soluzione Quesito N" (verde a contorno) */
.solution-button {
    background-color: white;
    color: #2e7d32;
    border: 2px solid #2e7d32;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 8px 4px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 600;
}
.solution-button:hover {
    background-color: #2e7d32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46,125,50,0.3);
}

/* Contenitore soluzione (nascosto finche' non si clicca) */
.solution-container { display: none; }
.solution {
    background-color: #f8f9fa;
    padding: 15px 15px 15px 25px;
    margin: 15px 0 15px 8px;
    border-left: 4px solid #0000FF;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
}
.solution h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}
.solution .conclusion {
    background: var(--green-lt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 14px;
    font-weight: 600;
}

/* Bottone "Nascondi soluzione" IN ALTO (arancio a contorno, stessa posizione della Soluzione) */
.btn-nascondi-top {
    background-color: white;
    color: #e65100;
    border: 2px solid #e65100;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: none;
    font-size: 14px;
    margin: 8px 4px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 600;
}
.btn-nascondi-top:hover {
    background-color: #e65100;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230,81,0,0.3);
}

/* Bottone "Nascondi soluzione" IN FONDO (arancio a contorno, uniformato a quello in alto) */
.btn-nascondi-wrap { text-align: center; }
.btn-nascondi {
    background-color: white;
    color: #e65100;
    border: 2px solid #e65100;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin: 10px auto;
    transition: all 0.3s ease;
}
.btn-nascondi:hover {
    background-color: #e65100;
    color: white;
    box-shadow: 0 4px 8px rgba(230,81,0,0.3);
    transform: translateY(-2px);
}

/* (bottoni di navigazione finale sostituiti da .footer-buttons-row, vedi in fondo al file) */

/* ---- Bottone torna su (flottante, appare dopo 300px di scroll) ---- */
#btn-top {
    position: fixed;
    bottom: 20px;
    right: 4px;
    background: #9C27B0;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: background 0.2s;
}
#btn-top:hover { background: #7a00cc; }

@media print {
    #btn-top, .main-menu, footer, .solution-button, .btn-nascondi {
        display: none !important;
    }
    .solution-container { display: block !important; }
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    body { padding: 30px 20px; }
    .page-wrap { padding: 30px; }
    .main-page-title { font-size: 2.2rem; }
}

/* ---------- Riga di controlli sotto ogni quesito (bottone Soluzione) ---------- */
.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}
@media print {
    .controls { display: none !important; }
}

/* ============================================================ */
/* BOTTONI FOOTER "A CONTORNO" (stile questionario-equazioni-differenziali,
   ridimensionati più piccoli per un uso comodo su smartphone) */
/* ============================================================ */
.footer-buttons-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0 20px;
}
.btn-footer-teoria,
.btn-footer-arancio,
.btn-footer-viola,
.btn-footer-verde {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    max-width: 44vw;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 8px;
    background: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85em;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 3px 7px rgba(0,0,0,0.1);
    box-sizing: border-box;
    cursor: pointer;
}
.btn-footer-teoria   { color: #5c6bc0; border: 2px solid #5c6bc0; }
.btn-footer-arancio  { color: #ff9800; border: 2px solid #ff9800; }
.btn-footer-viola    { color: #9c27b0; border: 2px solid #9c27b0; }
.btn-footer-verde    { color: #2e7d32; border: 2px solid #2e7d32; }

.btn-footer-teoria:hover   { background: #5c6bc0; color: white; transform: translateY(-2px); }
.btn-footer-arancio:hover  { background: #ff9800; color: white; transform: translateY(-2px); }
.btn-footer-viola:hover    { background: #9c27b0; color: white; transform: translateY(-2px); }
.btn-footer-verde:hover    { background: #2e7d32; color: white; transform: translateY(-2px); }

@media (max-width: 480px) {
    .btn-footer-teoria,
    .btn-footer-arancio,
    .btn-footer-viola,
    .btn-footer-verde {
        max-width: 92vw;
    }
}

@media print {
    .footer-buttons-row { display: none !important; }
}

/* ---------- Box testo del quesito (azzurrino, come nei test) ---------- */
.question-body {
    background-color: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-left: 3px solid #007bff;
    padding: 15px 20px;
    border-radius: 4px 8px 8px 4px;
    margin: 15px 0 25px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.02);
}
.question-body p {
    margin: 10px 0;
    font-size: 1.05rem;
    font-weight: normal;
    line-height: 1.6;
    color: #2c3e50;
}
.question-body p:first-child { margin-top: 0; }
.question-body p:last-child { margin-bottom: 0; }

/* ---------- Box di osservazione/attenzione (azzurro) ---------- */
.box-azzurro {
    background-color: #eaf3fb;
    border: 1px solid var(--border);
    padding: 12px 20px;
    margin: 15px 0;
    border-radius: var(--radius);
}
.box-azzurro .formula { margin: 8px 0; }

/* ---------- Smartphone: meno padding per guadagnare spazio alle formule ---------- */
@media (max-width: 600px) {
    .page-wrap { padding: 12px; }
}
