/*
 * ksk — the look of the old ksk.gr on stock Cassiopeia (G11b, D80/D85).
 *
 * Installed for SITE=ksk ONLY (Dockerfile) at media/templates/site/cassiopeia/css/user.css, the
 * documented `template.user` hook that stock Cassiopeia already loads at weight 500 (see
 * config/user.css for otoposmou's equivalent). No WordPress/Elementor CSS is reused: every value
 * below was MEASURED on ksk.gr (headless Chrome, computed styles, 1366 px and 375 px, 2026-11-20).
 *
 * The content carries plain wrappers written by import/ksk/extract-ksk.py from Elementor's layout:
 *   .ksk-sec            one full-width band (an Elementor top-level container)
 *   .ksk-sec.ksk-hero   with a background photo (figure.ksk-hero-bg)   — home
 *   .ksk-sec.ksk-band   with a coloured background                       — hub title bars
 *   .ksk-sec.ksk-tint   with no background of its own (ksk.gr's pale-green page shows through)
 *   .ksk-row > .ksk-col side-by-side columns (cards)
 *   a.ksk-btn           the blue "Apply now" buttons
 *   .ksk-footer         the black org footer (module in position `footer`)
 * The database side (logo, fluid layout, the menu in the header, no breadcrumbs) is set by
 * import-ksk.php (otm_ksk_site_chrome).
 *
 * 🔴 No 100vw anywhere (CLAUDE.md trap): bands are full-width because the layout is fluid; the
 * content is centred with percentage padding, which is relative to the band, not the viewport.
 */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../ksk/roboto-latin-400-normal.woff2") format("woff2");
}

:root {
  --ksk-text: #292929;
  --ksk-heading: #000;
  --ksk-tint: #edf6ee;        /* Astra global colour 4 = the page background */
  --ksk-band: #484848;        /* #bbb under a 64% rgb(7,7,7) overlay, as rendered */
  --ksk-footer: #000;         /* the footer rows render black on ksk.gr (their wrapper is #06140c); also the phone browser-bar colour: hard-coded as theme-color in the Dockerfile's SITE=ksk install step — change both */
  --ksk-hero-fallback: #06140c;
  --ksk-btn: #003399;
  --ksk-nav: #010101;
  --ksk-nav-active: #6a6a6a;
  --ksk-accent: #178e79;      /* Astra global colour 1 (link hover) */
  --ksk-max: 1200px;
  --ksk-gutter: 20px;
  --ksk-pad-x: max(var(--ksk-gutter), calc((100% - var(--ksk-max)) / 2));
  --ksk-serif: Georgia, Times, "Times New Roman", serif;
  --ksk-sans: Roboto, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------------------------------------------------------------- base type */
body.site {
  background: #fff;
  color: var(--ksk-text);
  font-family: var(--ksk-serif);
  font-size: 15px;
  line-height: 1.65;
}
@media (min-width: 922px) {
  body.site { font-size: 21px; }
}
body.site h1, body.site h2, body.site h3, body.site h4, body.site h5, body.site h6 {
  font-family: var(--ksk-serif);
  font-weight: 400;
  color: var(--ksk-heading);
  margin: 0 0 20px;          /* Elementor's widget spacing on ksk.gr */
}
body.site * + h2, body.site * + h3 { margin-top: 30px; }
body.site h2 { font-size: 32px; line-height: 1.3; }
body.site h3 { font-size: 24px; line-height: 1.3; }
body.site h4 { font-size: 20px; line-height: 1.2; }
body.site h5 { font-size: 18px; line-height: 1.2; }
@media (min-width: 922px) {
  body.site h2 { font-size: 56px; }
  body.site h3 { font-size: 40px; }
  body.site h4 { font-size: 32px; }
  body.site h5 { font-size: 24px; }
}
body.site p { margin: 0 0 1em; }
body.site ul, body.site ol { margin: 0 0 1.5em; }
body.site a { color: #000; }
.ksk-sec a:not(.ksk-btn) { text-decoration: none; }
.ksk-sec a:not(.ksk-btn):hover { text-decoration: underline; }
body.site a:hover, body.site a:focus { color: var(--ksk-accent); }
body.site img { max-width: 100%; height: auto; }

/* ----------------------------------------------------------------- header */
.container-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 82px;
  padding: 0 var(--ksk-pad-x);
  background: #fff;
  background-image: none;
  box-shadow: none;
  color: var(--ksk-nav);
}
@media (min-width: 922px) {
  .container-header { min-height: 100px; }
}
.container-header .grid-child {
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
}
.container-header .navbar-brand { margin: 0; padding: 0; }
.container-header .brand-logo img {
  display: block;
  width: 112px;
  height: auto;
}
@media (min-width: 922px) {
  .container-header .brand-logo img { width: 126px; }
}
.container-header .container-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  padding: 0;
}
@media (min-width: 992px) {
  /* ksk.gr's menu sat centre-left after the logo (its right end held the social icons, D82) */
  .container-header .grid-child.container-nav { justify-content: flex-start; }
  .container-header .container-nav > nav.navbar { margin-left: clamp(0px, 5vw - 10px, 58px); }
}
.container-header .navbar,
.container-header .grid-child.container-nav,
.container-header .mod-menu.metismenu,
.container-header .mod-menu.metismenu > li { margin: 0; padding: 0; }

