@import url('../fonts/nunito.css');
/* FIFI Studio: stil comun pentru paginile pentru profesori și părinți.
   Fără resurse de pe internet: fontul Nunito e pus chiar în site (folderul fonts/). */

:root {
  --brand: #6D5DFC;
  --brand2: #B05CF6;
  --grad: linear-gradient(135deg, #6D5DFC 0%, #B05CF6 100%);
  --ink: #161A2E;
  --muted: #535B76;
  --line: #E2E6ED;
  --line-strong: #CDD3DE;
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --soft: #F4F2FF;
  --surface: #F6F7FA;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px -1px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .06);
  --font: "Nunito", ui-rounded, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  /* culorile categoriilor de blocuri, ca în aplicație */
  --ev: #F5B300; --mi: #4C97FF; --as: #9966FF; --ef: #EE4FA0; --su: #CF63CF; --co: #FF9F1A;
  --se: #4CBFE6; --op: #40BF4A; --va: #FF7629; --cr: #0FBD8C; --jo: #3D63DD; --bm: #FF6B5B;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.6; font-size: 16.5px; background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: var(--brand); font-weight: 700; text-underline-offset: 2px; }
a:hover { color: #4B3BE0; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.2px; }
h1 { font-size: clamp(28px, 4.2vw, 42px); }
h2 { font-size: clamp(22px, 2.8vw, 28px); margin-top: .2em; }
h3 { font-size: 19px; }
h4 { font-size: 16.5px; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0 0 .8em; padding-left: 1.3em; }
li { margin: .2em 0; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
img { max-width: 100%; }

/* ---------- bara de sus ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: #FFFFFF; border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.topbar .in { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; }
.brand img { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); padding: 3px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.topnav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14.5px; padding: 7px 12px; border-radius: 10px; }
.topnav a:hover { background: var(--surface); color: var(--ink); }
.topnav a.on { background: var(--soft); color: #4F3FE0; font-weight: 700; }
.topnav a.app { background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.topnav a.app:hover { background: #5B4BE6; color: #fff; }

/* ---------- pagină ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.narrow { max-width: 860px; }
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 34px 34px 30px; margin-bottom: 28px;
  background: var(--grad); color: #fff; box-shadow: 0 10px 28px -14px rgba(91, 75, 230, .55);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero p { font-size: 18px; max-width: 720px; color: rgba(255, 255, 255, .94); }
.hero .mascot { position: absolute; right: 30px; bottom: 18px; width: 120px; height: 120px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .16)); z-index: 1; }
.hero .kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; background: rgba(255, 255, 255, .2); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.hero .content { position: relative; z-index: 2; padding-right: 140px; }
.hero .tags { margin-top: 10px; }
.hero .tag { background: rgba(255, 255, 255, .2); color: #fff; border-color: transparent; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 20px;
  border: 1px solid var(--line);
}
.card > :last-child { margin-bottom: 0; }
.card.soft { background: var(--soft); box-shadow: none; border: 1px solid #E4E0FF; }
.card.note { background: #FFF9E8; border-color: #FBE7A6; box-shadow: none; }
.card.ok { background: #EBFAF3; border-color: #BDEBD6; box-shadow: none; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .card { margin-bottom: 0; }
.section { margin: 34px 0 14px; }
.section h2 { display: flex; align-items: center; gap: 10px; }
.emo { font-size: 1.15em; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--soft); color: var(--brand); border: 1px solid #E2DDFF; margin: 0 4px 4px 0; white-space: nowrap;
}
.tag.gray { background: var(--surface); color: var(--muted); border-color: var(--line); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15.5px;
  padding: 11px 18px; border-radius: 12px; border: 0; cursor: pointer; font-family: inherit;
  background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
}
.btn:hover { color: #fff; background: #5B4BE6; }
.btn.light { background: #fff; color: #4F3FE0; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.btn.light:hover { color: #4B3BE0; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* listă de resurse */
.res { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink); height: 100%; }
a.card.res { transition: transform .15s ease, box-shadow .15s ease; }
a.card.res:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); color: var(--ink); }
.res .ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--soft); }
.res h3 { margin-bottom: .25em; color: var(--brand); }
.res p { margin: 0; color: var(--muted); font-weight: 600; font-size: 15px; }

/* pași numerotați */
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding: 2px 0 10px 44px; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px;
}

