/* ═══════════════════════════════════════════════════════════
   EKPA Network shared footer
   Self-contained — does not inherit from page CSS.
   Mounted by ekpa-footer.js into <footer id="ekpa-footer"></footer>.
   ═══════════════════════════════════════════════════════════ */

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

#ekpa-footer {
  display: block;
  background: #080808;
  color: #f9f9f9;
  font-family: 'Inter', 'Manrope', system-ui, sans-serif;
  border-top: 1px solid rgba(201, 168, 76, 0.12);
}

#ekpa-footer .ekpa-footer-grid {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 56px;
  padding: 72px 48px 48px;
}

#ekpa-footer .ekpa-footer-brand h2 {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 30px;
  color: #c9a84c;
  margin: 0 0 6px;
  line-height: 1.1;
}
#ekpa-footer .ekpa-footer-brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8a7d6b;
  margin-bottom: 24px;
}
#ekpa-footer .ekpa-footer-brand p {
  color: rgba(249, 249, 249, 0.55);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 300;
  max-width: 360px;
}

#ekpa-footer .ekpa-footer-col h5 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9a84c;
  margin: 0 0 18px;
}
#ekpa-footer .ekpa-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#ekpa-footer .ekpa-footer-col a {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 15px;
  color: rgba(249, 249, 249, 0.7);
  text-decoration: none;
  transition: color 0.25s;
}
#ekpa-footer .ekpa-footer-col a:hover {
  color: #c9a84c;
}

/* ── Brand column extras: UoA logo above brand + EADPPA logo block below tagline ── */
#ekpa-footer .ekpa-footer-marks {
  display: flex; align-items: center; gap: 22px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
#ekpa-footer .ekpa-footer-uoa-mark {
  display: inline-block;
  opacity: 0.85;
  transition: opacity 0.25s;
}
#ekpa-footer .ekpa-footer-uoa-mark:hover { opacity: 1; }
#ekpa-footer .ekpa-footer-uoa-mark img {
  height: 50px; width: auto;
  filter: brightness(0) invert(1);
}
#ekpa-footer .ekpa-footer-network-mark {
  display: inline-flex; align-items: center; gap: 12px;
  opacity: 0.92;
}
#ekpa-footer .ekpa-footer-network-icon {
  height: 50px; width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
#ekpa-footer .ekpa-footer-network-text {
  display: flex; flex-direction: column;
  line-height: 1.05;
  border-left: 1px solid rgba(201, 168, 76, 0.3);
  padding-left: 12px;
}
#ekpa-footer .ekpa-footer-network-text .bl {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 400; letter-spacing: 0.04em;
  color: #f9f9f9;
  white-space: nowrap;
}
#ekpa-footer .ekpa-footer-network-text .bl:nth-child(3) {
  letter-spacing: 0.18em; font-weight: 500;
}
#ekpa-footer .ekpa-footer-managed {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed rgba(249, 249, 249, 0.08);
  display: flex; flex-direction: column; gap: 10px;
}
#ekpa-footer .ekpa-footer-managed-label {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #c9a84c; font-weight: 500;
}
#ekpa-footer .ekpa-footer-managed a {
  display: inline-block;
  opacity: 0.85;
  transition: opacity 0.25s;
}
#ekpa-footer .ekpa-footer-managed a:hover { opacity: 1; }
#ekpa-footer .ekpa-footer-logo-eadppa {
  height: 44px; width: auto;
}

/* ── Contact column ── */
#ekpa-footer .ekpa-footer-col-contact ul li {
  display: flex; flex-direction: column; gap: 2px;
}
#ekpa-footer .ekpa-footer-col-contact .lbl {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 9px; letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(249, 249, 249, 0.45);
}
#ekpa-footer .ekpa-footer-col-contact a,
#ekpa-footer .ekpa-footer-col-contact li > span:not(.lbl) {
  font-family: 'Newsreader', serif;
  font-style: italic; font-size: 14px;
  color: rgba(249, 249, 249, 0.75);
  text-decoration: none;
}
#ekpa-footer .ekpa-footer-col-contact a:hover { color: #c9a84c; }

/* ── Social + lang switcher row ── */
#ekpa-footer .ekpa-footer-social-row {
  max-width: 1700px;
  margin: 0 auto;
  padding: 18px 48px;
  border-top: 1px solid rgba(249, 249, 249, 0.06);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
#ekpa-footer .ekpa-footer-socials {
  display: flex; gap: 14px; align-items: center;
}
#ekpa-footer .ekpa-footer-socials a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 50%;
  color: rgba(249, 249, 249, 0.55);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
