:root {
  --navy: #0B2C6B;
  --navy-dark: #071E4A;
  --cyan: #3D9FD4;
  --gold: #C4922E;
  --paper: #F4F7FB;
  --text: #1A2332;
  --muted: #4b5568;
  --line: #d5e0ee;
  --white: #fff;
  --danger: #b42318;
  --ok: #067647;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(7, 30, 74, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: #16468c; }
.wrap {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}
.wrap.narrow { width: min(640px, calc(100% - 32px)); }
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--cyan);
  color: var(--navy-dark);
  padding: 8px 12px;
  z-index: 20;
}
.skip-link:focus { left: 8px; }

.topbar {
  background: #050f24;
  color: #d7e4f4;
  font-size: .88rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}
.topbar a { color: #d7e4f4; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-home { opacity: .8; }
.auth-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-name { color: #fff; font-weight: 600; }
.btn-tiny {
  background: var(--cyan);
  color: var(--navy-dark) !important;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

.site-header {
  background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 58%, #16468c 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(5, 15, 36, .28);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  line-height: 0;
}
.brand-title {
  display: block;
  width: 180px;
  height: auto;
  max-width: 180px;
  margin: -10px 0;
  flex-shrink: 0;
  object-fit: contain;
  mix-blend-mode: screen;
}
.nav-toggle {
  display: none;
  background: var(--cyan);
  color: var(--navy-dark);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  justify-content: flex-end;
}
.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.main-nav .nav-cta {
  background: var(--cyan);
  color: var(--navy-dark);
}
.main-nav .nav-cta:hover,
.main-nav .nav-cta[aria-current="page"] {
  background: #6bb7de;
  color: var(--navy-dark);
}

.szabalyzat-embed {
  display: block;
  width: 100%;
  max-width: none;
  margin: 16px 0 32px;
  padding: 0 12px;
  box-sizing: border-box;
}
.szabalyzat-embed .sheet {
  display: block;
  width: min(190mm, 100%);
  max-width: 190mm;
  margin-left: auto !important;
  margin-right: auto !important;
}
.section { padding-top: 28px; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin: 0 0 .4em; }
h2 { font-size: 1.25rem; margin: 1.4em 0 .4em; }
.kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}
.lead { font-size: 1.08rem; color: var(--muted); }

.hero {
  background: linear-gradient(165deg, var(--navy-dark), var(--navy) 55%, #163f8a);
  color: #fff;
  padding: 42px 0 48px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  margin: 0 0 .2em;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.hero .kicker { color: var(--cyan); margin: 0 0 14px; }
.hero .lead { color: #d7e4f4; max-width: 46rem; }
.hero-actions, .hero-inner { }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  color: var(--navy-dark);
  font-weight: 800;
  text-decoration: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { filter: brightness(1.06); color: var(--navy-dark); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.45);
}
.btn-ghost:hover { border-color: #fff; color: #fff; }
.page-feltoltes .btn-ghost,
.page-belepes .btn-ghost,
.page-regisztracio .btn-ghost,
.page-megtekintes .btn-ghost,
.page-helyezes .btn-ghost,
.page-dobogo .btn-ghost,
.page-felhasznalok .btn-ghost {
  color: var(--navy);
  border-color: var(--navy);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: -28px;
  position: relative;
}
.facts-grid.compact {
  margin-top: 16px;
  grid-template-columns: repeat(2, 1fr);
}
.fact {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.fact span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.fact strong { color: var(--navy); }

.two-col {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 28px;
}
.rule-list { padding-left: 1.15em; }
.rule-list li { margin: .45em 0; }
.prizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 18px;
}
.prize {
  background: #fff8ea;
  border: 1px solid #ead8a8;
  border-radius: 12px;
  text-align: center;
  padding: 12px 8px;
}
.prize span { color: var(--muted); font-size: .85rem; }
.prize strong { display: block; color: var(--gold); font-size: 1.2rem; }

.cta-band {
  margin-top: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #d7e4f4; }

.flash {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.flash-ok { background: #e8f6ee; color: var(--ok); }
.flash-error { background: #fde8e6; color: var(--danger); }
.form-errors {
  background: #fde8e6;
  color: var(--danger);
  border-radius: 12px;
  padding: 12px 16px 12px 32px;
}
.card-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}
.card-form label { display: grid; gap: 6px; font-weight: 650; color: var(--navy); }
.card-form input[type="text"],
.card-form input[type="email"],
.card-form input[type="tel"],
.card-form input[type="date"],
.card-form input[type="password"],
.card-form select,
.card-form textarea,
.jury-inline input[type="text"],
.jury-comment-form textarea {
  width: 100%;
  border: 1px solid #c9d6e8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
}
.card-form input:focus,
.card-form textarea:focus {
  outline: 2px solid var(--cyan);
  border-color: var(--cyan);
}
.card-form small { font-weight: 400; color: var(--muted); }
.card-form .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  color: var(--text);
}
.card-form .check input { margin-top: 4px; }
.form-switch { margin-top: 16px; }

.prose p, .prose li { font-size: 1.02rem; }
.prose h2 {
  border-left: 4px solid var(--cyan);
  padding-left: 10px;
}
.contact-box {
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 24px;
}
.contact-box a { color: #fff; }
.contact-box p { margin: 0 0 6px; }

.dropzone {
  border: 2px dashed #9bb6d4;
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  background: #f7fbff;
  cursor: pointer;
  color: var(--navy);
}
.dropzone input { display: none; }
.dropzone span { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.dropzone.drag { background: #e7f4fc; border-color: var(--cyan); }
.file-preview { margin: 0; padding-left: 1.1em; color: var(--muted); }
.photo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.photo-grid li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.photo-grid img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #0b1a33;
}
.photo-grid figcaption {
  display: grid;
  gap: 2px;
  padding: 10px 12px 4px;
  font-size: .9rem;
}
.photo-grid .kep-cim { font-weight: 650; color: var(--navy); }
.photo-grid .kep-leiras {
  color: var(--text);
  font-weight: 400;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.photo-grid small { color: var(--muted); }
.delete-form { padding: 0 12px 12px; }
.btn-text {
  background: none;
  border: 0;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
}

.inline-form { display: inline; }
.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  background: #eef4fb;
  color: var(--navy);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-table tr:last-child td { border-bottom: 0; }
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.jury-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin: 18px 0 8px;
}
.jury-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.jury-tabs span { font-weight: 700; color: var(--navy); }
.jury-gallery {
  max-width: 1000px;
  margin: 20px auto 0;
  display: grid;
  gap: 36px;
}
.jury-versenyzo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 8px;
  box-shadow: var(--shadow);
}
.jury-versenyzo-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.jury-versenyzo-head h2 { margin: 0 0 8px; }
.jury-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.jury-meta-line { margin: 0; color: var(--muted); }
.jury-photo { margin: 0 0 28px; }
.jury-photo img {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
  background: #0b1a33;
  border-radius: 10px;
}
.jury-photo figcaption { display: grid; gap: 10px; padding: 12px 0 0; }
.jury-photo-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.jury-photo-tools .btn { padding: 8px 14px; font-size: .95rem; }
.jury-tech { margin: 0; color: var(--muted); font-size: .9rem; }
.jury-kep-cim { margin: 0; font-weight: 700; color: var(--navy); }
.jury-kep-leiras { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.jury-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.hely-form span { font-weight: 700; color: var(--navy); padding-bottom: 8px; }
.dij-form label { flex: 1; min-width: 180px; display: grid; gap: 4px; font-weight: 650; color: var(--navy); }
.badge {
  display: inline-flex;
  align-items: center;
  background: #e7f4fc;
  color: var(--navy);
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .85rem;
}
.badge[hidden],
.js-elojeloles-badge.is-off {
  display: none !important;
}
.badge-place { background: #fff3d6; color: #7a4d00; }
.badge-prize { background: #f3e8ff; color: #5b21b6; }
.jury-markers {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.jury-markers strong { color: var(--navy); }
.dobogo-votes {
  background: #fff8e8;
  border: 1px solid #f0e0b8;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.dobogo-votes p { margin: 0 0 6px; }
.dobogo-votes p:last-child { margin-bottom: 0; }
.jury-comments {
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 14px;
}
.jury-comments h3 { margin: 0 0 8px; font-size: 1rem; }
.jury-comments ul { margin: 0 0 12px; padding-left: 1.1em; }
.jury-comments li { margin: 0 0 14px; }
.jury-comments li p { margin: 4px 0 0; }
.jury-comment-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}
.jury-comment-role {
  background: #e7f4fc;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
}
.jury-comments small { color: var(--muted); }
.muted { color: var(--muted); }
.jury-comment-form { display: grid; gap: 8px; }
.jury-comment-form label { display: grid; gap: 6px; font-weight: 650; color: var(--navy); }
.jury-save-status {
  font-weight: 700;
  font-size: .9rem;
  color: var(--ok);
  align-self: center;
}
.jury-save-status.is-error { color: var(--danger); }
.js-ajax button:disabled { opacity: .65; cursor: wait; }

.site-footer {
  background: var(--navy-dark);
  color: #c5d3e6;
  padding: 20px 0;
  font-size: .92rem;
}
.site-footer a { color: #fff; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  line-height: 0;
  text-decoration: none;
}
.footer-logo:hover { opacity: .92; }
.footer-logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 180px;
}
.footer-copy { min-width: 0; }
.footer-inner p { margin: 0 0 6px; }
.footer-inner p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .facts-grid { grid-template-columns: 1fr 1fr; margin-top: 16px; }
  .two-col, .cta-band { grid-template-columns: 1fr; display: grid; }
}
.sponsor-grid {
  list-style: none;
  margin: 28px 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 100%;
  padding: 22px 18px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  text-decoration: none;
  color: var(--navy);
}
a.sponsor-card:hover {
  border-color: var(--cyan);
  color: var(--navy);
}
.sponsor-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 140px;
  padding: 8px;
  background: #fff;
}
.sponsor-logo img {
  max-width: 100%;
  max-height: 132px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.sponsor-card strong {
  font-size: 1.05rem;
  line-height: 1.3;
}

@media (max-width: 720px) {
  .sponsor-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .header-inner { flex-wrap: wrap; }
  .brand { flex: 1; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    background: rgba(0,0,0,.12);
    border-radius: 12px;
    padding: 8px;
  }
  .main-nav.open { display: flex; }
  .brand-title {
    width: 160px;
    max-width: calc(100vw - 120px);
    height: auto;
    margin: -8px 0;
  }
  .hero h1 { white-space: normal; }
  .facts-grid, .facts-grid.compact, .prizes { grid-template-columns: 1fr; }
  .topbar-inner { flex-direction: column; align-items: flex-start; padding: 8px 0; }
  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-logo img {
    height: 40px;
    max-width: 160px;
  }
}
