/* Όμιλος Μπριτζ Ηρακλείου – static site styles (v2: ίδιο στυλ με τα learn / program – μπάρα αριστερά, κάρτες, μπλε παλέτα, σκούρο θέμα) */
:root {
  color-scheme: light;
  --bg: #eef4fa;
  --card: #fff;
  --ink: #14283b;
  --head: #22262a;
  --muted: #5e7587;
  --line: #e3eaf0;
  --border: #c7d4de;
  --soft: #f0f4f7;
  --hover: #f2f5f8;
  --text2: #344450;
  --faint: #7d93a4;
  --band: #e0ecf7;
  --accent: #0b4a7b;
  --accent-2: #1d68a3;
  --accent-soft: rgba(11, 74, 123, .1);
  --link: #0b4a7b;
  --link-hover: #1d68a3;
  --focus: #3b8bc9;
  --red: #c0392b;
  --shadow: 0 1px 2px rgba(41, 51, 61, .12);
  --font: -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --rail: 64px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1620;
  --card: #182431;
  --ink: #e3ecf4;
  --head: #f1f6fb;
  --muted: #9db2c3;
  --line: #2a3a4a;
  --border: #3b4f63;
  --soft: #1f2e3d;
  --hover: #223244;
  --text2: #c4d1dc;
  --faint: #8399ab;
  --band: #223548;
  --accent: #1d68a3;
  --accent-2: #2f80c2;
  --accent-soft: rgba(125, 185, 236, .14);
  --link: #86bfee;
  --link-hover: #b4d8f6;
  --red: #ff7d6e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--bg); }
img, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4, h5 { color: var(--head); line-height: 1.25; font-weight: 600; margin: 1.4em 0 .6em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); color: var(--ink); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; left: -999px; }
.ico, .ico-lg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico { width: 1.1em; height: 1.1em; }

