﻿/*
Theme Name: 3o EPAL Lamias Modern
Description: Custom AI & Engineering WordPress Theme για το 3ο Εσπερινό ΕΠΑ.Λ. Λαμίας
Version: 1.3
Author: Δημήτριος Καβαλιέρος
*/

:root {
  --bg: #050a18;
  --surface: rgba(11, 21, 42, 0.84);
  --surface-hover: rgba(16, 31, 62, 0.94);
  --border: rgba(56, 189, 248, 0.24);
  --cyan: #38bdf8;
  --gold: #fbbf24;
  --teal: #2dd4bf;
  --text: #f1f5f9;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

/* Κινούμενο Φόντο */
#epal-bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 82% 15%, rgba(56, 189, 248, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 12% 70%, rgba(251, 191, 36, 0.12) 0%, transparent 45%),
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 42px 42px, 42px 42px;
}
#epal-bg-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none;
}

.site-shell { position: relative; z-index: 1; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Ενιαίο Sticky Header */
.epal-navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 12, 28, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.epal-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.epal-logo {
  display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; font-size: 1.05rem; flex-shrink: 0;
}
.epal-logo small { display: block; font-size: 0.72rem; color: var(--gold); font-weight: 600; }

/* Καθαρισμός list-style σε ΟΛΑ τα μενού του header */
.epal-navbar ul,
.epal-navbar li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.epal-menu {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
}
.epal-menu > li { position: relative; }
.epal-menu > li > a {
  color: #e2e8f0; font-size: 0.84rem; font-weight: 600; padding: 6px 4px; display: inline-block;
}
.epal-menu > li > a:hover { color: var(--gold); }

/* Δεύτερη Μπάρα: Θεματικό Μενού ΕΠΑ.Λ. */
.epal-topics-strip {
  background: rgba(11, 23, 48, 0.92);
  border-top: 1px solid rgba(56, 189, 248, 0.16);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
}
.epal-topics-menu {
  width: 100%; margin: 0 auto; padding: 5px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px;
}
.epal-topics-menu > li { position: relative; }
.epal-topics-menu > li > a {
  display: inline-block; padding: 6px 9px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em; color: #bae6fd;
  text-transform: uppercase;
}
.epal-topics-menu > li > a:hover {
  background: rgba(251, 191, 36, 0.14); color: var(--gold);
}

/* Multi-level Dropdowns (1ο, 2ο & 3ο επίπεδο) */
.epal-navbar .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 265px;
  max-width: 320px;
  background: rgba(7, 15, 34, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 6px;
  z-index: 300;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.75);
}
.epal-navbar li:hover > .sub-menu {
  display: block;
}
.epal-navbar .sub-menu li {
  position: relative;
}
.epal-navbar .sub-menu a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.81rem;
  line-height: 1.35;
  color: #e2e8f0;
  font-weight: 600;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}
.epal-navbar .sub-menu li:last-child > a {
  border-bottom: none;
}
.epal-navbar .sub-menu a:hover {
  background: rgba(56, 189, 248, 0.16);
  color: var(--gold);
}
/* 3ο επίπεδο υπομενού (π.χ. Τομέας -> Ειδικότητες) ανοίγει δίπλα στα δεξιά */
.epal-navbar .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 4px;
}
.epal-topics-menu > li:nth-last-child(-n+3) > .sub-menu {
  left: auto;
  right: 0;
}
.epal-topics-menu > li:nth-last-child(-n+3) .sub-menu .sub-menu {
  left: auto;
  right: 100%;
  margin-right: 4px;
}

/* Ticker Ανακοινώσεων */
.epal-ticker {
  background: rgba(14, 116, 144, 0.22);
  font-size: 0.83rem; padding: 6px 0;
}
.epal-ticker-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 12px; overflow: hidden; white-space: nowrap;
}
.epal-ticker-badge {
  background: var(--gold); color: #050a18; font-weight: 800; font-size: 0.71rem;
  padding: 2px 10px; border-radius: 999px; flex-shrink: 0;
}

