/* =========================================================
   Σύγχρονη Λέσχη Μπριτζ Βέροιας — stylesheet
   Χρωματική παλέτα βασισμένη στο λογότυπο:
     --ink  #343945  (σκούρο μπλε-γκρι)
     --red  #e5180c  (κόκκινο λογοτύπου)
   ========================================================= */

:root {
  --ink: #343945;
  --ink-soft: #5c626f;
  --red: #e5180c;
  --red-dark: #b31209;
  --paper: #ffffff;
  --mist: #f2f2f4;
  --line: #dfe1e5;

  --font: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --nav-height: 64px;
  --max-width: 1120px;
}

/* ---------- Reset (light touch, compatible with older browsers) ---------- */
* { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, dl, dd, dt, ul, ol, li, figure, table, th, td {
  margin: 0;
  padding: 0;
}
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; background: none; border: 0; cursor: pointer; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Offset for fixed header */
#top { display: block; height: 0; margin-top: calc(var(--nav-height) * -1); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
}

.brand-logo {
  height: 34px;
  width: auto;
}

.menu-toggle {
  display: none;
  -ms-flex-direction: column; flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
}

.primary-nav ul {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 1.75rem;
}

.primary-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a.is-active {
  border-color: var(--red);
  color: var(--red);
}

/* ---------- Hero ---------- */
.hero {
  margin-top: var(--nav-height);
  position: relative;
  text-align: center;
  background: var(--mist);
}
.hero-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 0 auto;
}

/* ---------- Intro strip ---------- */
.intro-strip {
  max-width: 62ch;
  margin: 0 auto;
  padding: 3rem 1.25rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

/* ---------- Sections (infinite scroll bands) ---------- */
.section {
  padding: 4rem 1.25rem;
  scroll-margin-top: var(--nav-height);
}
.section.alt { background: var(--mist); }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-kicker {
  color: var(--red);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.section h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 20ch;
  margin-bottom: 1.1rem;
}

.section h3 { font-size: 1.25rem; font-weight: 700; }

.lede {
  font-size: 1.15rem;
  max-width: 62ch;
  margin-bottom: 1rem;
}

.section p {
  max-width: 68ch;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}
.section p a { color: var(--ink); border-bottom: 1px solid var(--red); }
.section p a:hover { color: var(--red); }

.two-col {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 3rem;
}
.col-main { -webkit-box-flex: 1; -ms-flex: 1 1 340px; flex: 1 1 340px; min-width: 280px; }
.col-side { -webkit-box-flex: 1; -ms-flex: 1 1 280px; flex: 1 1 280px; min-width: 260px; max-width: 380px; }

/* ---------- Contact box ---------- */
.contact-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  padding: 1.1rem 1.25rem;
  margin-top: 1.5rem;
  max-width: 340px;
}
.contact-box-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.contact-box p { margin-bottom: 0.3rem; color: var(--ink-soft); }
.contact-box a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--red); }
.contact-box a:hover { color: var(--red); }

/* ---------- Q&A list (Μαθήματα sidebar) ---------- */
.qa-list { border-top: 1px solid var(--line); }
.qa-item {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
.qa-item dt {
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.qa-item dd { color: var(--ink-soft); }

/* ---------- Standings table ---------- */
.disclaimer {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--line);
  padding-left: 0.9rem;
}

.table-caption {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.table-wrap { margin-top: 0; overflow-x: auto; }
.standings-scroll {
  overflow: auto;
  max-height: 636px; /* header row + 12 body rows at ~49px each */
  border: 1px solid var(--line);
}
.standings-table { min-width: 640px; }
.standings-table th, .standings-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.standings-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 1;
}
.standings-table tbody tr:nth-child(odd) { background: var(--mist); }
.standings-table tbody tr:nth-child(even) { background: var(--paper); }
.table-note { font-size: 0.9rem; margin-top: 1rem; }

/* ---------- Trait list (Το μπριτζ) ---------- */
.trait-list {
  margin-top: 2rem;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 2rem 3rem;
}
.trait-item { -webkit-box-flex: 1; -ms-flex: 1 1 260px; flex: 1 1 260px; min-width: 240px; }
.trait-item dt {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 0.5rem;
}
.trait-mark { color: var(--red); font-size: 1.3rem; line-height: 1; }
.trait-item dd { color: var(--ink-soft); }

/* ---------- Timeline scroll (fades top/bottom, room to grow) ---------- */
.timeline-scroll {
  max-height: 420px;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 28px, black calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, transparent, black 28px, black calc(100% - 28px), transparent);
}
.timeline-scroll .timeline { padding: 1.25rem 0; }