/* the top level: Roboto 16px uppercase, black; the current page grey (as ksk.gr) */
.container-header .mod-menu.metismenu > li > a,
.container-header .mod-menu.metismenu > li > .mod-menu__heading {
  font-family: var(--ksk-sans);
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ksk-nav);
  text-decoration: none;
}
.container-header .mod-menu.metismenu > li.current > a,
.container-header .mod-menu.metismenu > li.active > a,
.container-header .mod-menu.metismenu > li > a:hover {
  color: var(--ksk-nav-active);
}
/* the drop-down toggles (D83): a small caret, not Cassiopeia's big triangle button */
.container-header .mod-menu.metismenu .mm-toggler {
  color: var(--ksk-nav);
  background: transparent;
  border: 0;
  padding: 0 4px;
  margin-left: -10px;
  width: auto;
  min-width: 0;
}
.container-header .mod-menu.metismenu .mm-toggler::after {
  border-width: 5px 4px 0;
  border-color: var(--ksk-nav) transparent transparent;
  margin: 0;
}

/* drop-downs (D83): white panel, Roboto, normal case */
.container-header .mod-menu.metismenu ul.mm-collapse {
  background: #fff;
  border: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  padding: 8px 0;
}
.container-header .mod-menu.metismenu ul.mm-collapse > li { margin: 0; padding: 0; }
.container-header .mod-menu.metismenu ul.mm-collapse a {
  display: block;
  font-family: var(--ksk-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ksk-nav);
  padding: 8px 20px;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}
.container-header .mod-menu.metismenu ul.mm-collapse a:hover,
.container-header .mod-menu.metismenu ul.mm-collapse li.current > a { color: var(--ksk-nav-active); background: var(--ksk-tint); }

@media (min-width: 992px) {
  /* open on hover / keyboard focus too (core metismenu opens only on the caret click) */
  .container-header .mod-menu.metismenu > li.parent:hover > ul.mm-collapse,
  .container-header .mod-menu.metismenu > li.parent:focus-within > ul.mm-collapse { display: block; }
  .container-header .mod-menu.metismenu { gap: 0; }
  .container-header .mod-menu.metismenu > li > a { padding: 0 16px; line-height: 96px; }
  .container-header .mod-menu.metismenu ul.mm-collapse { min-width: 230px; }
}

