/* ==========================================================================
   Εμφάνιση της σελίδας. Τα χρώματα βρίσκονται αμέσως παρακάτω (:root).
   ========================================================================== */

@font-face {
  font-family: "Commissioner";
  src: url("fonts/commissioner-greek-wght-normal.woff2") format("woff2-variations"),
       url("fonts/commissioner-greek-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("fonts/commissioner-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Serif";
  src: url("fonts/noto-serif-greek-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Noto Serif";
  src: url("fonts/noto-serif-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #8bc34a;
  --green-hover: #7cb342;
  --green-ink: #3f6b17;
  --green-soft: #eef6e3;
  --orange: #ff5722;
  --orange-ink: #c4410f;
  --orange-soft: #ffebe4;
  --cream: #fff3e0;
  --cream-deep: #ffe7c7;
  --brown: #3e2723;
  --muted: #76655f;
  --line: #f2e3cf;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(62, 39, 35, .05), 0 8px 24px rgba(62, 39, 35, .06);
  --radius: 28px;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Commissioner", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern";
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--brown); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.flip { transform: scaleX(-1); }

/* ---------------------------------------------------------------- κεφαλίδα */
.site-header { padding: 18px 0 6px; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--green); color: var(--brown);
  font-family: var(--serif); font-weight: 800; font-size: 26px; line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(62, 39, 35, .12);
}
.brand-mark sup { font-size: .55em; line-height: 0; vertical-align: .75em; margin-left: 1px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 750; font-size: 19px; line-height: 1.2; }
.brand-sub { font-size: 14px; color: var(--muted); line-height: 1.3; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 9px 16px; border-radius: 999px; color: var(--brown);
  transition: background-color .15s, color .15s;
}
.nav a:hover { background: var(--cream-deep); }
.nav a[aria-current="page"] { background: var(--green); color: var(--brown); }

/* ------------------------------------------------------------------- hero */
.hero { padding-top: 22px; }
.hero-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: 24px;
  background-color: var(--card);
  background-image:
    linear-gradient(rgba(139, 195, 74, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 195, 74, .13) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  border-radius: 36px;
  padding: 56px 56px 52px;
  box-shadow: var(--shadow);
}
.eyebrow {
  display: inline-block; font-weight: 700; font-size: 15px; letter-spacing: .02em;
  color: var(--green-ink); background: var(--green-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 800; color: var(--orange);
  font-size: clamp(38px, 6vw, 66px); line-height: 1.05; letter-spacing: -.01em;
  margin-bottom: 16px; text-wrap: balance;
}
.hero-who { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.hero-who .ic { color: var(--green-ink); }
.hero-lead { font-size: 19px; max-width: 560px; margin-bottom: 28px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.tiles { position: relative; height: 300px; }
.tile {
  position: absolute; width: 104px; height: 104px; border-radius: 26px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800; font-size: 58px; line-height: 1;
  box-shadow: 0 2px 0 rgba(62, 39, 35, .08), 0 14px 26px rgba(62, 39, 35, .12);
  user-select: none;
}
.t1 { left: 4%;  top: 6%;  background: var(--orange); color: #fff; transform: rotate(-8deg); }
.t2 { left: 38%; top: 0;   background: var(--green); color: var(--brown); transform: rotate(6deg); }
.t3 { left: 70%; top: 14%; background: var(--card); color: var(--orange); transform: rotate(-4deg); border: 2px solid var(--line); }
.t4 { left: 14%; top: 54%; background: var(--card); color: var(--green-ink); transform: rotate(5deg); border: 2px solid var(--line); }
.t5 { left: 48%; top: 50%; background: #ff8a65; color: #fff; transform: rotate(-6deg); }
.t6 { left: 78%; top: 60%; background: var(--brown); color: var(--cream); transform: rotate(9deg); width: 84px; height: 84px; font-size: 46px; border-radius: 22px; }

/* --------------------------------------------------------------- κουμπιά */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
.btn .ic { width: 18px; height: 18px; }
.btn-green { background: var(--green); color: var(--brown); box-shadow: inset 0 -3px 0 rgba(62, 39, 35, .14); }
.btn-green:hover { background: var(--green-hover); }
.btn-ghost { background: var(--cream); color: var(--brown); }
.btn-ghost:hover { background: var(--cream-deep); }
.btn-white { background: #fff; color: var(--brown); white-space: normal; text-align: left; word-break: break-word; }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(62, 39, 35, .15); }
.btn-sm { padding: 10px 18px; font-size: 15px; }

/* -------------------------------------------------------------- ενότητες */
.section { padding-top: 64px; scroll-margin-top: 16px; }
.section-tight { padding-top: 28px; }
.section-head { margin-bottom: 26px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--green-ink); margin-bottom: 6px; }
.kicker-dark { color: var(--brown); opacity: .75; }
.section h2, .contact h2 {
  font-family: var(--serif); font-weight: 800; color: var(--orange);
  font-size: clamp(30px, 4vw, 42px); line-height: 1.15;
}
.pill { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1; padding: 5px 9px; border-radius: 999px; }
.pill-new { background: var(--orange); color: #fff; }
.empty { color: var(--muted); padding: 18px 0; }

/* Ανακοινώσεις */
.news { display: grid; gap: 14px; }
.news-item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; align-items: start;
  background: var(--card); border-radius: 24px; padding: 20px 24px; box-shadow: var(--shadow);
}
.news-date {
  width: 76px; height: 76px; border-radius: 20px; background: var(--orange-soft); color: var(--orange-ink);
  display: grid; place-content: center; text-align: center;
}
.news-date b { font-size: 30px; line-height: 1; font-weight: 800; }
.news-date small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; margin-top: 5px; }
.news-date-icon .ic { width: 30px; height: 30px; }
.news-body { padding-top: 6px; min-width: 0; }
.news-body h3 { font-size: 19px; line-height: 1.35; margin-bottom: 4px; }
.news-body p { color: var(--muted); overflow-wrap: anywhere; }
.news-body .news-raw { font-size: 14px; font-weight: 700; color: var(--orange-ink); }
.news-body a { color: var(--orange-ink); font-weight: 600; }
.older { margin-top: 14px; }
.older > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--green-ink); padding: 8px 2px;
}
.older > summary::-webkit-details-marker { display: none; }
.older > summary::before { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--green-soft); }
.older[open] > summary::before { content: "−"; }
.older .news { margin-top: 10px; }

/* Μαθήματα */
.subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.subject {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border-radius: var(--radius); padding: 26px 26px 24px;
  text-decoration: none; box-shadow: var(--shadow); min-height: 210px;
  transition: transform .18s, box-shadow .18s;
}
.subject:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(62, 39, 35, .06), 0 18px 34px rgba(62, 39, 35, .1); }
.icon-box {
  width: 60px; height: 60px; border-radius: 18px; flex: none;
  display: grid; place-items: center; background: var(--orange-soft); color: var(--orange);
}
.icon-box .ic { width: 30px; height: 30px; }
.subject .icon-box { margin-bottom: 14px; }
.subject-name { font-family: var(--serif); font-weight: 800; font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.subject-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 15px; margin-top: auto; }
.subject-go {
  position: absolute; right: 24px; top: 34px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: var(--brown);
  transition: transform .18s;
}
.subject:hover .subject-go { transform: translateX(3px); }
.subject:nth-child(3n+2) .icon-box { background: var(--green-soft); color: var(--green-ink); }
.subject:nth-child(3n+3) .icon-box { background: #fff1d6; color: #b26a00; }

/* Σύνδεσμοι */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.link-card {
  display: flex; flex-direction: column; gap: 6px; background: var(--card); border-radius: 24px; padding: 22px 24px;
  text-decoration: none; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .15s;
}
.link-card:hover { border-color: var(--green); }
.link-title { font-weight: 750; font-size: 18px; line-height: 1.3; }
.link-desc { color: var(--muted); font-size: 15px; }
.link-host { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--orange-ink); }
.link-host .ic { width: 16px; height: 16px; }

/* Επικοινωνία */
.contact {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px;
  background: var(--green); color: var(--brown); border-radius: 36px; padding: 40px 44px;
  box-shadow: inset 0 -6px 0 rgba(62, 39, 35, .1);
}
.contact h2 { color: var(--brown); margin-bottom: 10px; }
.contact-line { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.contact-line .ic { margin-top: 3px; }

/* ----------------------------------------------------------- σελίδα μαθήματος */
.subject-hero { padding-top: 22px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; color: var(--green-ink); }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ic { width: 16px; height: 16px; }
.subject-title { display: flex; align-items: center; gap: 20px; }
.icon-box-lg { width: 76px; height: 76px; border-radius: 22px; }
.icon-box-lg .ic { width: 38px; height: 38px; }
.subject-title h1 { font-family: var(--serif); font-weight: 800; color: var(--orange); font-size: clamp(36px, 5vw, 54px); line-height: 1.1; }
.subject-stats { color: var(--muted); margin-top: 4px; }
.subject-intro { max-width: 720px; margin-top: 18px; font-size: 18px; }
.subject-intro a { color: var(--orange-ink); font-weight: 600; }

.search {
  display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px;
  padding: 0 20px; margin-bottom: 18px; box-shadow: var(--shadow); color: var(--muted);
  border: 2px solid transparent;
}
.search:focus-within { border-color: var(--green); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--brown); padding: 14px 0; }

.group { background: var(--card); border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow); overflow: hidden; }
.group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px;
}
.group > summary::-webkit-details-marker { display: none; }
.group[open] > summary { border-bottom: 1px solid var(--line); }
.group-text { display: flex; flex-direction: column; min-width: 0; }
.group-name { font-weight: 750; font-size: 20px; line-height: 1.3; }
.group-meta { color: var(--muted); font-size: 15px; }
.toggle { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--orange-soft); position: relative; }
.toggle::before, .toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2.5px; border-radius: 2px; background: var(--orange); transform: translate(-50%, -50%); }
.toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s; }
.group[open] .toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.group > summary:hover .toggle { background: #ffdccf; }

.files li {
  display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 16px 26px; border-top: 1px solid var(--line);
}
.files li:first-child { border-top: 0; }
.file-text { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-weight: 650; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); font-size: 14px; }
.badge { display: block; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 8px 6px; border-radius: 10px; }
.badge-pdf   { background: #fde4df; color: #b3261e; }
.badge-doc   { background: #e3edfb; color: #1c4f96; }
.badge-ppt   { background: var(--orange-soft); color: var(--orange-ink); }
.badge-xls   { background: #e2f3e5; color: #1f6b33; }
.badge-img   { background: #fff1d6; color: #8a5300; }
.badge-video { background: #efe6fa; color: #5f33a0; }
.badge-audio { background: #e0f4f6; color: #0f6470; }
.badge-zip   { background: #ece7e4; color: #5b4a44; }
.badge-link  { background: var(--green-soft); color: var(--green-ink); }
.badge-other { background: #f1ece8; color: #5b4a44; }

.empty-card { display: flex; align-items: center; gap: 18px; background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.empty-card p { color: var(--muted); }
.empty-card b { color: var(--brown); }
.back { margin-top: 28px; }
.back a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--green-ink); text-decoration: none; }
.back a:hover { text-decoration: underline; }
.notfound { background: var(--card); border-radius: 36px; padding: 48px; box-shadow: var(--shadow); }
.notfound h1 { font-family: var(--serif); color: var(--orange); font-size: 40px; margin-bottom: 10px; }
.notfound p { margin-bottom: 22px; color: var(--muted); }

/* ---------------------------------------------------------------- υποσέλιδο */
.site-footer { margin-top: 80px; padding: 28px 0 36px; border-top: 2px dashed var(--line); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; font-size: 14px; color: var(--muted); }
.footer-in strong { color: var(--brown); }

/* ------------------------------------------------------------------ κινητό */
@media (max-width: 860px) {
  .hero-card { grid-template-columns: 1fr; padding: 40px 30px 34px; }
  .tiles { height: 120px; order: -1; margin: -10px 0 4px; }
  .tile { width: 64px; height: 64px; font-size: 34px; border-radius: 18px; }
  .t1 { left: 0; top: 18px; }
  .t2 { left: 70px; top: 4px; }
  .t3 { left: 140px; top: 26px; }
  .t4 { left: 210px; top: 8px; }
  .t5 { left: 280px; top: 30px; }
  .t6 { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header { padding-top: 14px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; width: calc(100% + 32px); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { background: var(--card); flex: none; }
  .hero-card { padding: 30px 22px 28px; border-radius: 28px; }
  .tiles { height: 96px; }
  .tile { width: 54px; height: 54px; font-size: 28px; border-radius: 15px; }
  .t2 { left: 58px; } .t3 { left: 116px; } .t4 { left: 174px; } .t5 { left: 232px; }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section { padding-top: 48px; }
  .news-item { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 20px; }
  .news-date { width: 60px; height: 60px; border-radius: 16px; }
  .news-date b { font-size: 24px; }
  .news-body { padding-top: 2px; }
  .subject { min-height: 0; padding: 22px; }
  .subject-go { top: 30px; right: 22px; }
  .contact { padding: 30px 24px; border-radius: 28px; }
  .contact .btn { width: 100%; }
  .subject-title { gap: 14px; }
  .icon-box-lg { width: 60px; height: 60px; border-radius: 18px; }
  .group > summary { padding: 18px; }
  .group-name { font-size: 18px; }
  .files li { grid-template-columns: 104px minmax(0, 1fr); gap: 10px 14px; padding: 14px 18px; }
  .files .btn { grid-column: 1 / -1; width: 100%; }
  .notfound { padding: 30px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