/* ---------- Ranking badges (real medal images) ---------- */
.rank-badge-img {
  height: 30px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}

/* ---------- Κατάταξη μελών: centered numeric columns ---------- */
.member-ranking th:nth-child(n+4),
.member-ranking td:nth-child(n+4) {
  text-align: center;
}

/* ---------- Τελευταία ημερίδα: centered Score/Handicap/Hscore/Points ---------- */
.last-session-table th:nth-child(n+4),
.last-session-table td:nth-child(n+4) {
  text-align: center;
}

/* ---------- 6ήμερα: centered day columns and Σύνολο ---------- */
.sixday-table th:nth-child(n+2),
.sixday-table td:nth-child(n+2) {
  text-align: center;
}

/* ---------- Smaller scroll variant (8 visible rows) for the 6ήμερα tables ---------- */
.standings-scroll-sm { max-height: 441px; }

/* ---------- Score dropped from a 6ήμερο average ---------- */
.dropped-score {
  color: var(--red);
  background: rgba(229, 24, 12, 0.08);
  font-weight: 700;
}

/* ---------- Timeline ---------- */
.timeline-heading { margin-top: 3.5rem; margin-bottom: 1.5rem; }
.timeline {
  border-left: 2px solid var(--line);
  max-width: 62ch;
}
.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.timeline-year {
  display: block;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.timeline li p { color: var(--ink-soft); max-width: none; margin-bottom: 0; }
.timeline li a { color: var(--ink); border-bottom: 1px solid var(--red); }
.timeline li a:hover { color: var(--red); }

/* ---------- Social list ---------- */
.social-title { font-weight: 700; margin-bottom: 1rem; }
.social-list li { margin-bottom: 0.85rem; }
.social-list a {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--ink);
}
.social-list a:hover { color: var(--red); }
.social-icon {
  width: 22px;
  height: 22px;
  fill: var(--ink);
  -webkit-box-flex: 0; -ms-flex: none; flex: none;
}
.social-list a:hover .social-icon { fill: var(--red); }

/* ---------- Announcements ---------- */
.announce-list { margin-top: 2rem; }
.announce-item {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
}
.announce-item:last-child { border-bottom: 1px solid var(--line); }
.announce-date {
  color: var(--red);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.announce-item h3 { margin-bottom: 0.5rem; max-width: 40ch; }

/* ---------- Club storefront photo (Ο όμιλος) ---------- */
.club-photo {
  margin-top: 1.75rem;
  border: 1px solid var(--line);
}

/* ---------- Αγώνες page ---------- */
.section-page-top { padding-top: calc(var(--nav-height) + 3rem); }
.page-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 26ch;
  margin-bottom: 1.1rem;
}
.hero-link { display: block; }

.tournament-lede { max-width: 68ch; }

.logo-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;
  gap: 2.5rem;
  margin: 2rem 0 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.logo-row img {
  max-height: 64px;
  width: auto;
}

.cta-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.cta-label {
  font-weight: 700;
  max-width: none;
  margin-bottom: 0.75rem;
}
.btn {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--paper);
}
.btn-primary:hover { background: var(--red-dark); }
.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-icon { width: 18px; height: 18px; fill: currentColor; -webkit-box-flex: 0; -ms-flex: none; flex: none; }

.sponsors-block { margin-top: 3.5rem; }
.media-sponsors-block { margin-top: 3.5rem; }
.sponsors-heading { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }

.sponsors-scroll {
  margin-top: 1.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}