#ekpa-footer .ekpa-footer-socials a:hover {
  color: #c9a84c;
  border-color: rgba(201, 168, 76, 0.6);
  background: rgba(201, 168, 76, 0.08);
}
#ekpa-footer .ekpa-footer-socials svg { width: 16px; height: 16px; }
#ekpa-footer .ekpa-footer-langs {
  display: flex; gap: 2px; align-items: center;
}
#ekpa-footer .ekpa-footer-langs button {
  background: transparent; border: 0;
  padding: 6px 9px;
  font-family: 'Inter', sans-serif;
  font-size: 10px; letter-spacing: 0.18em; font-weight: 500;
  color: rgba(249, 249, 249, 0.45);
  cursor: pointer;
  transition: color 0.2s;
}
#ekpa-footer .ekpa-footer-langs button:hover { color: rgba(249, 249, 249, 0.85); }
#ekpa-footer .ekpa-footer-langs button.on { color: #c9a84c; }

/* ── Partners strip (rendered only if PARTNERS array is non-empty) ── */
#ekpa-footer .ekpa-footer-partners {
  max-width: 1700px;
  margin: 0 auto;
  padding: 22px 48px;
  border-top: 1px solid rgba(249, 249, 249, 0.06);
  display: flex; align-items: center; gap: 28px;
  flex-wrap: wrap;
}
#ekpa-footer .ekpa-footer-partners-label {
  font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; color: #c9a84c; font-weight: 500;
}
#ekpa-footer .ekpa-footer-partners-logos {
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
}
#ekpa-footer .ekpa-footer-partners-logos img {
  height: 36px; width: auto; opacity: 0.75;
  transition: opacity 0.25s;
}
#ekpa-footer .ekpa-footer-partners-logos a:hover img { opacity: 1; }

@media (max-width: 900px) {
  #ekpa-footer .ekpa-footer-grid { grid-template-columns: 1fr; gap: 36px; padding: 56px 24px 36px; }
}
@media (max-width: 760px) {
  #ekpa-footer .ekpa-footer-uoa-mark img { height: 40px; }
  #ekpa-footer .ekpa-footer-logo-eadppa { height: 36px; }
  #ekpa-footer .ekpa-footer-social-row { padding: 16px 24px; flex-direction: column; align-items: flex-start; }
  #ekpa-footer .ekpa-footer-partners { padding: 16px 24px; gap: 16px; flex-direction: column; align-items: flex-start; }
  #ekpa-footer .ekpa-footer-partners-logos img { height: 30px; }
}

#ekpa-footer .ekpa-footer-bottom {
  max-width: 1700px;
  margin: 0 auto;
  padding: 24px 48px;
  border-top: 1px solid rgba(249, 249, 249, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(249, 249, 249, 0.4);
}

@media (max-width: 900px) {
  #ekpa-footer .ekpa-footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 24px 32px;
  }
  #ekpa-footer .ekpa-footer-bottom {
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ekpa-footer * { transition: none !important; }
}

/* ── Shared accessibility toggle + panel (mounted by ekpa-footer.js) ── */
#ekpa-a11y-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 56px;
  background: #c9a84c;
  color: #080808;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -4px 0 14px rgba(0, 0, 0, 0.4);
  border-radius: 8px 0 0 8px;
  z-index: 9100;
  padding: 0;
  transition: background 0.2s ease, width 0.2s ease, transform 0.2s ease;
}
#ekpa-a11y-toggle:hover { background: #dec392; width: 54px; }
#ekpa-a11y-toggle:focus-visible { outline: 2px solid #f9f9f9; outline-offset: -3px; }
#ekpa-a11y-toggle svg { display: block; }

#ekpa-a11y-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 360px;
  max-width: 92vw;
  background: #0c0c0c;
  color: #f1f1f1;
  font-family: 'Inter', 'Manrope', system-ui, sans-serif;
  border-left: 1px solid rgba(201, 168, 76, 0.35);
  box-shadow: -10px 0 32px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 9099;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#ekpa-a11y-panel.open { transform: translateX(0); }
