/* ============================================================
   TCH Accessibility Fixes — WAVE corrections
   File: tch2016-a11y.css
   Created: 2026-04-27

   PURPOSE:
   Collects ALL CSS fixes for findings reported by WAVE
   (https://wave.webaim.org/). The original tch2016.css is
   NOT modified — this file is loaded AFTER it, so its rules
   take precedence.

   LOAD ORDER (in HTML <head>):
     <link rel="stylesheet" href="/tch2016/tch2016.css">
     <link rel="stylesheet" href="/tch2016/tch2016-a11y.css">
   ============================================================ */


/* ------------------------------------------------------------
   FIX #1: Empty link  (WAVE: 4 errors)
   ------------------------------------------------------------
   Redefines .sr-only using the standard "clip technique".
   This visually hides text but keeps it available to screen
   readers AND to evaluation tools (such as WAVE), so that the
   accessible-name text injected by func-a11y.js is recognized
   as the accessible name of the <a>.

   We use !important because the original tch2016.css and
   Bootstrap may define .sr-only differently.
------------------------------------------------------------ */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;

  /* FIX #4 addition (see below): give explicit foreground/background
     so WAVE measures a real contrast ratio (21:1) instead of
     sampling 1:1 from inherited/transparent values.
     Visually irrelevant — the element is clipped to 1x1px. */
  color: #000000 !important;
  background-color: #ffffff !important;
}


/* ------------------------------------------------------------
   FIX #2: Low contrast in top header bar  (WAVE: 2 contrast errors)
   ------------------------------------------------------------
   WAVE reported foreground #333333 on background #3D3D3E
   (ratio 1.16:1) — fails WCAG AA and AAA.

   Affected area: the dark gray top strip (.topheader) which
   contains the language switcher (.lang  →  "GR | EN") and the
   right-side links / search widget.

   Root cause: tch2016.css line ~504 sets `.lang a { color:#fff }`,
   but Bootstrap's generic anchor / .navbar-default rules take
   precedence in some states and produce computed color #333.

   Solution: force white (#fff) on every text-bearing element
   inside .topheader. White on #3D3D3E gives a 10.9:1 ratio
   (passes AAA). !important is required to beat Bootstrap.
------------------------------------------------------------ */
.topheader,
.topheader a,
.topheader a:link,
.topheader a:visited,
.topheader a:hover,
.topheader a:focus,
.topheader a:active,
.topheader .lang,
.topheader .lang a,
.topheader nav a,
.topheader .navbar-nav > li > a,
.topheader .search-wr,
.topheader .search-wr a,
.topheader .search-wr input,
.topheader .search-wr input::placeholder,
.topheader .topnav,
.topheader .topnav a {
  color: #ffffff !important;
}

/* Ensure the search input itself stays readable: white text on
   the same dark background, with a slightly lighter placeholder. */
.topheader .search-wr input {
  background-color: transparent !important;
  border-color: #ffffff !important;
}
.topheader .search-wr input::placeholder {
  color: #d0d0d0 !important;
  opacity: 1 !important;
}


