/*
 * Σε αφορά – gov.cy microsite
 * Project styles layered on top of Bootstrap 5.3.
 * Values are taken from Homepage.ai / OMADA1.ai (1920px artboards);
 * deviations made for accessibility are listed in README.md.
 */

/* ------------------------------------------------------------------ */
/* Fonts (self-hosted, SIL OFL 1.1 – see assets/fonts/*-LICENSE.txt)   */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-latin-wght-normal.woff2") format("woff2");
  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;
}

/* Open Sans is only used for the Greek "Η Κύπρος αλλάζει" tagline. */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/open-sans-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/open-sans-greek-wght-italic.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* ------------------------------------------------------------------ */
/* Design tokens                                                        */
/* ------------------------------------------------------------------ */

:root {
  --color-text: #272525;
  --color-nav-text: #484545;
  --color-navy: #0d3042;
  --color-header: #0e2f40;
  --color-surface: #ebf1f3;
  --color-panel: #eaf0f2;
  --color-separator: #babbbe;
  --color-accent: #ffad2d;
  --color-tagline-bar: #ffa900;
  --color-hero: #1e9bd7;
  --color-white: #fff;
  --color-focus: #fd0;
  --color-focus-ink: #0b0c0c;

  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-tagline: "Open Sans", var(--font-sans);

  --container-max: 1200px;
  --gutter: 16px;
  --radius-panel: 12px;
  --radius-pill: 999px;
  --radius-button: 4px;

  --hero-min-height: clamp(400px, 34vw, 654px);
  --section-gap: clamp(56px, 7.8vw, 150px);
  --panel-gap: 40px;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font-sans);
  --bs-body-color: var(--color-text);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.5;
  --bs-link-color-rgb: 13, 48, 66;
  --bs-link-hover-color-rgb: 13, 48, 66;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

/* Keep anchored content clear of the viewport edge. */
[id] { scroll-margin-top: 24px; }

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

.site-container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ */
/* Focus – gov.cy convention: yellow highlight with a dark edge         */
/* ------------------------------------------------------------------ */

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--color-focus-ink);
}

/* Text links: yellow background + dark underline bar (gov.cy UDS pattern). */
.intro a:focus-visible,
.site-nav__list a:focus-visible,
.site-footer__links a:focus-visible,
.site-header__service:focus-visible {
  outline: none;
  background-color: var(--color-focus);
  color: var(--color-focus-ink);
  box-shadow: 0 -2px var(--color-focus), 0 4px var(--color-focus-ink);
  text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Skip link                                                           */
/* ------------------------------------------------------------------ */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--color-focus);
  color: var(--color-focus-ink);
  font-weight: 700;
  text-decoration: underline;
  transform: translateY(-120%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  outline: none;
  box-shadow: 0 4px var(--color-focus-ink);
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header__bar {
  background: var(--color-header);
  color: var(--color-white);
}

/* One row at every width: logo + service name on the left, menu button
   (below 992px) on the right. Sizes step down slightly on narrow phones so
   nothing wraps at 320px. */
.site-header__inner {
  display: flex;
  align-items: center;
  column-gap: clamp(12px, 4vw, 32px);
  min-height: 74px;
  padding-block: 12px;
}

.site-header__logo {
  display: inline-flex;
  flex-shrink: 0;
}

.site-header__logo img {
  display: block;
  width: clamp(112px, 30vw, 155px);
  height: auto;
}

.site-header__logo:focus-visible { outline-offset: 2px; }

.site-header__service {
  color: var(--color-white);
  font-size: clamp(1.125rem, 0.9rem + 1.1vw, 1.5rem);
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.site-header__service:hover { text-decoration: underline; }

/* Icon-only button; its accessible name "Μενού" is visually hidden. */
.nav-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--color-white);
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--color-white);
  font: inherit;
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__icon { position: relative; }

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

/* Primary navigation */
.site-nav { background: var(--color-surface); }

.site-nav__list {
  margin: 0;
  padding: 8px 0;
  list-style: none;
}

.site-nav__list a {
  display: block;
  padding: 12px 0;
  color: var(--color-nav-text);
  text-decoration: none;
}

.site-nav__list a:hover { text-decoration: underline; }
.site-nav__list a[aria-current="page"] { font-weight: 800; }

@media (max-width: 991.98px) {
  .site-nav__list li + li { border-top: 1px solid var(--color-separator); }
}