#ekpa-a11y-panel header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid rgba(201, 168, 76, 0.18);
}
#ekpa-a11y-panel h3 {
  font-family: 'Newsreader', serif; font-style: italic; font-weight: 400;
  font-size: 22px; color: #c9a84c; margin: 0;
}
#ekpa-a11y-panel .a11y-close {
  background: none; border: none; color: #c9a84c; font-size: 28px;
  line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 4px;
}
#ekpa-a11y-panel .a11y-close:hover { background: rgba(201, 168, 76, 0.15); }
#ekpa-a11y-panel .a11y-body {
  flex: 1; overflow-y: auto;
  padding: 16px 24px 28px; display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(201,168,76,.35) transparent;
}
#ekpa-a11y-panel .a11y-body::-webkit-scrollbar { width: 6px; }
#ekpa-a11y-panel .a11y-body::-webkit-scrollbar-thumb { background: rgba(201,168,76,.35); border-radius: 3px; }
#ekpa-a11y-panel .a11y-section-title {
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: #c9a84c;
  margin: 14px 0 4px; padding-bottom: 6px; border-bottom: 1px solid rgba(201,168,76,.18);
}
#ekpa-a11y-panel .a11y-section-title:first-child { margin-top: 0; }
#ekpa-a11y-panel .a11y-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 13.5px; color: #f1f1f1; min-height: 28px;
}
#ekpa-a11y-panel .a11y-row.vertical {
  flex-direction: column; align-items: stretch; gap: 8px;
}
#ekpa-a11y-panel .a11y-row.toggle { cursor: pointer; user-select: none; }
#ekpa-a11y-panel .a11y-label { font-weight: 500; }
#ekpa-a11y-panel .a11y-segmented {
  display: flex; gap: 0; border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 4px; overflow: hidden;
}
#ekpa-a11y-panel .a11y-segmented button {
  flex: 1; background: transparent; color: #c9a84c; border: none;
  padding: 8px 6px; font-size: 12px; cursor: pointer;
  font-family: inherit; transition: background 0.2s, color 0.2s;
  white-space: nowrap; min-width: 0;
}
#ekpa-a11y-panel .a11y-segmented button:not(:last-child) { border-right: 1px solid rgba(201, 168, 76, 0.35); }
#ekpa-a11y-panel .a11y-segmented button:hover { background: rgba(201, 168, 76, 0.12); }
#ekpa-a11y-panel .a11y-segmented button.on { background: #c9a84c; color: #080808; font-weight: 600; }
#ekpa-a11y-panel input[type="checkbox"] { display: none; }
#ekpa-a11y-panel .a11y-switch {
  display: inline-block; width: 38px; height: 22px; flex: 0 0 auto;
  background: rgba(201, 168, 76, 0.25); border-radius: 11px; position: relative;
  transition: background 0.2s;
}
#ekpa-a11y-panel .a11y-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; background: #f1f1f1; border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
#ekpa-a11y-panel input[type="checkbox"]:checked + .a11y-switch { background: #c9a84c; }
#ekpa-a11y-panel input[type="checkbox"]:checked + .a11y-switch::after { transform: translateX(16px); background: #080808; }
#ekpa-a11y-panel .a11y-reset {
  margin-top: 18px; background: transparent; border: 1px solid rgba(201, 168, 76, 0.45);
  color: #c9a84c; padding: 10px; border-radius: 4px; cursor: pointer;
  font-family: inherit; font-size: 13px; letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
#ekpa-a11y-panel .a11y-reset:hover { background: #c9a84c; color: #080808; }

/* ═══ Apply states (set on <html> by ekpa-footer.js applyA11y()) ═══ */

/* Text */
html.a11y-font-large            { font-size: 110%; }
html.a11y-font-xlarge           { font-size: 122%; }
html.a11y-letter-wide           { letter-spacing: 0.05em !important; }
html.a11y-letter-wider          { letter-spacing: 0.12em !important; }
html.a11y-line-large *          { line-height: 1.7 !important; }
html.a11y-line-xlarge *         { line-height: 2.1 !important; }
html.a11y-word-spacing          { word-spacing: 0.16em !important; }
html.a11y-bold-all *,
html.a11y-bold-all *::before,
html.a11y-bold-all *::after     { font-weight: 600 !important; }
html.a11y-dyslexia-font,
html.a11y-dyslexia-font *       { font-family: "OpenDyslexic", "Atkinson Hyperlegible", "Comic Sans MS", "Verdana", sans-serif !important; letter-spacing: 0.04em !important; word-spacing: 0.12em !important; }