/* mobile: the black square toggle (ksk.gr's), the menu drops below the header */
.container-header .navbar-toggler {
  width: 43px;
  height: 43px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--ksk-nav);
  color: #fff;
  font-size: 22px;
  line-height: 43px;
}
.container-header .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(23, 142, 121, .5); }
@media (max-width: 991.98px) {
  .container-header .grid-child.container-nav,
  .container-header .navbar { position: static; }
  .container-header .navbar-collapse {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1000;
    background: #fff;
    border-top: 1px solid #eaeaea;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
    padding: 0 var(--ksk-gutter);
  }
  .container-header .mod-menu.metismenu { display: block; width: 100%; }
  .container-header .mod-menu.metismenu > li { border-bottom: 1px solid #eaeaea; }
  .container-header .mod-menu.metismenu > li > a { display: inline-block; padding: 0 20px 0 0; line-height: 48px; }
  .container-header .mod-menu.metismenu ul.mm-collapse { position: static; box-shadow: none; padding: 0 0 8px 12px; }
  .container-header .mod-menu.metismenu ul.mm-collapse a { white-space: normal; }
}

/* ------------------------------------------------------------- page grid */
/* No sidebars on ksk: one column, bands span the full width (fluid layout). */
.site-grid {
  display: block;
  padding: 0;
  margin: 0;
  gap: 0;
}
.site-grid > .grid-child { max-width: none; padding: 0; margin: 0; }
.container-component > main { margin: 0; }
.container-component .item-page,
.container-component .com-content-article { margin: 0; padding: 0; }
.container-component .com-content-article__body > *:last-child { margin-bottom: 0; }

/* The article title duplicates the heading every ksk.gr page carries in its content; keep it for
   screen readers and search, hide it visually (ksk.gr showed no separate page title). */
.com-content-article > .page-header {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Everything that is not a ksk band (system messages, other component pages) gets the centred column.
   The Contact page runs full width instead (SPT-8, see "contact" below). */
.container-component > main > :not(.com-content-article):not(.item-page):not(.com-contact),
.container-component > joomla-alert,
.container-component > #system-message-container {
  padding-left: var(--ksk-pad-x);
  padding-right: var(--ksk-pad-x);
}

/* ---------------------------------------------------------------- bands */
.ksk-sec {
  padding: 40px var(--ksk-pad-x);
  background: #fff;
}
.ksk-sec + .ksk-sec { padding-top: 10px; }
.ksk-sec.ksk-hero + .ksk-sec, .ksk-sec.ksk-band + .ksk-sec { padding-top: 40px; }
.ksk-sec.ksk-tint { background: var(--ksk-tint); padding-top: 20px; padding-bottom: 20px; }
.ksk-sec.ksk-band {
  background: var(--ksk-band);
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: max(25px, calc((100% - var(--ksk-max)) / 2 + 15px));
}
.ksk-sec.ksk-band, .ksk-sec.ksk-band h1, .ksk-sec.ksk-band h2, .ksk-sec.ksk-band h3 { color: #fff; }
.ksk-sec.ksk-band h2 { margin: 0; }
.ksk-sec > h5:first-child,
.ksk-sec > h5:first-child + h2 { text-align: center; }

/* home hero: the station photo, the title between two white rules, near the bottom */
.ksk-sec.ksk-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 366px;
  padding-top: 40px;
  padding-bottom: 46px;
  overflow: hidden;
  background: var(--ksk-hero-fallback);
  text-align: center;
}
.ksk-hero > .ksk-hero-bg {
  position: absolute;
  inset: 0;
  margin: 0;
}
.ksk-hero > .ksk-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 0;
}
.ksk-hero > .ksk-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 12, .4);   /* rgba(6,20,12,.6) at .66 opacity, as rendered */
}
.ksk-hero > :not(.ksk-hero-bg) { position: relative; z-index: 1; }
.ksk-hero > hr {
  width: 48px;
  margin: 12px auto;
  border: 0;
  border-top: 1px solid #fff;
  opacity: 1;
}
body.site .ksk-hero > h3 {
  color: #fff;
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 10px;
}
@media (min-width: 922px) {
  .ksk-sec.ksk-hero { min-height: 690px; padding-bottom: 125px; }
  .ksk-hero > hr { width: 86%; max-width: 1030px; }
  body.site .ksk-hero > h3 { font-size: 80px; line-height: 1.2; }
}