.sponsors-track {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 3rem;
  width: -webkit-max-content; width: -moz-max-content; width: max-content;
  -webkit-animation: sponsors-scroll 48s linear infinite;
  animation: sponsors-scroll 48s linear infinite;
}
.sponsors-scroll:hover .sponsors-track { -webkit-animation-play-state: paused; animation-play-state: paused; }
.sponsors-track img {
  height: 42px;
  width: auto;
  -webkit-box-flex: 0; -ms-flex: none; flex: none;
}
@-webkit-keyframes sponsors-scroll { from { -webkit-transform: translateX(0); transform: translateX(0); } to { -webkit-transform: translateX(-50%); transform: translateX(-50%); } }
@keyframes sponsors-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .sponsors-track { -webkit-animation: none; animation: none; -ms-flex-wrap: wrap; flex-wrap: wrap; width: auto; }
}

/* ---------- Πρόγραμμα αγώνων ---------- */
.schedule-block { margin-top: 3.5rem; }
.schedule-heading { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.5rem; }
.schedule-grid {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 2rem 2.5rem;
}
.schedule-grid > div {
  -webkit-box-flex: 1; -ms-flex: 1 1 240px; flex: 1 1 240px;
  min-width: 240px;
  overflow: hidden;
}
.schedule-day-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.schedule-list { border-top: 1px solid var(--line); }
.schedule-list li {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.schedule-time {
  font-weight: 700;
  color: var(--red);
  -webkit-box-flex: 0; -ms-flex: none; flex: none;
  min-width: 3.4rem;
}
.schedule-event { color: var(--ink-soft); }

/* ---------- Διαιτητές ---------- */
.referees-block { margin-top: 3.5rem; }
.referees-heading { font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; }
.referees-list { max-width: 40ch; }
.referees-list li {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}
.referees-list li:first-child { border-top: 1px solid var(--line); }
.referee-number { color: var(--ink-soft); font-weight: 500; }

/* ---------- Προκήρυξη (accordion) ---------- */
.proclamation {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proclamation-summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  position: relative;
  padding-right: 2rem;
}
.proclamation-summary::-webkit-details-marker { display: none; }
.proclamation-summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.1rem;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--red);
  line-height: 1;
}
.proclamation[open] .proclamation-summary::after { content: "\2212"; }
.proclamation-summary:hover { color: var(--red); }
.proclamation-body { padding: 0 0 2rem; max-width: 68ch; }
.proclamation-body h4 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}
.proclamation-body h4:first-child { margin-top: 0; }
.proclamation-body p { color: var(--ink-soft); margin-bottom: 0.85rem; }
.proclamation-formula {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  background: var(--mist);
  border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  line-height: 1.7;
  max-width: none;
}

.site-footer {
  background: var(--mist);
  border-top: 1px solid var(--line);
  color: var(--ink);
  padding: 3.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 2.5rem;
  padding-bottom: 2rem;
}
.footer-logo { width: 56px; height: 56px; }
.footer-col { -webkit-box-flex: 1; -ms-flex: 1 1 160px; flex: 1 1 160px; min-width: 150px; }
.footer-map {
  display: block;
  margin-top: 0.65rem;
  max-width: 220px;
  border: 1px solid var(--line);
  -webkit-filter: grayscale(65%) contrast(1.05);
  filter: grayscale(65%) contrast(1.05);
  opacity: 0.85;
  -webkit-transition: opacity 0.2s, -webkit-filter 0.2s;
  transition: opacity 0.2s, filter 0.2s;
}
.footer-map:hover, .footer-map:focus {
  -webkit-filter: grayscale(0%);
  filter: grayscale(0%);
  opacity: 1;
}
.footer-heading {
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.footer-col p { margin-bottom: 0.5rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--red); }
.footer-social-list {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 1rem;
}
.footer-social-list a { display: block; }
.footer-social-list .social-icon {
  width: 22px;
  height: 22px;
  fill: var(--ink-soft);
}
.footer-social-list a:hover .social-icon { fill: var(--red); }
.footer-copy {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Responsive: tablets & phones ---------- */
@media (max-width: 860px) {
  .menu-toggle {
    display: -webkit-box; display: -ms-flexbox; display: flex;
  }

  .primary-nav {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    -ms-flex-direction: column; flex-direction: column;
    gap: 0;
  }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav a {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 0;
  }
  .primary-nav a.is-active { background: var(--mist); color: var(--red); }

  .section h2 { font-size: 1.6rem; }
  .section { padding: 3rem 1.25rem; }
}

@media (max-width: 480px) {
  .hero-caption-title { font-size: 1.1rem; }
  .brand-logo { height: 28px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
