/* Pagina del dipartimento di Economia: "l'estratto conto dello studente".
   Intro chiara con carta millimetrata e un grafico che sale, indice in forma di scontrino con i puntini di guida,
   striscia scorrevole di parole dell'economia, sezioni come voci di bilancio, finale con il totale da versare.
   Si appoggia a mift.css e dipartimento.css. Prefisso ec-. */

/* ---------- intro ---------- */
.mf-hero.ec-hero { position: relative; isolation: isolate; overflow: hidden; margin-bottom: 52px; color: #1a1c1e; text-align: left; background: #eaf2fb; }
.mf-hero.ec-hero::before { display: block; content: ""; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(rgba(0,86,135,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(0,86,135,.09) 1px, transparent 1px); background-size: 40px 40px; }
/* il grafico: una linea che sale e si disegna una volta sola */
.ec-grafico { position: absolute; left: 0; right: 0; bottom: 38px; width: 100%; height: 56%; z-index: -1; pointer-events: none; }
.ec-grafico .ec-area { fill: rgba(27,111,168,.12); }
.ec-grafico .ec-linea { fill: none; stroke: #1B6FA8; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ec-disegna 2.4s cubic-bezier(.3,.7,.2,1) .3s forwards; }
.ec-grafico .ec-punto { fill: #005687; }
@keyframes ec-disegna { to { stroke-dashoffset: 0; } }

.ec-in { max-width: 1280px; margin: 0 auto; padding: 36px 16px 92px; display: grid; gap: 34px; }
.ec-testo { align-self: center; }
.ec-pre { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #1B6FA8; }
.ec-pre::before { content: ""; width: 22px; height: 3px; background: #1B6FA8; }
.mf-hero.ec-hero .ec-testo h1 { max-width: 12ch; margin: 0; font-size: clamp(38px, 11vw, 54px); line-height: 1.02; letter-spacing: -.02em; color: #005687; text-wrap: balance; }
.mf-hero.ec-hero .ec-testo h1 em { color: #005687; font-style: normal; background: linear-gradient(transparent 60%, #8fd0ff 60% 92%, transparent 92%); padding: 0 4px; margin: 0 -4px; }
.mf-hero.ec-hero .dp-lead { max-width: 30rem; margin: 20px 0 0; font-size: 17px; line-height: 1.55; color: #1a1c1e; }

/* ---------- lo scontrino: l'indice ---------- */
.ec-scontrino-w { align-self: center; justify-self: center; width: 100%; max-width: 460px; filter: drop-shadow(1px 0 0 #005687) drop-shadow(-1px 0 0 #005687) drop-shadow(0 -1px 0 #005687) drop-shadow(7px 7px 0 #1B6FA8); }
.ec-scontrino { position: relative; padding: 22px 20px 6px; background: #fff; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #1a1c1e; }
/* bordo a dente di sega, come lo strappo di uno scontrino */
.ec-scontrino::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; background: linear-gradient(135deg, #fff 50%, transparent 50%) 0 0 / 14px 10px, linear-gradient(225deg, #fff 50%, transparent 50%) 0 0 / 14px 10px; background-repeat: repeat-x; }
.ec-sc-t { margin: 0; text-align: center; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #1B6FA8; }
.ec-sc-s { margin: 4px 0 0; text-align: center; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; line-height: 1.15; color: #005687; }
.ec-sc-meta { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 0; padding: 8px 0; border-top: 2px dashed #9ec0de; border-bottom: 2px dashed #9ec0de; font-size: 12px; letter-spacing: .04em; color: #41474f; }
.ec-voci { list-style: none; margin: 0; padding: 4px 0 0; }
.mf-pagina .ec-voci a, .ec-voci a { display: grid; grid-template-columns: 34px minmax(0, 1fr) 22px; align-items: center; gap: 8px; min-height: 56px; padding: 9px 4px; color: #1a1c1e; text-decoration: none; transition: background 150ms ease; }
.ec-voci li + li { border-top: 1px dotted #9ec0de; }
.ec-voci a:hover { background: #e3eefa; }
.ec-voci a:active { background: #cfe2f4; }
.ec-voci a:focus-visible { outline: 3px solid #005687; outline-offset: -3px; }
.ec-vn { font-size: 13px; font-weight: 700; color: #1B6FA8; font-variant-numeric: tabular-nums; }
.ec-vt { display: grid; gap: 1px; min-width: 0; }
.ec-vt b { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15.5px; line-height: 1.25; color: #005687; }
.ec-vt span { font-family: 'Roboto', sans-serif; font-size: 13.5px; line-height: 1.4; color: #41474f; }
.ec-voci .material-symbols-outlined { font-size: 20px; color: #1B6FA8; transition: transform 150ms ease; }
.ec-voci a:hover .material-symbols-outlined { transform: translateX(3px); }
.ec-saldo { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 0; padding: 12px 0 0; border-top: 2px solid #005687; font-size: 13px; }
.ec-saldo p { margin: 0; line-height: 1.4; color: #41474f; }
.ec-saldo b { display: block; font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 800; letter-spacing: .02em; color: #005687; }
.ec-quadra { flex: none; padding: 5px 10px; border: 3px solid #005687; border-radius: 6px; color: #005687; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-9deg); opacity: .92; }
/* codice a barre */
.ec-barre { height: 30px; margin: 14px 0 18px; background: repeating-linear-gradient(90deg, #005687 0 2px, transparent 2px 5px, #005687 5px 6px, transparent 6px 10px, #005687 10px 13px, transparent 13px 15px); opacity: .85; }

/* ---------- striscia scorrevole ---------- */
.ec-nastro { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; background: #005687; color: #fff; border-top: 2px solid #002b45; }
.ec-nastro-in { display: flex; width: max-content; animation: ec-scorri 38s linear infinite; }
.ec-nastro span { flex: none; padding: 9px 0 9px 22px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.ec-nastro span::after { content: "\25B2"; margin-left: 22px; font-size: 10px; color: #8fd0ff; }
@keyframes ec-scorri { to { transform: translateX(-50%); } }

@media (min-width: 900px) {
  .ec-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; padding: 64px 40px 108px; }
  .mf-hero.ec-hero .ec-testo h1 { font-size: 72px; line-height: 1; }
  .mf-hero.ec-hero .dp-lead { font-size: 19px; }
  .ec-scontrino-w { justify-self: end; }
}

/* ---------- sezioni come voci di bilancio ---------- */
.dp-pagina .mf-sh .ec-kk { gap: 12px; color: #1B6FA8; }
.ec-vn-tag { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 2px solid #005687; border-radius: 4px; background: #fff; color: #005687; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; box-shadow: 3px 3px 0 #1B6FA8; }

/* ---------- divisori: tratteggio con l'euro ---------- */
.dp-div.ec-div { gap: 18px; }
.dp-div.ec-div::before, .dp-div.ec-div::after { height: 0; border-top: 3px dotted #1B6FA8; border-radius: 0; background: none; }
.ec-div span { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid #005687; border-radius: 50%; background: #fff; color: #005687; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; line-height: 1; box-shadow: 3px 3px 0 #1B6FA8; }

/* ---------- finale: chiusura dell'esercizio ---------- */
.mf-cta.ec-cta { max-width: 860px; margin: 56px auto; padding: 38px 24px 34px; border: 2px solid #005687; border-radius: 6px; background: #fff; box-shadow: 8px 8px 0 #1B6FA8; text-align: center; }
.mf-cta.ec-cta .ec-fin { display: block; margin: 0 auto 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #1B6FA8; }
.mf-cta.ec-cta h2 { max-width: 26ch; margin: 0 auto 12px; font-size: clamp(26px, 6.4vw, 38px); line-height: 1.1; color: #005687; text-wrap: balance; }
.mf-cta.ec-cta p:not(.ec-fin):not(.ec-tot) { max-width: 34rem; margin: 0 auto 24px; font-size: 17px; line-height: 1.55; color: #1a1c1e; }
.mf-cta.ec-cta .ec-tot { display: flex; align-items: baseline; gap: 8px; max-width: 420px; margin: 0 auto 26px; padding-top: 12px; border-top: 2px solid #005687; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; color: #41474f; }
.mf-cta.ec-cta .ec-tot::after { content: ""; order: 1; flex: 1 1 auto; align-self: flex-end; margin-bottom: 4px; border-bottom: 2px dotted #1B6FA8; }
.mf-cta.ec-cta .ec-tot span { order: 0; text-align: left; }
.mf-cta.ec-cta .ec-tot b { order: 2; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 16px; color: #005687; text-align: right; }
.mf-cta.ec-cta .mf-az { justify-content: center; }
.mf-pagina .ec-cta .mf-btn-pieno { background: #005687; color: #fff; }
.mf-pagina .ec-cta .mf-btn-pieno:hover { background: #00466f; }
.mf-pagina .ec-cta .mf-btn-vuoto { background: #fff; color: #005687; border-color: #005687; }
.mf-pagina .ec-cta .mf-btn-vuoto:hover { background: #e3eefa; }
@media (max-width: 520px) { .mf-cta.ec-cta { padding: 30px 18px 26px; } .mf-cta.ec-cta .mf-az { flex-direction: column; } .mf-cta.ec-cta .mf-btn { width: 100%; } }

@media (max-width: 420px) {
  .ec-voci a { grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 6px; }
  .ec-sc-s { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .ec-grafico .ec-linea { animation: none; stroke-dashoffset: 0; }
  .ec-nastro-in { animation: none; }
  .ec-voci a, .ec-voci .material-symbols-outlined { transition: none; }
  .ec-voci a:hover .material-symbols-outlined { transform: none; }
}