/* tabele */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 800; color: var(--ink); }
thead th:first-child { border-top-left-radius: 12px; }
thead th:last-child { border-top-right-radius: 12px; }
tr:last-child td { border-bottom: 0; }
td.t { white-space: nowrap; font-weight: 800; color: var(--brand); }
.table-wrap { overflow-x: auto; }

/* lecții: navigare jos */
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.pager a { text-decoration: none; }

/* căsuță „în aplicație” */
.inapp { display: flex; gap: 14px; align-items: center; }
.inapp img { width: 56px; height: 56px; flex: none; }

/* ============================================================
   Blocuri (cipuri colorate ca în aplicație)
   ============================================================ */
.b {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; vertical-align: middle;
  padding: 3px 10px; min-height: 28px; border-radius: 8px; margin: 2px 2px;
  font-weight: 700; font-size: 14px; line-height: 1.25; color: #fff; background: #999;
  border: 1px solid rgba(0, 0, 0, .14); text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.b.ev { background: var(--ev); color: #3B2A00; text-shadow: none; }
.b.mi { background: var(--mi); }
.b.as { background: var(--as); }
.b.ef { background: var(--ef); }
.b.su { background: var(--su); }
.b.co { background: var(--co); }
.b.se { background: var(--se); }
.b.op { background: var(--op); }
.b.va { background: var(--va); }
.b.cr { background: var(--cr); }
.b.jo { background: var(--jo); }
.b.bm { background: var(--bm); }
/* pălărie (bloc de start) */
.b.hat { border-radius: 16px 16px 8px 8px; padding-top: 6px; }
/* valoare rotundă și condiție (hexagon) */
.b.r { border-radius: 999px; padding: 1px 9px; min-height: 22px; font-size: 13px; }
.b.bool { border-radius: 0; padding: 1px 14px; min-height: 22px; font-size: 13px; border: 0;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 9px 100%, 0 50%); }
/* câmpuri: număr/text (oval alb) și meniu (cu săgeată) */
.b i, .b u {
  font-style: normal; text-decoration: none; background: #fff; color: #2B2F45; border-radius: 999px;
  padding: 0 8px; font-weight: 700; font-size: 12.5px; min-width: 22px; text-align: center; text-shadow: none;
  border: 1px solid rgba(0, 0, 0, .12); line-height: 18px;
}
.b u { border-radius: 6px; background: rgba(255, 255, 255, .28); color: inherit; border-color: rgba(0, 0, 0, .16); }
.b u::after { content: " ▾"; font-size: .85em; opacity: .85; }
.b.ev u { background: rgba(255, 255, 255, .45); }
.flag { display: inline-block; width: 18px; height: 18px; background: url("steag.svg") center/contain no-repeat; vertical-align: -3px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* script: blocuri unul sub altul */
.script { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 6px 0 12px; }
.script > .b, .script .in > .b { margin: 0 0 2px; }
.script .c { display: flex; flex-direction: column; align-items: stretch; padding: 4px 0 12px; gap: 0; }
.script .c > .h { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 0 10px; min-height: 24px; }
.script .c > .in {
  display: flex; flex-direction: column; align-items: flex-start; margin: 4px 0 0 14px; padding: 3px 6px 3px 0;
  background: var(--card); border-radius: 6px 0 0 6px; min-height: 24px; min-width: 110px;
}
.script .c > .else { padding: 6px 10px 2px; }
.card.soft .script .c > .in { background: var(--soft); }
.card.note .script .c > .in { background: #FFF9E8; }
.scripts { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; }
.scripts .lbl { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 2px; }

/* legenda categoriilor */
.legend { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   Cartonașe și fișe (pagini A4)
   ============================================================ */
.print-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px;
}
.print-bar p { margin: 0; color: var(--muted); font-weight: 600; }

.sheet {
  width: 210mm; min-height: 297mm; margin: 0 auto 26px; background: #fff; box-shadow: var(--shadow);
  border-radius: 6px; padding: 12mm; position: relative;
}
.cards4 {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 271mm;
}
.ccard {
  border: 1.5px dashed #B9BCD4; padding: 6mm 6mm 5mm; display: flex; flex-direction: column; gap: 3mm; overflow: hidden; position: relative;
}
.ccard:nth-child(1) { border-right: 0; border-bottom: 0; }
.ccard:nth-child(2) { border-bottom: 0; }
.ccard:nth-child(3) { border-right: 0; }
.ccard .top { display: flex; align-items: center; gap: 8px; }
.ccard .num {
  flex: none; width: 34px; height: 34px; border-radius: 11px; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 16px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ccard h3 { margin: 0; font-size: 18px; }
.ccard .lvl { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.ccard .goal { font-weight: 700; font-size: 14px; margin: 0; }
.ccard .lab { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 0; }
.ccard .script { margin: 0; }
.ccard .b { font-size: 12.5px; min-height: 24px; padding: 2px 8px; }
.ccard .b.r, .ccard .b.bool { font-size: 12px; min-height: 20px; }
.ccard .script .c { padding: 2px 0 8px; }
.ccard .script .c > .in { margin-top: 2px; padding: 2px 5px 2px 0; min-height: 18px; }
.ccard .script .c > .else { padding: 3px 10px 1px; }
.ccard .scripts { gap: 4px 14px; }
.ccard.tight { gap: 2mm; }
.ccard.tight .b { font-size: 11.5px; min-height: 20px; padding: 1px 7px; }
.ccard.tight .b i, .ccard.tight .b u { font-size: 11px; line-height: 15px; }
.ccard.tight .more { font-size: 12px; }
.ccard .more { margin-top: auto; background: #F7F6FF; border-radius: 10px; padding: 7px 10px; font-size: 13px; font-weight: 600;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ccard .more b { color: var(--brand); }
.ccard .stripe { position: absolute; left: 0; top: 0; right: 0; height: 5px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ccard .fifi-mini { position: absolute; right: 5mm; bottom: 4mm; width: 26px; opacity: .25; }
.cut-hint { position: absolute; top: 4mm; left: 12mm; font-size: 10px; color: #9A9EB8; }

/* fișe de lucru */
.fisa h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 4mm; }
.fisa .who { display: flex; gap: 10mm; font-weight: 700; margin-bottom: 6mm; font-size: 14px; }
.fisa .who span { flex: 1; border-bottom: 1.5px solid #9A9EB8; padding-bottom: 2px; }
.fisa .task { margin-bottom: 6mm; }
.fisa .task h3 { font-size: 16px; margin-bottom: 2mm; }
.lines { border-bottom: 1.5px dotted #A4A8C2; height: 9mm; }
.box { border: 1.5px solid #C9CCE0; border-radius: 10px; min-height: 40mm; padding: 3mm; position: relative; }
.box .ph { position: absolute; left: 3mm; top: 2mm; font-size: 11px; color: #9A9EB8; font-weight: 700; }
.cutout { display: flex; flex-wrap: wrap; gap: 4mm 6mm; padding: 5mm; border: 1.5px dashed #B9BCD4; border-radius: 10px; }
.cutout .b { font-size: 14px; outline: 1.5px dashed #6B7096; outline-offset: 2mm; margin: 2mm; }
.slots { display: flex; flex-direction: column; gap: 2mm; }
.slot { border: 1.5px dashed #C9CCE0; border-radius: 8px; height: 11mm; display: flex; align-items: center; padding-left: 3mm; color: #A4A8C2; font-weight: 700; font-size: 13px; width: 95mm; }
.slot.in1 { margin-left: 12mm; width: 83mm; }
.emoji-table td, .emoji-table th { text-align: center; vertical-align: middle; }
.emoji-table td:first-child, .emoji-table th:first-child { text-align: left; }
.emoji-table .e { font-size: 22px; }
.emoji-table .ck { display: inline-block; width: 18px; height: 18px; border: 2px solid #A4A8C2; border-radius: 5px; }
.bug { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; align-items: start; margin-bottom: 5mm; padding-bottom: 4mm; border-bottom: 1px solid var(--line); }
.answer { background: #EBFAF3; border: 1px solid #BDEBD6; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* grila de evaluare */
.rubric th, .rubric td { border: 1px solid var(--line); }
.rubric { border-collapse: collapse; }
.rubric td:first-child { font-weight: 800; width: 17%; background: var(--surface); }
.rubric .lv { font-size: 12px; font-weight: 800; color: var(--muted); display: block; }
.rubric td .pts { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--brand); }
.score-row td { height: 34px; }

/* subsol */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.foot a { font-weight: 700; }

/* ---------- responsiv ---------- */
@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero { padding: 26px 22px; border-radius: 22px; }
  .hero .content { padding-right: 0; }
  .hero .mascot { position: static; width: 84px; height: 84px; margin-top: 12px; }
  .topnav { margin-left: 0; }
  .card { padding: 18px; }
  .bug { grid-template-columns: 1fr; }
}
/* pe ecrane înguste, paginile A4 se micșorează ca să încapă */
@media screen and (max-width: 840px) {
  .sheet-zoom { zoom: .5; }
}
@media screen and (min-width: 841px) and (max-width: 1000px) {
  .sheet-zoom { zoom: .8; }
}

/* ---------- tipărire ---------- */
@page { size: A4; margin: 12mm; }
@media print {
  body { background: #fff !important; font-size: 11.5pt; }
  .topbar, .no-print, .print-bar, .pager, .btns { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .hero { background: none !important; color: var(--ink); box-shadow: none; padding: 0 0 6mm; border-radius: 0; border-bottom: 2px solid var(--brand); margin-bottom: 6mm; }
  .hero h1, .hero p { color: var(--ink); }
  .hero::after { display: none; }
  .hero .mascot { width: 60px; height: 60px; right: 0; bottom: 6mm; filter: none; }
  .hero .content { padding-right: 70px; }
  .hero .kicker, .hero .tag { background: var(--soft); color: var(--brand); }
  .card { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; page-break-inside: avoid; }
  a { color: var(--ink); text-decoration: none; }
  a.card.res:hover { transform: none; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }
  table, tr, .script { break-inside: avoid; page-break-inside: avoid; }
  .foot { display: none; }
  .sheet-zoom { zoom: 1 !important; }
  /* paginile A4 (cartonașe și fișe) au deja marginile lor */
  .sheets-page .wrap { padding: 0; }
  .sheet { box-shadow: none; margin: 0; border-radius: 0; width: auto; min-height: 0; padding: 0; }
  .sheet-zoom { break-after: page; page-break-after: always; }
  .sheet-zoom:last-of-type { break-after: auto; page-break-after: auto; }
  .cards4 { height: 271mm; }
}

/* cipuri mici în textul cartonașelor */
.ccard .more .b, .ccard .goal .b { font-size: 11px; min-height: 18px; padding: 0 6px; margin: 1px; }
.ccard .more .b i, .ccard .more .b u { font-size: 10.5px; line-height: 14px; }
.ccard.tight { padding: 5mm 5mm 4mm; }
.ccard.tight .lab { display: none; }
.ccard.tight .script { margin: 0 0 2px; }
.ccard.tight { gap: 1.2mm; }
.ccard.tight .b { min-height: 19px; }
.ccard .script + .script, .ccard .script + .lbl { margin-top: 6px; }
.ccard.tight .script + .script { margin-top: 4px; }

/* fișe: aceeași mărime pe ecran și la tipărire, compacte ca să încapă pe A4 */
.fisa { font-size: 13.5px; line-height: 1.4; }
.fisa h2 { font-size: 22px; margin: 0 0 3mm; }
.fisa h3 { font-size: 15px; margin-bottom: 1.5mm; }
.fisa p { margin-bottom: 2mm; }
.fisa .task { margin-bottom: 4mm; }
.fisa .who { margin-bottom: 4mm; }
.fisa .lines { height: 7.5mm; }
.fisa .b { font-size: 12.5px; min-height: 24px; padding: 2px 8px; }
.fisa .script { margin: 2px 0 4px; }
.fisa .script .c { padding: 3px 0 9px; }
.fisa .script .c > .in { margin-top: 3px; padding: 2px 5px 2px 0; }
.fisa table { font-size: 13.5px; }
.fisa th, .fisa td { padding: 6px 10px; }
.fisa .bug { margin-bottom: 3mm; padding-bottom: 3mm; gap: 5mm; }
.fisa .answer { padding: 8px 12px; margin-bottom: 8px; }
.fisa .answer li { margin: 1px 0; }
@media (max-width: 680px) {
  .topbar { position: static; }
  .topnav a { padding: 6px 10px; font-size: 14px; }
}
@media screen and (max-width: 480px) {
  .sheet-zoom { zoom: .4; }
}

/* linkuri pe fundalul mov din banner și text mic sub carduri */
.hero a.light-link { color: #fff; font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hero a.light-link:hover { text-decoration-color: rgba(255, 255, 255, .6); }
.small { font-size: 14px; color: var(--muted, #667094); }