/* ---------- μπάρα μενού αριστερά ---------- */
.rail { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--rail); background: var(--card); display: flex; flex-direction: column; align-items: stretch; padding: 14px 10px; gap: 6px; box-shadow: 1px 0 0 var(--line); }
.rail .spacer { flex: 1; }
.rail-brand { display: flex; align-items: center; justify-content: center; gap: 12px; height: 46px; margin-bottom: 8px; border-radius: 10px; color: var(--head); text-decoration: none; }
.rail-brand img { display: block; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.rail-brand .brand-name { display: none; font-size: 14px; font-weight: 600; line-height: 1.25; }
.rail-brand:hover { background: var(--hover); }
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rail-item { position: relative; }
.rail-link { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--text2); font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.rail-link:hover, .rail-item:hover > .rail-link, .rail-item.open > .rail-link { background: var(--hover); color: var(--link); }
.rail-link.current, .rail-item.current > .rail-link { background: var(--accent-soft); color: var(--link); }
.rail svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-link svg { width: 22px; height: 22px; flex: none; }
.rail-link .lbl { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; font-size: 14px; line-height: 1.4; color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 50; }
.rail-link:hover .lbl, .rail-link:focus-visible .lbl { opacity: 1; }
.rail-item.has-sub .rail-link .lbl { display: none; }
.rail .chev { display: none; margin-left: auto; width: 16px; height: 16px; color: var(--faint); }
.rail-toggle { display: none; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* υπομενού: ανοίγει δεξιά από το κουμπί */
.fly { list-style: none; margin: 0; padding: 8px; position: absolute; left: calc(100% + 10px); top: 0; min-width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); display: none; z-index: 60; }
.fly::before { content: ""; position: absolute; left: -12px; top: 0; bottom: 0; width: 12px; }
.rail-item.has-sub:hover > .fly, .rail-item.has-sub:focus-within > .fly, .rail-item.has-sub.open > .fly { display: block; }
.fly-title { padding: 6px 10px 8px; margin-bottom: 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.fly a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 15px; line-height: 1.35; color: var(--text2); text-decoration: none; white-space: nowrap; }
.fly a:hover { background: var(--hover); color: var(--ink); }
.fly .current a { background: var(--accent-soft); color: var(--link); }

/* πλατιά οθόνη: η μπάρα δείχνει και τα ονόματα */
@media (min-width: 1180px) {
  :root { --rail: 236px; }
  .rail { padding: 18px 14px; }
  .rail-brand { justify-content: flex-start; padding: 0 6px; height: 54px; }
  .rail-brand .brand-name { display: block; }
  .rail-link { justify-content: flex-start; padding: 0 12px; }
  .rail-link .lbl { position: static; transform: none; opacity: 1; background: none; border: 0; box-shadow: none; padding: 0; font-size: 15px; color: inherit; pointer-events: auto; }
  .rail-item.has-sub .rail-link .lbl { display: inline; }
  .rail .chev { display: block; }
}

/* ---------- σελίδες ---------- */
main { display: block; width: 100%; max-width: 1136px; margin: 0 auto; padding: 32px 32px 0; flex: 1; }
main.page { max-width: 960px; width: min(960px, calc(100% - 64px)); margin: 32px auto 0; padding: 28px 36px 40px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); flex: 0 0 auto; }
.page > h1:first-child { margin: 0 0 .7em; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 500; letter-spacing: -.01em; }
.page figure { margin: 1.6em auto; text-align: center; }
.page figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.page img { border-radius: 8px; }
.page .center { text-align: center; }
.page .lead { font-size: 1.15rem; font-weight: 500; }
.page .band { background: var(--band); padding: 8px 14px; margin: 1.6em 0 .8em; border-radius: 8px; }
.page table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.page td, .page th { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.page .big { font-size: 1.35rem; }
.page .map, .page iframe[src*="google.com/maps"] { display: block; width: 100%; max-width: 640px; height: 400px; border: 0; border-radius: 10px; margin: 1.4em auto; }
.page .video { position: relative; aspect-ratio: 16 / 9; margin: 1.4em 0; }
.page .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.page object { width: 100%; height: 600px; margin: 1em 0; }
.page .meta { color: var(--muted); font-size: 14px; margin-top: -.4em; }
.page .back { margin-top: 2.4em; padding-top: 18px; border-top: 1px solid var(--line); }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 14px 0; border-top: 1px solid var(--line); line-height: 1.45; }
.news-list li:first-child { border-top: 0; padding-top: 0; }
.news-list a { font-size: 1.1rem; font-weight: 500; text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.news-list .meta { margin: 0; font-size: 14px; }

/* ---------- κουμπιά ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0; }
.btn-row.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: #fff !important; text-decoration: none; padding: 13px 26px; border-radius: 10px; font-weight: 600; font-size: 16px; border: 0; cursor: pointer; line-height: 1.3; font-family: inherit; }
.btn:hover { background: var(--accent-2); }
.btn .ico { width: 1.2em; height: 1.2em; }
.btn--outline { background: transparent; color: var(--link) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--outline:hover { background: var(--accent-soft); }
.file-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: .6em 0 1.4em; }

/* ---------- αρχική ---------- */
main.home { display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 28px 32px; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; }

.hero { border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.hero-photo { aspect-ratio: 1600 / 520; background: #0b4a7b url(img/bridge.jpg) 50% 68% / cover no-repeat; }
.hero-in { padding: 28px 36px 32px; }
.hero .eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero h1 { margin: 0; font-size: 36px; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.hero .btn-row { margin: 22px 0 0; }

.intro p { margin: 0 0 1.1em; color: var(--text2); text-align: justify; hyphens: auto; }
.intro p:first-child { font-size: 1.1rem; color: var(--ink); }

.sub-head { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.sub-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.res-list { display: flex; flex-direction: column; }
.res { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 4px 28px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.res:first-child { border-top: 0; }
.res h3 { margin: 0 0 8px; font-size: 21px; font-weight: 500; line-height: 1.3; }
.res p { margin: 0; color: var(--text2); font-size: 15.5px; line-height: 1.6; }
.res .go { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--link); }
.res:hover h3 { color: var(--link); }
.res:hover .thumb { filter: brightness(1.06); }
.res .kicker { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin: 0 0 4px; text-transform: uppercase; }
.thumb { display: flex; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #1d68a3 0%, #083e68 100%); transition: filter .15s; }
.thumb--cal { background: linear-gradient(135deg, #3b8bc9 0%, #0b4a7b 100%); }
.tc { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; height: 64px; padding: 0 10px; border-radius: 8px; background: #fff; color: #22262a; font-size: 26px; font-weight: 700; line-height: 1; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); }
.tc i { font-style: normal; color: #c0392b; }
.tc.r { color: #c0392b; }
.tc.big { font-size: 40px; min-width: 96px; height: 80px; }
.thumb .ico-lg { width: 64px; height: 64px; color: #fff; stroke-width: 1.4; }

.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 18px; }
.news-card a { display: block; color: var(--ink); text-decoration: none; }
.news-card img { display: block; width: 100%; border-radius: 10px; transition: filter .15s; }
.news-card h3 { font-size: 18px; font-weight: 500; margin: 12px 0 0; }
.news-card a:hover h3 { color: var(--link); }
.news-card a:hover img { filter: brightness(1.05); }
.news .all { margin: 1.4em 0 0; font-weight: 600; }
.news .all a { text-decoration: none; }

.banner { position: relative; display: flex; align-items: center; min-height: 220px; border-radius: 14px; overflow: hidden; color: #fff; background: #0b4a7b url(uploads/2023/09/IMG_20221027_222634-1-scaled.jpg) 52% 30% / cover no-repeat; box-shadow: var(--shadow); }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 40, 70, .82) 0%, rgba(8, 40, 70, .35) 100%); }
.banner > div { position: relative; padding: 32px 44px; }
.banner h2 { margin: 0 0 .25em; color: #fff; font-size: 34px; font-weight: 500; letter-spacing: -.01em; }
.banner p { margin: 0; font-size: 19px; color: #e3eef8; }

.where { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.where .map-link { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.where .map-link img { display: block; width: 100%; }
.where h2 { margin: 0 0 .3em; }
.where address { font-style: normal; margin: 0 0 1em; color: var(--text2); }
.where address b { color: var(--ink); }

.sponsors h2 { text-align: center; }
.sponsor-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: stretch; margin-top: 20px; }
.sponsor-row > div { display: flex; align-items: center; justify-content: center; padding: 14px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.sponsor-row img { max-height: 76px; width: auto; max-width: 100%; object-fit: contain; border-radius: 0; }

/* ---------- Διοικητικό συμβούλιο ---------- */
.team { list-style: none; margin: 2em 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 44px 24px; }
.page:has(.team) > h1 { text-align: center; }
.member { width: 210px; text-align: center; }
.member .photo { display: block; width: 190px; height: 190px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; object-position: 50% var(--face, 25%); border: 5px solid var(--card); box-shadow: 0 0 0 3px var(--band), 0 6px 18px rgba(0, 0, 0, .15); background: var(--band); }
.member .role { display: inline-block; margin: 0 0 8px; padding: 3px 14px; background: var(--accent-soft); color: var(--link); border-radius: 99px; font: 700 13px/1.6 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.member .name { margin: 0; font: 600 1.15rem/1.35 var(--font); color: var(--ink); }

/* ---------- υποσέλιδο ---------- */
.site-footer { margin: 48px 0 0; padding: 28px 32px 22px; background: var(--card); box-shadow: 0 -1px 0 var(--line); color: var(--muted); font-size: 14px; }
.site-footer .cols { max-width: 1072px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; line-height: 1.7; }
.site-footer h2 { margin: 0 0 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.site-footer a { color: var(--link); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.site-footer .phones p { margin: 0 0 .5em; }
.site-footer .copy { max-width: 1072px; margin: 20px auto 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- κουμπί «πάνω» ---------- */
.to-top { position: fixed; right: 20px; bottom: 24px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 35; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.to-top:hover { background: var(--accent-2); }
.to-top.show { display: flex; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- popup ---------- */
.popup-overlay { position: fixed; inset: 0; background: rgba(8, 20, 32, .62); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .35s ease; }
.popup-overlay.show { display: flex; }
.popup-overlay.visible { opacity: 1; }
.popup-box { position: relative; background: var(--card); max-width: min(640px, 100%); max-height: 100%; overflow: auto; border-radius: 12px; box-shadow: 0 8px 40px rgba(0, 0, 0, .4); }
.popup-box img { display: block; width: 100%; height: auto; max-height: calc(100vh - 32px); object-fit: contain; }
.popup-close { position: absolute; top: 10px; right: 10px; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 13px; font: 600 12px/1 var(--font); cursor: pointer; z-index: 1; }
.popup-close:hover { background: var(--accent-2); }
body.popup-open { overflow: hidden; }

/* ---------- ανάλογα με το πλάτος ---------- */
@media (max-width: 1100px) {
  .hero h1 { font-size: 32px; }
  .sponsor-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  :root { --rail: 0px; }
  .rail { position: sticky; top: 0; bottom: auto; left: 0; width: 100%; height: 58px; flex-direction: row; align-items: center; padding: 8px 12px; gap: 6px; box-shadow: 0 1px 0 var(--line); }
  .rail-brand { margin: 0; height: 42px; }
  .rail-brand img { width: 36px; height: 36px; }
  .rail-brand .brand-name { display: block; font-size: 14px; }
  .rail .spacer { flex: 1; }
  .rail .theme-btn, .rail-toggle { display: flex; width: 44px; flex: none; }
  .rail .theme-btn .lbl { display: none; }
  .rail-toggle { align-items: center; justify-content: center; height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--text2); cursor: pointer; }
  .rail-toggle:hover, .rail-toggle[aria-expanded="true"] { background: var(--hover); color: var(--link); }
  .rail-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .rail-toggle .i-x { display: none; }
  .rail-toggle[aria-expanded="true"] .i-x { display: block; }
  .rail-toggle[aria-expanded="true"] .i-bars { display: none; }
  /* το μενού ανοίγει σαν κάρτα κάτω από τη μπάρα */
  .rail-list { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 12px 14px; background: var(--card); box-shadow: 0 10px 24px rgba(0, 0, 0, .16); max-height: calc(100vh - 58px); overflow-y: auto; }
  .rail-list.open { display: flex; }
  .rail-link { justify-content: flex-start; padding: 0 12px; height: 46px; }
  .rail-link .lbl, .rail-item.has-sub .rail-link .lbl { position: static; display: inline; transform: none; opacity: 1; background: none; border: 0; box-shadow: none; padding: 0; font-size: 16px; color: inherit; }
  .rail .chev { display: block; transition: transform .15s; }
  .rail-item.open > .rail-link .chev { transform: rotate(90deg); }
  .fly { position: static; min-width: 0; margin: 0 0 6px 34px; padding: 2px 0; border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
  .fly::before, .fly-title { display: none; }
  .fly a { white-space: normal; padding: 10px 12px; }
  .rail-item.has-sub:hover > .fly, .rail-item.has-sub:focus-within > .fly { display: none; }
  .rail-item.has-sub.open > .fly { display: block; }
  main { padding: 20px 16px 0; }
  main.page { width: calc(100% - 32px); margin-top: 20px; padding: 20px 18px 28px; }
  .panel { padding: 20px 18px; }
  .hero-photo { aspect-ratio: 4 / 3; background-position: 40% 68%; }
  .hero-in { padding: 20px 18px 22px; }
  .hero h1 { font-size: 25px; }
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn { font-size: 15px; }
  .res { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; }
  .res .thumb { aspect-ratio: 16 / 8; }
  .news-grid { grid-template-columns: 1fr; }
  .banner > div { padding: 24px 20px; }
  .banner h2 { font-size: 26px; }
  .banner p { font-size: 17px; }
  .where { grid-template-columns: 1fr; gap: 20px; }
  .sponsor-row { grid-template-columns: repeat(2, 1fr); }
  .site-footer { margin-top: 36px; padding: 22px 16px 18px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 16px; }
  .team { gap: 32px 12px; }
  .member { width: calc(50% - 6px); }
  .member .photo { width: min(150px, 100%); height: auto; aspect-ratio: 1; }
  .member .role { font-size: 11px; padding: 2px 10px; }
  .member .name { font-size: 1rem; }
  .page .map, .page iframe[src*="google.com/maps"] { height: 320px; }
  .page object { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .popup-overlay, .thumb, .news-card img { transition: none; }
}

@media print {
  body { padding-left: 0; background: #fff; }
  .rail, .site-footer, .skip, .to-top, .popup-overlay { display: none !important; }
  main.page { box-shadow: none; width: 100%; margin: 0; padding: 0; }
}