@media (min-width: 992px) {
  .nav-toggle { display: none; }

  .site-nav__collapse.collapse { display: block; }

  .site-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 54px;
    padding: 0;
  }

  .site-nav__list li {
    display: flex;
    align-items: center;
  }

  /* 1px × 19px separators between (and around) items, as in the design. */
  .site-nav__list li::before,
  .site-nav__list li:last-child::after {
    content: "";
    width: 1px;
    height: 19px;
    background: var(--color-separator);
  }

  .site-nav__list a {
    padding: 14px 22px;
    line-height: 1.6;
  }
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: var(--hero-min-height);
  overflow: hidden;
  background: var(--color-hero);
  color: var(--color-white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: var(--hero-pad-top);
  padding-bottom: clamp(88px, 7.8vw, 150px);
}

.hero--home { --hero-pad-top: clamp(28px, 8vw, 155px); --tagline-size: clamp(1.5rem, 1rem + 1.1vw, 2.09rem); }
.hero--group { --hero-pad-top: clamp(28px, 2.7vw, 52px); --tagline-size: clamp(1.625rem, 1rem + 1.5vw, 2.525rem); }

.hero-tagline {
  position: relative;
  margin: 0 0 32px;
  padding-left: 0.72em;
  font-family: var(--font-tagline);
  font-size: var(--tagline-size);
  line-height: 1.2;
}

/* Slanted yellow rule beside the tagline (13° from vertical in the design). */
.hero-tagline::before {
  content: "";
  position: absolute;
  top: -0.27em;
  bottom: -0.27em;
  left: 0.3em;
  width: 4px;
  background: var(--color-tagline-bar);
  transform: skewX(-13.2deg);
}

.hero-tagline__lead,
.hero-tagline__strong { display: block; }

.hero-tagline__lead { font-style: italic; font-weight: 400; }
.hero-tagline__strong { font-weight: 700; }

.hero__title {
  margin: auto 0 0;
  font-size: clamp(2.25rem, 1.3rem + 2.9vw, 3.77rem);
  font-weight: 400;
  line-height: 1;
}

.hero__title-light,
.hero__title-strong { display: block; }

.hero__title-strong { font-weight: 900; }

/* Accessibility correction (see README): a navy scrim on the text side of the
   photo keeps the white hero text above 3:1 (large text) against every part
   of the image. Stronger on narrow screens, where the lighter centre of the
   photo sits behind the text. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 47, 64, var(--scrim, 0.5)) 0%, rgba(14, 47, 64, calc(var(--scrim, 0.5) * 0.7)) 40%, rgba(14, 47, 64, 0) 72%);
}

.hero--home { --scrim: 0.35; }
.hero--group { --scrim: 0.6; }

@media (max-width: 991.98px) {
  .hero::before {
    background: linear-gradient(90deg, rgba(14, 47, 64, var(--scrim)) 0%, rgba(14, 47, 64, calc(var(--scrim) * 0.75)) 100%);
  }
}

.hero-tagline,
.hero__title { text-shadow: 0 1px 3px rgba(14, 47, 64, 0.45); }

/* ------------------------------------------------------------------ */
/* Home: intro                                                         */
/* ------------------------------------------------------------------ */

.intro { padding-top: clamp(40px, 3.9vw, 75px); }

.intro__grid {
  display: grid;
  gap: 32px;
}

.intro__title {
  margin: 0 0 32px;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem);
  font-weight: 900;
  line-height: 1.16;
}

.intro__text p { margin: 0 0 1.25rem; }

.intro__media img {
  display: block;
  width: 100%;
  aspect-ratio: 582 / 370;
  object-fit: cover;
}

@media (min-width: 768px) {
  .intro__grid {
    grid-template-columns: minmax(0, 570fr) minmax(0, 582fr);
    align-items: start;
    gap: 48px;
  }

}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullet-list li {
  position: relative;
  padding-left: 18px;
}

.bullet-list li + li { margin-top: 4px; }

.bullet-list li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* ------------------------------------------------------------------ */
/* Section title with rule ("Ενημερωθείτε άμεσα…")                     */
/* ------------------------------------------------------------------ */

.groups { padding-top: var(--section-gap); }

.section-title {
  margin: 0 0 clamp(32px, 3.1vw, 60px);
  padding-bottom: 10px;
  border-bottom: 3px solid var(--color-text);
  font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 900;
  line-height: 1.3;
}