/* Κάρτες & Grids */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.55);
  background: var(--surface-hover);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  margin: 24px 0 44px;
}
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-thumb {
  width: 100%; height: 195px; object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0c1933, #132a52);
}
.post-body { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.post-meta { font-size: 0.78rem; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.post-title { margin: 0 0 10px; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.post-title a { color: #fff; }
.post-title a:hover { color: var(--cyan); }
.post-excerpt { font-size: 0.9rem; color: var(--muted); margin: 0 0 16px; }
.post-read {
  align-self: flex-start; padding: 7px 15px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan); font-size: 0.82rem; font-weight: 700;
}
.post-read:hover { background: var(--cyan); color: #04101d; }

/* Footer */
.epal-footer {
  background: rgba(3, 7, 17, 0.95);
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

.epal-topics-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: center; }


/* Social Icons & Right Nav Group */
.epal-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.epal-socials {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 10px;
  border-left: 1px solid rgba(56, 189, 248, 0.25);
}
.epal-soc-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(15, 29, 58, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #e2e8f0;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.epal-soc-btn:hover { transform: translateY(-2px); }
.epal-soc-fb:hover { color: #38bdf8; border-color: #38bdf8; }
.epal-soc-pd:hover { color: #f472b6; border-color: #f472b6; }
.epal-soc-yt:hover { color: #f87171; border-color: #f87171; }

/* Απόλυτο κεντράρισμα του 2ου μενού ανεξαρτήτως κλάσης/ID του WordPress */
.epal-topics-strip {
  width: 100% !important;
  text-align: center !important;
}
.epal-topics-inner {
  max-width: 1280px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 5px 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.epal-topics-inner > ul,
.epal-topics-menu {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px 14px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Διάφανο ("αραχνοφανές") 2ο μενού χωρίς πλαίσιο πάνω στο κινούμενο background */
.epal-topics-strip {
  position: relative !important;
  z-index: 90 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding-top: 8px !important;
}
.epal-topics-strip ul,
.epal-topics-strip li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
.epal-topics-menu > li {
  position: relative;
}
.epal-topics-menu > li > a {
  color: rgba(186, 230, 253, 0.62) !important;
  background: transparent !important;
  text-shadow: 0 1px 6px rgba(5, 10, 24, 0.9);
  transition: color 0.25s ease, transform 0.2s ease !important;
}
.epal-topics-menu > li > a:hover,
.epal-topics-menu > li:hover > a {
  color: #fbbf24 !important;
  background: rgba(56, 189, 248, 0.08) !important;
}
.epal-topics-strip .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 265px;
  max-width: 320px;
  background: rgba(7, 15, 34, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 6px;
  z-index: 300;
  text-align: left;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.75);
}
.epal-topics-strip li:hover > .sub-menu { display: block; }
.epal-topics-strip .sub-menu li { position: relative; }
.epal-topics-strip .sub-menu a {
  display: block; padding: 8px 11px; border-radius: 8px;
  font-size: 0.81rem; line-height: 1.35; color: #e2e8f0; font-weight: 600;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}
.epal-topics-strip .sub-menu li:last-child > a { border-bottom: none; }
.epal-topics-strip .sub-menu a:hover { background: rgba(56, 189, 248, 0.16); color: #fbbf24; }
.epal-topics-strip .sub-menu .sub-menu { top: 0; left: 100%; margin-left: 4px; }

/* Πανοραμικό Banner Κεφαλίδας ανάμεσα στα δύο μενού */
.epal-banner-wrap {
  max-width: 1280px;
  margin: 12px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}
.epal-banner-link {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.epal-banner-img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  background: #050d1e;
  object-position: center;
}
.epal-ticker {
  max-width: 1240px;
  margin: 10px auto 0;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}


/* Κινούμενο Ticker Ανακοινώσεων (Από αριστερά προς τα δεξιά) */
@keyframes epal-marquee-ltr {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.epal-ticker-inner {
  position: relative;
  z-index: 3;
}
.epal-ticker-badge {
  position: relative;
  z-index: 4;
}
.epal-ticker-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
}
.epal-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding-left: 12px;
  animation: epal-marquee-ltr 65s linear infinite;
}
.epal-ticker:hover .epal-ticker-track {
  animation-play-state: paused;
}
.epal-ticker-track a {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.84rem;
}
.epal-ticker-track a:hover {
  color: #fbbf24;
}

