/*
Theme Name: 2ο ΓΕΛ Κω
Description: Θέμα για την ιστοσελίδα του 2ου ΓΕΛ Κω. Ίδιο CSS με το πρότυπο Joomla, ώστε οι δύο επιδείξεις να είναι οπτικά ταυτόσημες.
Version: 0.4
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dyo-gel-ko
*/

/* 2ο ΓΕΛ Κω — shared stylesheet.
   Ported unchanged into both the WordPress theme and the Joomla 5 template,
   so the two demos are visually identical (plan §1).
   Fonts: system stack for now. Before launch, self-host .woff2 in /fonts/
   and @font-face here — never load from Google's CDN (plan §7). */

:root {
  --ink:        #16202b;
  --ink-soft:   #4a5765;
  --line:       #d8dee6;
  --line-soft:  #e8ecf1;
  --bg:         #ffffff;
  --bg-alt:     #f4f6f9;
  --brand:      #0b3f6b;   /* 8.9:1 on white  */
  --brand-dk:   #072b4a;
  --brand-ink:  #ffffff;
  --accent:     #9c2a2a;   /* 7.1:1 on white  */
  --focus:      #c8a415;
  --radius:     6px;
  --wrap:       68rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); }
a:hover { color: var(--brand-dk); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 44rem); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0; top: -4rem; z-index: 100;
  background: var(--brand); color: var(--brand-ink);
  padding: .75rem 1.25rem; font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 0; color: var(--brand-ink); }