/* ---------------------------------------------------------------- cards */
.ksk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 20px;
}
@media (min-width: 768px) {
  .ksk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 922px) {
  .ksk-row.ksk-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* the one 4-box row ("What You Need to Know") wraps 2 x 2 on ksk.gr, so cols-4 stays at 2 */
* + .ksk-row { margin-top: 45px; }
.ksk-row + .ksk-row { margin-top: 60px; }
/* a band inside a band (the {loadposition}-ed "What You Need to Know" inside a project page)
   takes its host's background and padding */
.ksk-sec .ksk-sec { background: transparent; padding-left: 0; padding-right: 0; }
.ksk-col { min-width: 0; padding: 0; }
@media (min-width: 768px) {
  .ksk-col { padding: 0 10px; }
}
.ksk-sec figure { margin: 0 0 20px; }
.ksk-sec figure img { display: block; width: 100%; border-radius: 10px; }
.ksk-col figure img { aspect-ratio: 4 / 3; object-fit: cover; }
.ksk-col > h3, .ksk-col > h4 { margin-top: 0; }
/* image boxes (the Team cards): photo, bold name, small role — centred, as on ksk.gr */
.ksk-sec figure.ksk-box { text-align: center; }
.ksk-sec figure.ksk-box img { width: 82%; margin: 0 auto; aspect-ratio: 4 / 3; object-fit: cover; }
.ksk-box figcaption { margin-top: 20px; }
.ksk-box figcaption strong { display: block; font-size: 20px; font-weight: 700; color: #000; line-height: 1.3; }
.ksk-box figcaption span { display: block; font-size: 13px; line-height: 1.5; margin-top: 4px; }

/* ---------------------------------------------------------------- buttons */
.ksk-sec p:has(> a.ksk-btn) { text-align: center; }
body.site a.ksk-btn {
  display: inline-block;
  padding: 15px 25px;
  border-radius: 5px;
  background: var(--ksk-btn);
  color: #fff;
  font-family: var(--ksk-serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
body.site a.ksk-btn::before {   /* ksk.gr's bell */
  content: "\f0f3";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: .8em;
  margin-right: 10px;
}
body.site a.ksk-btn:hover, body.site a.ksk-btn:focus { background: #00287a; color: #fff; }

/* ---------------------------------------------------------------- contact */
/* ksk.gr's Contact page: "Contact Us", the intro, Address/Phone/Email, then "Send Us a Message" and the
   form, on the pale-green page. com_contact renders name / details / form / misc in a fixed order with
   generic headings, so the order is restored with flex `order` and the generic parts are hidden
   (the contact's name stays for screen readers). The form itself is core com_contact + powcaptcha.
   Like ksk.gr, the page runs the full width with a 20 px gutter, not the 1200 px column (SPT-8);
   the logo, menu and footer keep the column. */
.com-contact {
  display: flex;
  flex-direction: column;
  padding: 40px var(--ksk-gutter);
  background: var(--ksk-tint);
}
/* the notice after Send, at the form's width (beats the centred column above by specificity) */
.container-component:has(> main > .com-contact) > #system-message-container,
.container-component:has(> main > .com-contact) > joomla-alert {
  padding-left: var(--ksk-gutter);
  padding-right: var(--ksk-gutter);
}
.com-contact > .page-header {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.com-contact > h2,
.com-contact > .com-contact__container,
.com-contact .contact-form legend,
.com-contact .contact-form .field-spacer { display: none; }
.com-contact > .com-contact__miscinfo { order: 1; }
.com-contact > .com-contact__form { order: 2; }
.com-contact .contact-miscinfo dl { display: block; margin: 0; }
.com-contact .contact-miscinfo dt { display: none; }
.com-contact .contact-miscinfo dd { margin: 0; }
.com-contact .contact-misc .ksk-sec { padding: 0; background: transparent; }
.com-contact .contact-misc .ksk-row { display: block; }
.com-contact .contact-misc .ksk-col { padding: 0; }
body.site .com-contact .contact-misc .ksk-col:first-child > h3:first-child { font-size: 40px; line-height: 1.2; margin-bottom: .3em; }
body.site .com-contact .contact-misc h3:not(:first-child),
body.site .com-contact .contact-misc h6 { font-size: 15px; line-height: 1.4; margin: 0; }
body.site .com-contact .contact-misc h6 { margin-top: 10px; }
/* the Address / Phone / Email icons of ksk.gr (core Font Awesome, already loaded by Cassiopeia) */
.com-contact .contact-misc .ksk-col:first-child > h3:not(:first-child) { position: relative; padding-left: 34px; margin-top: 16px; }
.com-contact .contact-misc .ksk-col:first-child > h3:not(:first-child) + p { padding-left: 34px; }
.com-contact .contact-misc .ksk-col:first-child > h3:not(:first-child)::before {
  position: absolute; left: 0; top: 0;
  font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 24px; color: #6a6a6a;
}
.com-contact .contact-misc .ksk-col:first-child > h3:nth-of-type(2)::before { content: "\f3c5"; }
.com-contact .contact-misc .ksk-col:first-child > h3:nth-of-type(3)::before { content: "\f095"; }
.com-contact .contact-misc .ksk-col:first-child > h3:nth-of-type(4)::before { content: "\f0e0"; }
@media (min-width: 922px) {
  body.site .com-contact .contact-misc .ksk-col:first-child > h3:first-child { font-size: 72px; }
}
.com-contact .contact-form .control-group { margin-bottom: 10px; }
/* SPT-8: labels, boxes, captcha and Send on the "Contact Us" edge, the boxes across the page.
   No side offset from Cassiopeia's form rules, and no width cap on the boxes (docs/10 §7j). */
.com-contact .contact-form form,
.com-contact .contact-form fieldset,
.com-contact .contact-form .control-group,
.com-contact .contact-form .control-label,
.com-contact .contact-form .controls { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; float: none; }
.com-contact .contact-form .form-control { width: 100%; max-width: none; }
.com-contact .contact-form .control-label label { font-size: 15px; }
.com-contact .form-control { background: #fafafa; border: 1px solid #ddd; border-radius: 0; font-family: var(--ksk-serif); font-size: 16px; }
.com-contact .btn-primary { background: #fff; color: #000; border: 0; border-radius: 0; font-family: var(--ksk-serif); font-weight: 700; font-size: 15px; }
.com-contact .btn-primary:hover { background: var(--ksk-btn); color: #fff; }

/* ------------------------------------------------- one left edge (owner, 2026-11-20) */
/* ksk.gr lines up the header logo, the content, the bands and the footer on ONE invisible left
   edge (the 1200 px column). Cassiopeia's fluid layout pads every .grid-child by 42 px, which put
   our logo 42 px right of that edge and the footer at the window edge; these win over it. */
body.site .container-header > .grid-child { padding-left: 0; padding-right: 0; }
body.site .container-footer > .grid-child { padding-left: calc(var(--ksk-pad-x) + 5px); padding-right: var(--ksk-pad-x); }  /* +5: ksk.gr's footer widget inset */

/* ---------------------------------------------------------------- footer */
.container-footer {
  background: var(--ksk-footer);
  background-image: none;
  color: #fefefe;
  margin-top: 0;
  padding: 0;
}
.container-footer .grid-child {
  max-width: none;
  margin: 0;
  padding: 40px var(--ksk-pad-x) 30px;
  display: block;
}
.container-footer .moduletable, .container-footer .mod-custom { width: 100%; }
.ksk-footer { text-align: center; }
.ksk-footer::before {      /* the white logo — template chrome, not content (D81) */
  content: "";
  display: block;
  width: 200px;
  height: 100px;
  margin: 0 auto 30px;
  background: url("../ksk/logo-white.png") no-repeat 0 0 / contain;
}
.ksk-footer .ksk-footer-org {
  font-family: var(--ksk-serif);
  font-size: 13px;
  line-height: 1.5;
  color: #fefefe;
  margin: 0 0 50px;
}
.ksk-footer .ksk-footer-copy {
  font-family: var(--ksk-serif);
  font-size: 14px;
  color: #fff;
  margin: 0;
}
.ksk-footer { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.ksk-footer a { color: #fff; text-decoration: none; }
@media (min-width: 922px) {
  .ksk-footer { text-align: left; }
  .ksk-footer::before { margin: 0 0 40px; }
  .ksk-footer .ksk-footer-copy { text-align: center; }
}