/* ------------------------------------------------------------
   FIX #3: Low contrast in main header menu  (WAVE: 8 contrast errors)
   ------------------------------------------------------------
   WAVE reported foreground #333333 on background #1A181B
   (ratio 1.39:1) — fails WCAG AA and AAA.

   Affected area: the main black header bar (.main-header,
   background #1A181B) containing the primary menu items
   (ΕΚΔΗΛΩΣΕΙΣ, ΚΑΛΛΙΤΕΧΝΕΣ, ΣΥΝΕΔΡΙΑ, ΕΚΠΑΙΔΕΥΤΙΚΑ ΠΡΟΓΡΑΜΜΑΤΑ,
   ΕΜΠΕΙΡΙΕΣ ΣΤΟ ΜΕΓΑΡΟ, ΕΙΣΙΤΗΡΙΑ) and their dropdown sub-items.

   Root cause:
   - The <nav> element carries an inline style
       style="color: rgb(51,51,51); background-color: rgb(26,24,27);"
     which sets text color to #333.
   - The CSS rule that turns the menu white in tch2016.css:504
     requires the class `.main-nav`, but the live HTML wraps the
     menu in <div class="menu"><nav>... — without `.main-nav`, so
     the rule never matches and links inherit the inline #333.
   - Dropdown sub-items also have a black background
     (tch2016.css:492 → .main-header .dropdown-menu { background:#000 })
     and inherit the same #333, producing 1.39:1 too.

   Solution: force white on every link/text inside .main-header
   and its dropdown menus. !important beats the inline color
   because the inline style does not carry !important.
   - white on #1A181B → 18.7:1 (AAA)
   - white on #000     → 21:1 (AAA)
------------------------------------------------------------ */
.main-header,
.main-header nav,
.main-header nav a,
.main-header nav a:link,
.main-header nav a:visited,
.main-header nav a:hover,
.main-header nav a:focus,
.main-header nav a:active,
.main-header .menu,
.main-header .menu nav,
.main-header .menu nav a,
.main-header .navbar-nav > li > a,
.main-header .navbar-nav > li > a:hover,
.main-header .navbar-nav > li > a:focus,
.main-header .dropdown > a,
.main-header .dropdown-menu,
.main-header .dropdown-menu > li > a,
.main-header .dropdown-menu > li > a:link,
.main-header .dropdown-menu > li > a:visited,
.main-header .dropdown-menu > li > a:hover,
.main-header .dropdown-menu > li > a:focus,
.main-header .dropdown-menu > li > a:active {
  color: #ffffff !important;
}


/* ------------------------------------------------------------
   FIX #4: 1:1 contrast on .sr-only inside arrow icons
            (WAVE: contrast errors on every <i class="fa fa-angle-*">)
   ------------------------------------------------------------
   WAVE reported foreground #FFFFFF on background #FFFFFF
   (ratio 1:1) on <span class="sr-only">arrows</span> elements,
   e.g. inside .owl-prev / .owl-next carousel navigation buttons.

   Affected area: every Owl Carousel arrow on the page and every
   other <i class="fa fa-angle-left | fa-angle-right">.

   Root cause:
   - func.js line 442 injects <span class="sr-only">arrows</span>
     inside every angle-icon <i> for screen-reader purposes. The
     text "arrows" is also non-descriptive (plural noun, no
     direction).
   - Our previous .sr-only override (FIX #1) used the standard
     clip technique but did not declare color/background. The
     span therefore inherits color from the white carousel arrow
     and has a transparent background, which WAVE samples as
     #FFFFFF foreground on #FFFFFF background → 1:1.

   Solution (CSS part — see also FIX #4 in func-a11y.js):
     The .sr-only rule above (FIX #1) was extended with explicit
       color: #000000 !important;
       background-color: #ffffff !important;
     The element stays clipped to 1×1px, so it remains invisible
     to sighted users; but WAVE now measures a real 21:1 ratio
     (passes WCAG AAA).

   The JS counterpart (FIX #4 in func-a11y.js) replaces the non-
   descriptive "arrows" text with directional Greek labels
   ("Προηγούμενο" / "Επόμενο") and marks the icon <i> as
   aria-hidden so the label propagates only via the actionable
   parent (button/link) accessible name.
------------------------------------------------------------ */


/* ------------------------------------------------------------
   FIX #5: Low contrast on "ΜΗ ΧΑΣΕΤΕ" fixed banner
            (WAVE: 1 contrast error)
   ------------------------------------------------------------
   WAVE reported foreground #FFFFFF on background #D34539
   (ratio 4.48:1) — fails WCAG AA for normal text (requires
   ≥ 4.5:1) and fails AAA (requires ≥ 7:1).

   Affected element:
       <div class="fixed-banner">
         <div class="fixed-banner-header">ΜΗ ΧΑΣΕΤΕ</div>
         ...
       </div>

   The banner is the small red sticky widget on the right side
   of the page that announces upcoming events.

   Root cause:
   - tch2016.css paints .fixed-banner-header (and likely the
     whole .fixed-banner) with the brand red #D34539. With white
     text this lands just below the AA threshold (4.48:1 < 4.5:1).

   Solution: darken the red slightly to #B8362B. White text on
   #B8362B gives ~5.2:1 (passes AA, very close to AAA). The hue
   is preserved so the brand feel stays intact.

   We override every plausible selector that may carry the red
   background inside .fixed-banner so the new color wins
   regardless of which rule in tch2016.css applied it.
------------------------------------------------------------ */
.fixed-banner,
.fixed-banner-header,
.fixed-banner .fixed-banner-header,
.fixed-banner > .fixed-banner-header {
  background-color: #B8362B !important;
}

