:root {
  --ink: #1b1712;
  --ink2: #3f2f1f;
  --muted: #6d6256;
  --line: #e4d8c8;
  --line2: #efe6da;
  --paper: #f7f1e7;
  --card: #fffdf8;
  --soft: #fbf6ee;
  --tan: #f3e6cf;
  --gold: #9a6b2f;
  --dark: #241c16;
  --green: #1f7a45;
  --blue: #1d5f93;
  --red: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Roboto Condensed", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: #7a5323; }
a:hover { color: var(--dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Fejléc ---------- */
.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #c4a273 0%, #ab814d 55%, #8c6337 100%);
  padding-bottom: 90px;
}
.site-header::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; bottom: -60px;
  height: 140px;
  background: var(--paper);
  border-radius: 50% 50% 0 0;
}
.header-row {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px;
  padding-top: 22px;
}
.brand { display: block; justify-self: start; text-decoration: none; }
.brand img { height: 150px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.05; color: var(--ink); }
.brand-text .l1 { white-space: nowrap; font-size: 44px; font-weight: 800; letter-spacing: .02em; }
.brand-text .l2 { white-space: nowrap; font-size: 24px; font-weight: 700; letter-spacing: .14em; color: var(--ink2); margin-top: 6px; }

.nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.nav a {
  padding: 12px 16px; border-radius: 999px;
  font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.nav a:hover, .nav a.active { background: rgba(255,253,248,.55); }

/* ---------- Tartalom ---------- */
main { position: relative; z-index: 1; margin-top: -30px; padding-bottom: 40px; }

h2.section-title { margin: 0 0 18px; line-height: 46px; font-size: 38px; font-weight: 800; letter-spacing: -.01em; }

/* Aktuális versenyek */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.event {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(60,40,15,.07);
  display: flex; flex-direction: column;
}
.event-top {
  background: var(--dark); color: #f6efe4;
  padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px;
}
.event-date { display: flex; align-items: center; gap: 14px; }
.datebox { background: var(--gold); border-radius: 10px; width: 62px; padding: 6px 0; text-align: center; line-height: 1; }
.datebox .d { font-size: 28px; font-weight: 800; color: #fffdf8; }
.datebox .m { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--tan); margin-top: 3px; }
.event-date .full { white-space: nowrap; font-size: 15px; color: #d8c8b0; line-height: 1.3; }

.pill { padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.pill-nevezes_nyitva { background: var(--green); color: #fff; }
.pill-nevezes_lezarva { background: #5c5148; color: #fff; }
.pill-rajtlista { background: var(--blue); color: #fff; }
.pill-hamarosan { background: #e0bf86; color: var(--dark); }
.pill-elmarad { background: var(--red); color: #fff; }
.pill-folyamatban { background: #c25e00; color: #fff; }

.event-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.event-body h3 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; }
.event-body .place { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; color: var(--muted); }
.meta b { color: var(--ink); }
.maplink { font-weight: 700; color: #7a5323; margin-left: 4px; }
.docs { display: flex; flex-wrap: wrap; gap: 8px; }
.doc {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--soft); color: var(--ink) !important;
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.doc:hover { background: var(--tan); }
.doc-main { background: var(--dark); border-color: var(--dark); color: #f6efe4 !important; }
.doc-main:hover { background: #3a2e24; }
.btn-live {
  flex: 1 1 0; min-width: 150px; justify-content: center; text-align: center;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px;
  background: #e7f2ea; color: #1f5f38 !important; font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn-live:hover { background: #d4e9da; }
.btn-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat { padding: 4px 10px; border-radius: 8px; background: var(--tan); color: #6b4a1f; font-size: 14px; font-weight: 700; }
.event-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line2); }
.btn-light {
  display: inline-block; padding: 12px 18px; border-radius: 10px;
  background: var(--soft); color: var(--ink) !important; border: 1px solid var(--line);
  font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn-light:hover { background: var(--tan); }
.btn-dark {
  display: inline-block;
  padding: 12px 28px; border-radius: 10px;
  background: var(--dark); color: #f6efe4 !important;
  font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn-dark:hover { background: #3a2e24; }

.title-sub { line-height: 1; vertical-align: middle; font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 10px; }
.event-place { font-size: 18px; font-weight: 800; letter-spacing: .08em; color: #e0bf86; margin-left: auto; margin-right: 6px; }

/* Következő versenyek */
.next-row { display: grid; grid-template-columns: 62px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line2); }
.next-row:last-child { border-bottom: 0; }
.next-date { background: var(--dark); border-radius: 10px; padding: 7px 0; text-align: center; line-height: 1; }
.next-date .d { font-size: 24px; font-weight: 800; color: #fffdf8; }
.next-date .m { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: #e0bf86; margin-top: 3px; }
.next-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.next-name { font-size: 20px; font-weight: 800; line-height: 1.2; }
.next-sub { font-size: 15px; color: var(--muted); }
.next-sub b { color: var(--ink); }
.next-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.next-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 640px) {
  .next-row { grid-template-columns: 52px 1fr; }
  .next-side { grid-column: 1 / -1; align-items: flex-start; }
  .next-btns { justify-content: flex-start; }
  .title-sub { display: block; margin: 0; }
}

/* Alsó sáv */
.lower { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.leftcol { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.archive { min-width: 0; }
.sidebar { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 26px; margin-top: 64px; }
@media (max-width: 960px) { .sidebar { margin-top: 0; } }

.archive-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.archive-head h2 { margin: 0; }
.years { display: flex; flex-wrap: wrap; gap: 6px; background: var(--line2); padding: 4px; border-radius: 12px; }
.years a {
  padding: 10px 18px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 9px; font-size: 16px; font-weight: 700; color: #4a3a2a; text-decoration: none;
}
.years a.active { background: var(--dark); color: #f6efe4; }
.ev-db { font-weight: 400; font-size: 14px; opacity: .8; }
.korabbiak { position: relative; }
.korabbiak summary {
  list-style: none; cursor: pointer; padding: 10px 18px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 9px; font-size: 16px; font-weight: 700; color: #4a3a2a;
}
.korabbiak summary::-webkit-details-marker { display: none; }
.korabbiak.active summary, .korabbiak[open] summary { background: var(--dark); color: #f6efe4; }
.korabbiak-lista {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 150px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(36,28,22,.18);
}
.korabbiak-lista a { padding: 9px 12px; min-height: 0; border-radius: 8px; }
.korabbiak-lista a:hover { background: var(--soft); }

.board { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 22px rgba(60,40,15,.06); overflow: hidden; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 18px; }
table.list th {
  background: var(--soft); color: var(--muted); text-align: left; font-weight: 700;
  padding: 12px 16px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; border-bottom: 2px solid var(--line);
}
table.list td { padding: 14px 16px; border-bottom: 1px solid var(--line2); }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:nth-child(even) { background: #fcfaf6; }
table.list td.date { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list td.name { font-weight: 700; }
table.list td.name .sub { display: block; font-weight: 400; font-size: 15px; color: var(--muted); margin-top: 2px; }
table.list td.place { color: var(--muted); }
table.list .r { text-align: right; }
table.list th.r { width: 26%; }
@media (max-width: 640px) { table.list th.r { width: auto; } }
.btn-result {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  background: #e7f2ea; color: #1f5f38 !important; font-size: 15px; font-weight: 700; text-decoration: none;
}
.btn-result:hover { background: #d4e9da; }
.btn-official { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--dark); color: #f6efe4 !important; font-size: 15px; font-weight: 700; text-decoration: none; }
.btn-official:hover { background: #3a2e24; }
.btn-doc { display: inline-block; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); color: var(--ink) !important; font-size: 15px; font-weight: 700; text-decoration: none; }
.results a { white-space: nowrap; }
.results { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 18px; }

/* Linkek */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 22px rgba(60,40,15,.06); overflow: hidden; }
.card-head { padding: 18px 20px; background: var(--dark); border-bottom: 3px solid #c4a273; }
.card-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: .02em; color: #fffdf8; }
.links { list-style: none; margin: 0; padding: 8px 8px 10px; }
.links a {
  display: flex; flex-direction: column; padding: 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line2);
}
.links li:last-child a { border-bottom: 0; }
.links a:hover { background: var(--soft); }
.links .t { font-size: 17px; font-weight: 700; }
.links .s { font-size: 14px; color: var(--muted); }

/* Kapcsolat */
.contact { background: var(--dark); color: #f6efe4; border-radius: 14px; padding: 22px 22px 24px; box-shadow: 0 10px 26px rgba(36,28,22,.25); }
.contact h2 { margin: 0 0 16px; font-size: 28px; font-weight: 800; color: #fffdf8; }
.contact-rows { display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; gap: 14px; align-items: center; }
.contact-row .ico {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px;
  background: #3a2e24; color: #e0bf86; display: flex; align-items: center; justify-content: center;
}
.contact-row .lbl { font-size: 14px; color: #c9b89e; }
.contact-row a { font-size: 18px; font-weight: 700; color: #fffdf8; text-decoration: none; overflow-wrap: anywhere; }
.contact-row a:hover { text-decoration: underline; }
.contact .btn-write {
  display: block; margin-top: 20px; text-align: center; padding: 14px; border-radius: 10px;
  background: #c4a273; color: var(--ink); font-size: 18px; font-weight: 800; text-decoration: none;
}
.contact .btn-write:hover { background: #d3b488; }

/* Lábléc */
.site-footer { margin-top: 56px; padding: 26px 0 30px; text-align: center; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .b { font-size: 20px; font-weight: 700; letter-spacing: .05em; }
.site-footer .s { font-size: 16px; margin-top: 4px; }
.site-footer a { color: inherit; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .brand img { height: 110px; }
  .brand-text .l1 { font-size: 32px; }
  .brand-text .l2 { font-size: 18px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-row { grid-template-columns: auto 1fr; gap: 10px 14px; }
  .brand-text { align-items: flex-start; text-align: left; }
  .brand-text .l1, .brand-text .l2 { white-space: normal; }
  .brand img { height: 80px; }
  .brand-text .l1 { font-size: 24px; }
  .brand-text .l2 { font-size: 14px; }
  .nav { justify-content: center; }
  .nav a { padding: 10px 12px; font-size: 16px; }
  h2.section-title { font-size: 30px; }
  .events { grid-template-columns: 1fr; }
  table.list { font-size: 16px; }
  table.list th, table.list td { padding-left: 8px; padding-right: 8px; }
  table.list { font-size: 15px; }
  .btn-result, .btn-official, .btn-doc { padding: 6px 8px; font-size: 13px; }
  table.list th.place, table.list td.place { display: none; }
}