/* ------------------------------------------------------------------ */
/* Pills (group tabs + in-page topic navigation)                       */
/* ------------------------------------------------------------------ */

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin: 0 0 var(--panel-gap);
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 41px;
  padding: 8px 22px;
  border: 1px solid var(--color-navy);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-navy);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .pill { transition: background-color 0.15s ease, color 0.15s ease; }
}

.pill:hover {
  background: var(--color-surface);
  color: var(--color-navy);
  text-decoration: underline;
}

.pill[aria-selected="true"],
.pill[aria-current="true"] {
  background: var(--color-navy);
  color: var(--color-white);
}

.pill[aria-selected="true"]:hover,
.pill[aria-current="true"]:hover { text-decoration: none; }

/* ------------------------------------------------------------------ */
/* Panels (grey box: white card + media)                               */
/* ------------------------------------------------------------------ */

.panel {
  display: grid;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-panel);
  background: var(--color-panel);
}

.panel + .panel { margin-top: var(--panel-gap); }

.panel__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 20px 20px;
  border-radius: var(--radius-panel);
  background: var(--color-white);
}

.panel__card p { margin: 0 0 0.75rem; }

.panel__eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.25rem, 1rem + 0.7vw, 1.625rem);
  font-weight: 400;
  line-height: 1.3;
}

.panel__title {
  margin: 0 0 10px;
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.625rem);
  font-weight: 900;
  line-height: 1.25;
}

.panel__title--large {
  max-width: 11em;
  margin-bottom: 24px;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem);
  line-height: 1.1;
}

.panel__lead { font-weight: 700; }

.panel__card .btn-govcy { margin-top: auto; }

.panel__media img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-panel);
  object-fit: cover;
}

.panel__media { aspect-ratio: 555 / 434; }
.panel__media--infographic { aspect-ratio: 600 / 420; }

@media (min-width: 768px) {
  .panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px;
    padding: 47px 32px;
  }

  .panel__card { padding: 22px 24px 20px; }

  .panel__media { align-self: start; }
}

/* ------------------------------------------------------------------ */
/* Button ("Προβολή", "Μάθε περισσότερα")                              */
/* ------------------------------------------------------------------ */

.btn-govcy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 6px 12px;
  border-radius: var(--radius-button);
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.btn-govcy:hover {
  background: #071b25;
  color: var(--color-white);
  text-decoration: underline;
}

.btn-govcy__arrow { flex-shrink: 0; }

/* ------------------------------------------------------------------ */
/* Group page: topics                                                  */
/* ------------------------------------------------------------------ */

.topics { padding-top: clamp(40px, 6vw, 116px); }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(64px, 8.6vw, 164px);
  background: var(--color-header);
  color: var(--color-white);
}

/* Decorative coat of arms, 4 % white, straddling the right edge of the
   content column as on the FOOTER.ai artboard. */
.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: max(calc(50% - 843px), -140px);
  width: 400px;
  height: 400px;
  background: url("../images/coat-of-arms-watermark.svg") no-repeat center / contain;
  opacity: 0.04;
  pointer-events: none;
}

.site-footer__inner {
  padding-top: clamp(48px, 6.25vw, 112px);
  padding-bottom: 24px;
}

.site-footer__links {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 clamp(40px, 3.5vw, 64px);
  border-bottom: 1px solid var(--color-white);
  list-style: none;
}

.site-footer__links a {
  color: var(--color-white);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
}

.site-footer__logos {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-footer__logos img { display: block; }

.site-footer__logos a { display: block; }

.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

@media (max-width: 575.98px) {
  .site-footer__meta { align-items: flex-start; }
}

.site-footer__brand {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

/* ------------------------------------------------------------------ */
/* Tabs (progressive enhancement – see main.js)                        */
/* ------------------------------------------------------------------ */

[data-tabs-panel][hidden] { display: none; }

/* When enhanced, panels follow each other only one at a time. */
.is-enhanced [data-tabs-panel] + [data-tabs-panel] { margin-top: 0; }

/* ------------------------------------------------------------------ */
/* Print                                                               */
/* ------------------------------------------------------------------ */

@media print {
  .skip-link,
  .nav-toggle,
  .site-nav { display: none; }

  .hero { min-height: 0; background: none; color: var(--color-text); }
  .hero__bg, .hero::before { display: none; }
  .hero-tagline::before { display: none; }
  [data-tabs-panel][hidden] { display: grid; }
}