/* ---- 1. Contact strip ------------------------------------------------ */
.contact-strip {
  background: var(--brand-dk);
  color: #eaf1f7;
  font-size: .9375rem;
}
.contact-strip__inner {
  display: flex; flex-wrap: wrap; gap: .25rem 1.75rem;
  padding: .5rem 0;
}
.contact-strip__item { color: #eaf1f7; text-decoration: none; padding: .15rem 0; }
.contact-strip__item:hover { color: #fff; text-decoration: underline; }
a.contact-strip__item:focus-visible { outline-color: #ffd84d; }
@media (max-width: 34rem) { .contact-strip__hours { width: 100%; } }

.langswitch { margin-left: auto; display: flex; gap: .25rem; align-items: center; }
.langswitch__item {
  display: block; padding: .15rem .5rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .03em;
  color: #eaf1f7; text-decoration: none;
  border: 1px solid rgba(255,255,255,.35); border-radius: 3px;
}
.langswitch__item:hover { background: rgba(255,255,255,.14); color: #fff; }
.langswitch__item.is-current {
  background: #fff; color: var(--brand-dk); border-color: #fff; cursor: default;
}
a.langswitch__item:focus-visible { outline-color: #ffd84d; }
@media (max-width: 34rem) { .langswitch { margin-left: 0; } }

/* ---- Masthead ------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0;
}
.masthead__brand {
  display: flex; align-items: center; gap: .875rem;
  text-decoration: none; color: var(--ink);
  min-width: 0;                    /* let it shrink instead of pushing the button off */
}
.masthead__mark {
  flex: none;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 700; font-size: 1.125rem;
  border-radius: var(--radius);
}
.masthead__owl {
  flex: none;
  width: auto; height: clamp(40px, 11vw, 64px);   /* source is 90×80; never scaled up */
  border-radius: var(--radius);
}

.masthead__logo {
  display: block; min-width: 0;
  width: 300px; max-width: 100%; height: auto;
}
@media (max-width: 30rem) { .masthead__owl {
  flex: none;
  width: auto; height: clamp(40px, 11vw, 64px);   /* source is 90×80; never scaled up */
  border-radius: var(--radius);
}

.masthead__logo {
  display: block; min-width: 0;
  width: 300px; max-width: 100%; height: auto;
} }

.masthead__name strong { display: block; font-size: 1.3125rem; line-height: 1.2; }
.masthead__name span { display: block; font-size: .875rem; color: var(--ink-soft); }

.nav-toggle {
  display: none;
  flex: none;
  align-items: center; gap: .5rem;
  background: var(--bg-alt); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .55rem .9rem;
  font: inherit; font-weight: 600; font-size: .9375rem;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block; width: 1.125rem; height: 2px;
  background: currentColor; content: "";
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after  { position: absolute; top:  6px; }

/* ---- Main navigation ------------------------------------------------- */
.mainnav { background: var(--brand); }
.mainnav__list {
  display: flex;
  flex-wrap: nowrap;              /* one row: the labels shrink instead of wrapping */
  overflow-x: auto;               /* ...and scroll rather than clip if they cannot */
  scrollbar-width: none;
  list-style: none; margin: 0; padding: 0;
}
.mainnav__list::-webkit-scrollbar { display: none; }
.mainnav__item > a {
  display: block;
  white-space: nowrap;
  /* Fluid so seven Greek labels fit one row on a laptop without wrapping. */
  padding: .8rem clamp(.4rem, .9vw, 1rem);
  color: var(--brand-ink); text-decoration: none;
  font-weight: 600; font-size: clamp(.78125rem, 1.02vw, .96875rem);
  border-bottom: 3px solid transparent;
}
.mainnav__item > a:hover { background: var(--brand-dk); color: #fff; }
.mainnav__item.is-active > a { border-bottom-color: #ffd84d; background: var(--brand-dk); }
.mainnav a:focus-visible { outline-color: #ffd84d; outline-offset: -3px; }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; }
  .mainnav { display: none; }
  .mainnav.is-open { display: block; }
  .mainnav__list {
    flex-direction: column; flex-wrap: wrap; overflow-x: visible;
    width: min(100% - 2.5rem, var(--wrap));
  }
  .mainnav__item > a { white-space: normal; font-size: 1rem; }
  .mainnav__item + .mainnav__item { border-top: 1px solid rgba(255,255,255,.22); }
  .mainnav__item > a { padding: .9rem .25rem; border-bottom: 0; border-left: 3px solid transparent; }
  .mainnav__item.is-active > a { border-left-color: #ffd84d; padding-left: .75rem; }
}

/* ---- Sections -------------------------------------------------------- */
.section { padding: 2.5rem 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
.section__head { margin-bottom: 1.5rem; }
.section__head h1, .section__head h2 { margin: 0; font-size: 1.75rem; line-height: 1.25; }
.section__sub { margin: .35rem 0 0; color: var(--ink-soft); }

/* ---- 2. Notice board ------------------------------------------------- */
.noticeboard { list-style: none; margin: 0; padding: 0; }
.notice {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.notice:first-child { border-top: 0; padding-top: 0; }
.notice__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  margin: 0 0 .3rem; font-size: .875rem; color: var(--ink-soft);
}
.notice__cat {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 999px; padding: .05rem .6rem;
  font-size: .8125rem; color: var(--ink-soft);
}
.section--alt .notice__cat { background: #fff; }
.notice__att { color: var(--accent); font-size: .8125rem; }
.notice__title { margin: 0 0 .25rem; font-size: 1.1875rem; line-height: 1.35; }
.notice__title a { text-decoration: none; }
.notice__title a:hover { text-decoration: underline; }
.notice__sum { margin: 0; color: var(--ink-soft); }

/* ---- 3. Documents ---------------------------------------------------- */
.doclist { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
@media (min-width: 46rem) { .doclist { grid-template-columns: 1fr 1fr; } }
.doclist__link {
  display: flex; align-items: center; gap: .875rem;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .8rem .9rem;
  text-decoration: none; color: var(--ink);
  height: 100%;
}
.doclist__link:hover { border-color: var(--brand); background: #fbfcfe; color: var(--ink); }
.doclist__icon {
  flex: none; display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  background: var(--accent); color: #fff;
  border-radius: var(--radius);
  font-size: .6875rem; font-weight: 700; letter-spacing: .02em;
}
.doclist__text { display: block; }
.doclist__title { display: block; font-weight: 600; }
.doclist__meta { display: block; font-size: .8125rem; color: var(--ink-soft); }

/* ---- 4. Useful links ------------------------------------------------- */
.linkgrid { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
@media (min-width: 46rem) { .linkgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .linkgrid { grid-template-columns: repeat(4, 1fr); } }
.linkgrid__item a {
  display: block; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem; text-decoration: none; color: var(--ink);
}
.linkgrid__item a:hover { border-color: var(--brand); background: var(--bg-alt); }
.linkgrid__title { display: block; font-weight: 600; color: var(--brand); }
.linkgrid__desc { display: block; font-size: .875rem; color: var(--ink-soft); }

/* ---- Prose pages ----------------------------------------------------- */
.prose h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 .75rem; }
.prose h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.note {
  background: var(--bg-alt); border-left: 4px solid var(--brand);
  padding: .75rem 1rem; color: var(--ink-soft); font-size: .9375rem;
}
.note-inline { color: var(--ink-soft); }

.crumbs { font-size: .875rem; color: var(--ink-soft); margin-bottom: 1rem; }
.post__atth { font-size: 1.125rem; margin-top: 2rem; }
.backlink { margin-top: 2rem; }

.contact-dl { margin: 0; }
.contact-dl dt { font-weight: 600; }
.contact-dl dd { margin: 0 0 .875rem; }

/* ---- Footer ---------------------------------------------------------- */
.sitefoot {
  margin-top: 1rem;
  background: var(--brand-dk); color: #d9e4ee;
  padding: 2.25rem 0 1.25rem;
  font-size: .9375rem;
}
.sitefoot a { color: #fff; }
.sitefoot__grid { display: grid; gap: 1.5rem; }
@media (min-width: 46rem) { .sitefoot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.sitefoot__h { font-size: 1rem; margin: 0 0 .5rem; color: #fff; }
.sitefoot__list { list-style: none; margin: 0; padding: 0; }
.sitefoot__list li { padding: .15rem 0; }
.sitefoot__legal {
  margin-top: 1.75rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.2);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  font-size: .875rem;
}
.sitefoot__legal p { margin: 0; }
.sitefoot__demo { color: #ffd84d; }
.sitefoot a:focus-visible { outline-color: #ffd84d; }

@media print {
  .contact-strip, .mainnav, .nav-toggle, .sitefoot { display: none; }
}