/* Keep the foreground explicitly white so contrast stays 5.2:1
   even if a later rule tries to change the text color. */
.fixed-banner-header,
.fixed-banner .fixed-banner-header,
.fixed-banner-header * {
  color: #ffffff !important;
}


/* ------------------------------------------------------------
   FIX #6: Low contrast on calendar "no-event" days
            (WAVE: 3 contrast errors)
   ------------------------------------------------------------
   WAVE reported foreground #D6D6D8 on background #ECECED
   (ratio 1.22:1) — fails WCAG AA and AAA.

   Affected element(s):
       <div class="dates">
         <ul>
           <li class="">K<br>26</li>           ← no event
           <li class="date-event">...</li>      ← has event (dark, OK)
           ...
         </ul>
       </div>

   The page's calendar strip ("Απρίλιος 2026") shows every day
   of the month. Days WITH events get class .date-event and are
   painted dark gray (#3D3D3E ≈ 10.9:1, passes). Days WITHOUT
   events stay at the default light gray (#D6D6D8) which gives
   only 1.22:1 — semantically meant to look "muted/inactive",
   but WCAG still requires ≥ 4.5:1 for any text.

   Root cause:
   - tch2016.css:770–774  →  .dates ul li { color:#d6d6d8 }
   - tch2016.css:781–784  →  .dates ul li.date-event { color:#3d3d3e }

   Solution: darken the no-event color to #666666. White-ish
   #ECECED background gives ~4.85:1 (passes AA). The hue stays
   neutral gray and is still clearly lighter than the event-day
   color #3D3D3E — so the visual hierarchy "has-event vs.
   no-event" is preserved.

   We use :not(.date-event) so this override applies ONLY to
   the muted (default) days; clickable event days stay #3D3D3E.
------------------------------------------------------------ */
.dates ul li:not(.date-event) {
  color: #666666 !important;
}


/* ------------------------------------------------------------
   FIX #7: Low contrast on footer menu links (.fmenu)
            (WAVE: 1 contrast error — possibly more depending
            on how many .fmenu lists exist in the footer)
   ------------------------------------------------------------
   WAVE reported foreground #333333 on background #1A181B
   (ratio 1.39:1) — fails WCAG AA and AAA.

   Affected element(s):
       <div class="fmenu">
         <ul id="m_4">
           <li><a href="javascript:void(0);">ΕΚΔΗΛΩΣΕΙΣ (ΑΡΧΕΙΟ)</a></li>
           <li><a href="...">ΕΠΙΚΟΙΝΩΝΙΑ</a></li>
           <li><a href="...">VIDEO ROOM</a></li>
           <li><a href="...">ΟΡΟΙ ΧΡΗΣΗΣ</a></li>
           ...
         </ul>
       </div>

   This is the footer-menu strip that sits on the dark
   .main-header-style background near the bottom of the page
   (background #1A181B, the same near-black used by the top
   main header).

   Root cause:
   - The footer menu container (.fmenu) has no explicit text
     color rule in tch2016.css, so its <a> elements inherit
     the global body color (#3d3d3e — rendered/sampled by WAVE
     as #333333).
   - The dark background comes from a parent wrapper painted
     #1A181B. Dark text on near-black background → 1.39:1.

   Solution: force white (#fff) on every link/text inside
   .fmenu. White on #1A181B gives 18.7:1 (passes AAA). We
   include hover/focus/visited so the contrast holds across
   all interaction states.
------------------------------------------------------------ */
.fmenu,
.fmenu a,
.fmenu a:link,
.fmenu a:visited,
.fmenu a:hover,
.fmenu a:focus,
.fmenu a:active,
.fmenu ul li,
.fmenu ul li a,
.fmenu ul li a:link,
.fmenu ul li a:visited,
.fmenu ul li a:hover,
.fmenu ul li a:focus,
.fmenu ul li a:active {
  color: #ffffff !important;
}