/* Color */
html.a11y-contrast              { filter: contrast(1.3) saturate(1.15); }
html.a11y-grayscale             { filter: grayscale(1); }
html.a11y-invert                { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert img,
html.a11y-invert video,
html.a11y-invert picture        { filter: invert(1) hue-rotate(180deg); }
html.a11y-cb-protanopia         { filter: url('#a11y-cb-protanopia'); }
html.a11y-cb-deuteranopia       { filter: url('#a11y-cb-deuteranopia'); }
html.a11y-cb-tritanopia         { filter: url('#a11y-cb-tritanopia'); }
html.a11y-contrast.a11y-grayscale { filter: contrast(1.3) grayscale(1); }
html.a11y-contrast.a11y-invert    { filter: contrast(1.3) invert(1) hue-rotate(180deg); }

/* Links & elements */
html.a11y-underline-links a       { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-highlight-links a       { outline: 2px solid #c9a84c !important; outline-offset: 2px; padding: 1px 3px !important; border-radius: 2px; }
html.a11y-highlight-headings h1,
html.a11y-highlight-headings h2,
html.a11y-highlight-headings h3,
html.a11y-highlight-headings h4,
html.a11y-highlight-headings h5,
html.a11y-highlight-headings h6   { outline: 2px dashed #c9a84c !important; outline-offset: 4px; padding: 2px 6px !important; }
html.a11y-big-cursor,
html.a11y-big-cursor *            { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'><path d='M3 2 L3 19 L8 14 L11 21 L14 20 L11 13 L18 13 Z' fill='%23c9a84c' stroke='%23080808' stroke-width='1.5'/></svg>") 4 4, auto !important; }
html.a11y-big-cursor a,
html.a11y-big-cursor button,
html.a11y-big-cursor [role="button"] { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'><path d='M9 3 L9 14 L7 12 L7 16 L13 22 L17 18 L13 14 L17 14 L9 6 Z' fill='%23c9a84c' stroke='%23080808' stroke-width='1.5'/></svg>") 8 4, pointer !important; }
html.a11y-big-targets a,
html.a11y-big-targets button,
html.a11y-big-targets input[type="checkbox"],
html.a11y-big-targets input[type="radio"],
html.a11y-big-targets [role="button"] { min-height: 44px !important; min-width: 44px !important; padding: 12px !important; }
html.a11y-visible-focus :focus,
html.a11y-visible-focus :focus-visible { outline: 3px solid #c9a84c !important; outline-offset: 3px !important; box-shadow: 0 0 0 6px rgba(201,168,76,.25) !important; }
html.a11y-tts-active *:hover { outline: 1px dashed rgba(201,168,76,.6); outline-offset: 2px; cursor: pointer; }

/* Motion & media */
html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  transition-delay: 0ms !important;
  scroll-behavior: auto !important;
}
html.a11y-pause-animations *,
html.a11y-pause-animations *::before,
html.a11y-pause-animations *::after { animation-play-state: paused !important; }
html.a11y-hide-images img,
html.a11y-hide-images video,
html.a11y-hide-images picture,
html.a11y-hide-images svg:not(.a11y-keep) { visibility: hidden !important; }
html.a11y-hide-images [style*="background-image"] { background-image: none !important; }

/* Reading aids — guide line + mask */
#a11y-reading-guide {
  position: fixed; left: 0; right: 0; height: 2px;
  background: #c9a84c; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 0 12px rgba(201,168,76,.6);
  pointer-events: none; z-index: 9098; transition: top 0.05s linear;
}
#a11y-reading-mask {
  position: fixed; inset: 0; pointer-events: none; z-index: 9097;
  --ay: 50vh;
  background:
    linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.78) calc(var(--ay) - 80px), transparent calc(var(--ay) - 60px), transparent calc(var(--ay) + 60px), rgba(0,0,0,.78) calc(var(--ay) + 80px), rgba(0,0,0,.78) 100%);
}

/* ── Shared scroll-to-top button (mounted by ekpa-footer.js on every page) ── */
#ekpa-scroll-top {
  position: fixed;
  right: 28px;
  bottom: 5vh;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #c9a84c;
  color: #080808;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(201, 168, 76, 0.4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.25s ease;
  z-index: 9000;
  font-family: inherit;
  padding: 0;
}
#ekpa-scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#ekpa-scroll-top:hover { background: #dec392; }
#ekpa-scroll-top:focus-visible { outline: 2px solid #f9f9f9; outline-offset: 3px; }
#ekpa-scroll-top svg { display: block; }
@media (max-width: 600px) {
  #ekpa-scroll-top { right: 16px; bottom: 5vh; width: 44px; height: 44px; }
}

@media (max-width: 900px) {
  #ekpa-a11y-toggle,
  #ekpa-a11y-panel,
  #ekpa-a11y-backdrop,
  #ekpa-scroll-top,
  #ekpa-footer { display: none !important; }
}
