/* Όμιλος Μπριτζ Ηρακλείου – static site styles */
:root {
  --teal: #1a8e9c;
  --teal-dark: #137684;
  --purple: #8e5fa0;
  --red: #c24545;
  --orange: #fc9547;
  --ink: #393939;
  --dark: #171717;
  --muted: #939393;
  --band: #d7ecf3;
  --font: Lato, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-head: Montserrat, "Helvetica Neue", Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink); background: #fff; }
img, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--teal-dark); }
a:hover { color: var(--teal); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.25; margin: 1.4em 0 .6em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid #eee; position: relative; z-index: 20; }
.site-header .wrap { max-width: 1170px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { display: block; width: 66px; height: 66px; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--ink); border-radius: 3px; padding: 8px 10px; cursor: pointer; color: var(--ink); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: ""; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle .sr { position: absolute; left: -999px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav li { position: relative; }
.site-nav a, .site-nav button.sub-toggle { font: inherit; font-size: 15px; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 12px 14px; display: block; cursor: pointer; font-family: Georgia, "Times New Roman", serif; }
.site-nav a:hover, .site-nav button.sub-toggle:hover, .site-nav .current > a { color: var(--teal-dark); }
.site-nav .has-sub > button::after { content: ""; display: inline-block; margin-left: 6px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.site-nav .sub { display: none; position: absolute; right: 0; top: 100%; min-width: 250px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); flex-direction: column; align-items: stretch; padding: 6px 0; gap: 0; z-index: 30; }
.site-nav .has-sub:hover > .sub, .site-nav .has-sub:focus-within > .sub, .site-nav .has-sub.open > .sub { display: flex; }
.site-nav .sub a { padding: 10px 18px; white-space: nowrap; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid #eee; box-shadow: 0 8px 18px rgba(0, 0, 0, .12); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 20px 14px; gap: 0; }
  .site-nav a, .site-nav button.sub-toggle { padding: 12px 4px; width: 100%; text-align: left; font-size: 16px; }
  .site-nav .sub { display: flex; position: static; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .site-nav .has-sub > button::after { display: none; }
  .site-nav .sub a { white-space: normal; padding: 9px 4px; }
}

/* ---------- generic page ---------- */
main { display: block; }
.page { max-width: 860px; margin: 0 auto; padding: 24px 20px 70px; }
.page > h1:first-child { margin-top: .6em; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.page figure { margin: 1.6em auto; text-align: center; }
.page figcaption { font-size: 14px; color: #666; margin-top: 6px; }
.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: 3px; }
.page table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.page td, .page th { border: 1px solid #ddd; 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; 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; }
.page object { width: 100%; height: 600px; margin: 1em 0; }
.page .meta { color: #777; font-size: 14px; margin-top: -.4em; }
.page .back { margin-top: 2.4em; }
.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(--teal-dark); color: #fff !important; text-decoration: none; padding: 15px 30px; border-radius: 4px; font-weight: 700; font-size: 16px; border: 0; cursor: pointer; line-height: 1.3; }
.btn:hover { filter: brightness(1.08); }
.btn svg, .ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn--teal { background: #137684; }
.btn--purple { background: var(--purple); }
.btn--red { background: var(--red); }
.btn--learn { background: linear-gradient(135deg, #fcb900 0%, #ff6900 100%); padding: 20px; }
.btn--outline { background: transparent; color: var(--teal-dark) !important; border: 2px solid var(--teal-dark); }
.file-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: .6em 0 1.4em; }

/* ---------- home sections ---------- */
.band-section { position: relative; display: flex; justify-content: center; text-align: center; color: #fff; overflow: hidden; background-repeat: no-repeat; background-size: cover; }
.band-section::before { content: ""; position: absolute; inset: 0; background: var(--ov, #171717); opacity: .5; }
.band-section > .inner { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; }

/* hero: desktop = parallax (fixed background), mobile = plain scroll with its own crop */
.hero { background-image: url(img/bridge.jpg); background-position: 15% 59%; background-attachment: fixed; min-height: 640px; align-items: center; --ov: #000; padding: 20px; }
.hero .inner { padding: 80px 20px; }
.hero h1 { color: #fff; font-size: 55px; line-height: 1.2; margin: 0 0 .5em; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.hero .btn-row { justify-content: center; margin: 20px 0 0; }
.hero .btn { text-shadow: none; }

.learn { text-align: center; padding: 30px 20px 10px; }
.intro { max-width: 1100px; margin: 0 auto; padding: 30px 20px 50px; }
.intro p { margin: 0 0 1.2em; }

.news { background: #1a8e9c; padding: 60px 20px; color: #fff; }
.news .inner { max-width: 1100px; margin: 0 auto; }
.news h2 { color: #fff; text-align: center; font-size: 28px; margin: 0 0 1.2em; }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.news-card a { color: #fff; text-decoration: none; display: block; }
.news-card img { display: block; width: 100%; border-radius: 2px; }
.news-card h3 { font-size: 18px; margin: 12px 0 0; font-weight: 400; }
.news-card a:hover h3 { text-decoration: underline; }
.news .all { text-align: center; margin: 2em 0 0; }
.news .all a { color: #fff; font-weight: 700; }

.about { background-image: url(uploads/2023/09/IMG_20221027_222634-1-scaled.jpg); background-position: 52% 0; background-attachment: fixed; align-items: center; padding: 20px 20px 0; }
.about .inner { padding: 20px 20px 20px; }
.about h2 { color: #fff; font-size: 45px; margin: 0 0 .3em; }
.about p { margin: 0; font-size: 20px; }

.where { position: relative; background: #fff url(uploads/2024/08/SCR-20240811-qron.png) no-repeat 50% 79%; background-size: auto; min-height: 300px; display: block; }
.where a { display: block; position: absolute; inset: 0; }
.where .title { position: relative; margin: 0; padding: 0 20px; text-align: center; font-size: 20px; color: #e90c0c; background: #fff; line-height: 1.5; }

.sponsors { max-width: 960px; margin: 0 auto; padding: 60px 20px 20px; text-align: center; }
.sponsors h2 { font-size: 55px; color: var(--ink); margin: 0 0 1em; }
.sponsor-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; align-items: center; justify-items: center; }
.sponsor-row img { max-height: 90px; width: auto; max-width: 100%; object-fit: contain; }
.sponsor-row .wide img { max-height: 90px; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--muted); font-size: 14px; margin-top: 0; }
.site-footer .cols { max-width: 1100px; margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; line-height: 1.7; }
.site-footer .ico-big { width: 34px; height: 34px; fill: none; stroke: #bbb; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 12px; display: block; }
.site-footer a { color: #cfd2d8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: inline-block; text-align: left; }
.site-footer li { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.site-footer li .ico { color: #bbb; }
.site-footer .copy { border-top: 1px solid #2a2a2a; text-align: center; padding: 14px 20px; font-size: 13px; }

/* ---------- scroll to top ---------- */
.to-top { position: fixed; right: 20px; bottom: 30px; width: 36px; height: 36px; border: 0; border-radius: 3px; background: var(--orange); color: #fff; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 40; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.to-top.show { display: flex; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- typing effect ---------- */
.typing-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- popup ---------- */
.popup-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); 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: #fff; max-width: min(640px, 100%); max-height: 100%; overflow: auto; 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: 0; right: 0; background: #3aa0ae; color: #fff; border: 0; padding: 10px 14px; font: 600 12px/1 var(--font); cursor: pointer; z-index: 1; }
.popup-close:hover { background: var(--teal-dark); }
body.popup-open { overflow: hidden; }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 40px; }
  .about h2 { font-size: 34px; }
  .sponsors h2 { font-size: 40px; }
  .sponsor-row { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- mobile: same look as the live site's mobile layout ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  /* background-attachment: fixed is not supported on phones (it causes the "warping" effect), so use plain scrolling backgrounds with a hand-tuned crop */
  .hero { background-attachment: scroll; background-position: 20% 52%; min-height: 442px; align-items: flex-start; --ov: #171717; padding: 20px 20px 0; }
  .hero .inner { padding: 40px 20px 20px; }
  .hero h1 { font-size: 19.5px; line-height: 1.2; margin: 0 0 .9em; }
  .hero .btn-row { flex-direction: column; align-items: center; gap: 20px; margin: 0; }
  .hero .btn { font-size: 15px; padding: 15px 30px; }
  .learn { padding: 20px 20px 10px; }
  .btn--learn { padding: 20px 28px; }
  .intro { padding: 40px 20px 30px; }
  .news { padding: 60px 20px; }
  .news-grid { grid-template-columns: 1fr; gap: 28px; }
  .about { background-attachment: scroll; background-position: 52% 0; min-height: 189px; align-items: flex-start; }
  .about .inner { padding: 20px 20px 20px; }
  .about h2 { font-size: 19.5px; margin: 20px 0 .5em; }
  .about p { font-size: 16px; }
  .sponsors { padding-top: 60px; }
  .sponsors h2 { font-size: 26px; }
  .sponsor-row { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .cols { grid-template-columns: 1fr; padding: 20px; }
  .site-footer .cols > div { padding: 20px 0; }
  .page .map, .page iframe[src*="google.com/maps"] { height: 320px; }
  .page object { display: none; }
}

/* ---------- quiz ---------- */
.rs { color: #c62828; }
.crumbs { margin: 0; font-size: 15px; }
.quiz-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 1.6em 0; }
.quiz-tile { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid #dde3e6; border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.quiz-tile:hover { border-color: var(--teal); box-shadow: 0 4px 16px rgba(0,0,0,.1); color: var(--ink); }
.quiz-tile strong { font-family: var(--font-head); font-size: 1.2rem; line-height: 1.3; color: var(--teal-dark); }
.tile-kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #666; }
.tile-go { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--teal-dark); }
.quiz-card { background: #fff; border: 1px solid #dde3e6; border-radius: 8px; padding: 22px; margin: 1.4em 0; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.quiz-count { font-size: 14px; color: #555; margin-bottom: 10px; }
.qnav { display: flex; flex-wrap: wrap; gap: 6px; }
.qbox { position: relative; width: 40px; height: 40px; padding: 0; font: 700 15px var(--font); color: var(--ink); background: #fff; border: 2px solid #b8c4c9; border-radius: 6px; cursor: pointer; }
.qbox:hover { border-color: var(--teal); }
.qbox.correct { background: #1b7f3b; border-color: #1b7f3b; color: #fff; }
.qbox.wrong { background: #b3261e; border-color: #b3261e; color: #fff; }
.qbox.current { outline: 3px solid var(--orange); outline-offset: 2px; }
.qmark { position: absolute; top: 0; right: 3px; font-size: 10px; line-height: 1.2; }
.qlegend { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 4px; font-size: 13px; color: #555; }
.lg::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 5px; border-radius: 3px; border: 2px solid #b8c4c9; vertical-align: -1px; box-sizing: border-box; }
.lg-correct::before { background: #1b7f3b; border-color: #1b7f3b; }
.lg-wrong::before { background: #b3261e; border-color: #b3261e; }
.qnav-title { margin: 1.4em 0 .6em; font-size: 15px; }
.quiz-q { font-size: 1.25rem; margin: 1em 0 .8em; }
.quiz-q:focus { outline: none; }
.context { margin: 0 0 12px; padding: 10px 14px; background: #f1f5f6; border-left: 4px solid var(--teal); border-radius: 0 6px 6px 0; }
.trump { display: inline-block; margin: 0 0 12px; padding: 4px 12px; background: var(--band); border-radius: 999px; font-weight: 700; font-size: 15px; }
.hand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.hand-label { font-weight: 700; margin-right: 4px; }
.hand .pcard { min-width: 46px; height: 62px; font-size: 20px; }
.fullhand { display: grid; grid-template-columns: 34px 1fr; gap: 6px 8px; align-items: center; margin: 0 0 16px; }
.fh-suit { font-size: 28px; line-height: 1; text-align: center; }
.fh-suit.red { color: #c62828; }
.fh-cards { display: flex; flex-wrap: wrap; align-items: center; }
.fullhand .pcard { min-width: 40px; height: 54px; font-size: 19px; margin-right: 4px; }
.fh-void { color: #666; font-size: 14px; }
.auction { border-collapse: collapse; margin: 0 0 16px; width: 100%; max-width: 480px; text-align: center; }
.auction caption { text-align: left; font-size: 14px; color: #555; padding-bottom: 6px; }
.auction th, .auction td { border: 1px solid #cfd8dc; padding: 6px 8px; min-width: 60px; }
.auction th { background: var(--band); font-size: 14px; }
.auction td { font-size: 17px; font-weight: 700; height: 38px; }
.trick { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-areas: ". n ." "w c e" ". s ."; gap: 8px; max-width: 420px; margin: 8px auto 18px; padding: 14px; background: #0f5e3a; border-radius: 10px; color: #fff; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.seat-N { grid-area: n; } .seat-W { grid-area: w; } .seat-E { grid-area: e; } .seat-S { grid-area: s; }
.seat-name { font-weight: 700; font-size: 14px; }
.seat-order { font-size: 12px; opacity: .85; }
.trick-center { grid-area: c; align-self: center; justify-self: center; font-size: 12px; opacity: .6; text-transform: uppercase; letter-spacing: .1em; }
.pcard { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 70px; padding: 0 6px; background: #fff; color: #111; border-radius: 6px; border: 1px solid #bbb; font-size: 22px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.pcard.red { color: #c62828; }
.quiz-options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: #f6f9fa; border: 2px solid #cfd8dc; border-radius: 8px; padding: 12px 14px; cursor: pointer; line-height: 1.4; }
.opt:hover:not(:disabled) { border-color: var(--teal); background: #eef7f9; }
.opt:disabled { cursor: default; color: var(--ink); }
.opt-letter { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.opt-text { flex: 1; }
.opt-mark { flex: none; font-weight: 700; font-size: 20px; }
.opt.correct { border-color: #1b7f3b; background: #e7f5ec; }
.opt.correct .opt-mark { color: #1b7f3b; }
.opt.wrong { border-color: #b3261e; background: #fbeae9; }
.opt.wrong .opt-mark { color: #b3261e; }
.quiz-feedback:not(:empty) { margin-top: 16px; padding: 14px 16px; border-radius: 8px; border-left: 5px solid; }
.quiz-feedback.ok { background: #e7f5ec; border-color: #1b7f3b; }
.quiz-feedback.bad { background: #fbeae9; border-color: #b3261e; }
.quiz-feedback p { margin: 0 0 .7em; }
.quiz-feedback p:last-child { margin-bottom: 0; }
.quiz-feedback .verdict { font-weight: 700; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.quiz-nav .btn:disabled { opacity: .4; cursor: default; filter: none; }
.quiz-finish { text-align: center; margin-top: 12px; }
.linkbtn { background: none; border: 0; padding: 4px 8px; font: inherit; font-size: 14px; color: var(--teal-dark); text-decoration: underline; cursor: pointer; }
.quiz-result { text-align: center; }
.quiz-result .qnav, .quiz-result .qlegend { justify-content: center; }
.quiz-result .score { font-size: 3rem; font-weight: 800; color: var(--teal-dark); margin: 0; line-height: 1.2; }
.unanswered { margin: 1em 0; padding: 12px 16px; background: #fff7e6; border: 1px solid #f0c36d; border-radius: 8px; }
.unanswered p { margin: 0 0 .6em; }
.review { text-align: left; margin-top: 24px; }
.review h3 { font-size: 1.1rem; }
.review-item { border-top: 1px solid #e3e8ea; padding: 14px 0; }
.review-item p { margin: 0 0 .5em; }
.review-q { font-weight: 700; }
.review-a { color: #1b7f3b; font-weight: 700; }
body:has(#quiz) .to-top { display: none !important; }
.quiz-note { font-size: 14px; color: #555; margin-top: 2em; }
@media (max-width: 767px) {
  .quiz-list { grid-template-columns: 1fr; }
  .quiz-card { padding: 16px 14px; }
  .quiz-q { font-size: 1.1rem; }
  .qbox { width: 36px; height: 36px; font-size: 14px; }
  .pcard { min-width: 46px; height: 62px; font-size: 20px; }
  .fullhand .pcard { min-width: 34px; height: 48px; font-size: 16px; margin-right: 3px; }
  .quiz-nav .btn { padding: 12px 14px; font-size: 15px; }
  .auction th { font-size: 12px; padding: 4px; }
  .auction th, .auction td { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .typing-caret { animation: none; }
  .popup-overlay { transition: none; }
}
