/* 1. CSS változók, reset */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

@font-face {
  font-family: 'Archia';
  src: url('../fonts/bold/archia-bold-webfont.eot');
  src: url('../fonts/bold/archia-bold-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/bold/archia-bold-webfont.woff2') format('woff2'),
    url('../fonts/bold/archia-bold-webfont.woff') format('woff'),
    url('../fonts/bold/archia-bold-webfont.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Archia';
  src: url('../fonts/regular/archia-regular-webfont.eot');
  src: url('../fonts/regular/archia-regular-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/regular/archia-regular-webfont.woff2') format('woff2'),
    url('../fonts/regular/archia-regular-webfont.woff') format('woff'),
    url('../fonts/regular/archia-regular-webfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --header-h: 7rem;
  --footer-h: 4rem;
  --font: 1rem;
  --font-sm: 0.8rem;
  --accent: #ffb74d;
  --accent-dark: #e69a2a;
  --bg-dark: #191919;
  --bg-card: rgba(255, 255, 255, 0.93);
  --text-dark: #1a1a1a;
  --text-muted: #555;
  --text-light: #efe5cf;
  --brown: #7a3f00;
  --brown-mid: #b56a1e;
  --radius: 12px;
  --margin: 1rem;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  --archia: 'Archia', sans-serif;  /* új: font var */
}

html {
  font-size: var(--font);
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Base */
.page-bg {
  position: fixed;
  inset: 0;
  background: url('../assets/background.webp') center / cover no-repeat;
  z-index: 0;
}

.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* Headings */
h1,
h2,
h3,
h4 {
  font-family: var(--archia);
  font-weight: bold;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  padding-bottom: 0.8rem;
  text-align: center;
}

h1 {
  position: relative;
  color: var(--text-light);
  font-size: clamp(0.95rem, 2vw, 1.5rem);
  white-space: nowrap;
  letter-spacing: 0.3px;
  cursor: default;
}

h2 {
  font-size: 1.5rem;
  color: var(--brown-mid);
  position: relative;
  margin-bottom: var(--margin);
}

h3 {
  font-size: .9rem;
  position: relative;
}

.h2-index {
  margin-top: var(--margin);
  z-index: 9999;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 8px 0;
}

.logo img {
  height: 100%;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 3px rgba(248, 247, 246, 0.8));
}

/* Nav (desktop) */
nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn,
.mobile-nav a {
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: smaller;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-btn:hover,
.mobile-nav a:hover,
.nav-btn.active,
.mobile-nav a.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-dark);
}

/* Hamburger (mobil) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: 0.3s;
}

/* Mobil menü */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-dark);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

/* Checkbox */
#menu-toggle {
  display: none;
}

#menu-toggle:checked ~ .mobile-nav {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

#menu-toggle:checked ~ header .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle:checked ~ header .hamburger span:nth-child(2) {
  opacity: 0;
}

#menu-toggle:checked ~ header .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Fő tartalom */
.index-h3 {
  margin-top: var(--margin);
  margin-bottom: var(--margin);
}

.content-wrapper {
  position: relative;
  z-index: 1;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  padding: 28px 16px calc(var(--footer-h) + 28px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: calc(var(--margin) * 1.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  border-left: 1px solid rgba(255, 255, 255, 0.45);
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  z-index: 1000;
}

/* Éremtábla */
.medal-bar {
  position: fixed;
  top: var(--header-h);
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: min(430px, calc(100% - 24px));
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
  padding: 0 0.8rem;
}

.medal-bar summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  font-size: var(--font-sm);
  list-style: none;
  user-select: none;
  gap: 10px;
}

.medal-bar summary::-webkit-details-marker {
  display: none;
}

.medal-bar summary::after {
  content: '▾';
  font-size: var(--font-sm);
  opacity: 0.6;
  transition: transform 0.2s;
}

.medal-bar[open] summary::after {
  transform: rotate(180deg);
}

.medal-summary-text {
  font-size: var(--font-sm);
  opacity: 0.85;
}

.medal-detail {
  padding: 0 14px 12px;
  font-size: var(--font-sm);
  line-height: 1.6;
}

.medal-detail > p:nth-child(4) {
  padding-top: 0.8rem;
}

.medal-detail p {
  margin-top: 6px;
}

/* Cikk */
.cikk-cim {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--margin);
}

.cikk-cim .cim-szoveg {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brown);
  padding-bottom: 8px;
  border-bottom: 3px solid var(--brown-mid);
  letter-spacing: 0.3px;
}

.cikk-datum {
  align-self: flex-end;
  margin-top: 6px;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-muted);
  font-family: Arial, Helvetica, sans-serif;
}

.cikk-szoveg {
  line-height: 1.7;
  margin-bottom: var(--margin);
}

.cikk-szoveg p {
  margin-bottom: var(--margin);
}

article {
  margin-bottom: calc(var(--margin) * 2);
}

/* Gombok */
.btn {
  display: block;
  width: fit-content;
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 7px;
  text-decoration: none;
  border: 2px solid var(--brown-mid);
  color: var(--brown);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--brown-mid);
  color: var(--text-light);
}

.btn-accent,
.btn-accent-rolunk {
  display: block;
  background: linear-gradient(90deg, #e27a02, #e7a03e);
  border-color: transparent;
  color: var(--text-light);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.btn-accent:hover,
.btn-accent-rolunk:hover {
  filter: brightness(1.06);
  color: var(--text-light);
}

.btn-accent-rolunk {
  margin: 0 auto;
  text-align: center;
}

/* Kártyák */
.card {
  background: #f5f7fa;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: var(--margin);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Kártyarács */
.card-grid,
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: calc(var(--margin) * 2);
}

.card ul {
  margin-top: 8px;
  text-align: center;
  line-height: 1.7;
  list-style-type: none;
}

.eredmeny-lista li:not(:last-child) {
  margin-bottom: var(--margin);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
}

.badge-gold {
  background: #fff4cc;
  color: #b89600;
}

.badge-silver {
  background: #e0e0e0;
  color: var(--text-muted);
}

.badge-bronze {
  background: #fbe5d6;
  color: #a65e2e;
}

/* Képek */
/*.img-row és .img-row-top összevonva (azonos volt) */
.img-row,
.img-row-top {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 22px 0;
  flex-wrap: wrap;
}

.img-row img,
.img-row-top img {
  border-radius: var(--radius);
  object-fit: cover;
}

.img-row-top img {
  width: 30%;
  max-width: 200px;
}

.img-row-5 img {
  width: 25%;
  max-width: 140px;
}

.img-row-3 img {
  width: 30%;
  max-width: 200px;
}

.img-row-2 img {
  width: 48%;
  max-width: 400px;
}

.img-row-1 img {
  width: 100%;
  max-width: 800px;
}

/* Galéria */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 20px 0;
}

.gallery-card {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-light);
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

.gallery-card:hover {
  transform: scale(1.03);
}

.gallery-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: background 0.3s;
}

.gallery-card:hover::before {
  background: rgba(0, 0, 0, 0.15);
}

.gallery-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
  font-size: 15px;
  z-index: 1;
}

/* Algaléria */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  padding: 10px 0;
}

.photo-grid img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s;
}

.photo-grid img:hover {
  transform: scale(1.04);
}

/* Galéria gomb */
.gallery-link-wrap {
  margin-top: var(--margin);
  display: flex;
  justify-content: center;
  margin-bottom: var(--margin);
}

.gallery-link-wrap a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--brown-mid);
  color: var(--text-light);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  border: none;
  transition: filter 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(122, 63, 0, 0.25);
}

.gallery-link-wrap a:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* LIGHTBOX – EGYSÉGESÍTETT STÍLUS
   Használat: #lightbox (JS-vezérelt, gallery.js)
   és .lightbox (CSS-osztály alapú, más oldalakon) */

/* --- Alap overlay --- */
#lightbox,
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  /* belépő animáció */
  animation: lb-fadein 0.22s ease;
}

/* JS-vezérelt nyitás: inline style="display:flex" */
/* CSS-osztály alapú nyitás: .lightbox.open */
.lightbox.open {
  display: flex;
}

@keyframes lb-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Kép --- */
#lightbox-img,
.lightbox-content {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  display: block;
  /* kép megjelenési animáció */
  animation: lb-imgpop 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lb-imgpop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Felirat / számláló */
#lightbox-caption {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  margin-top: 14px;
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
  user-select: none;
}

/*  Bezáró gomb (×) */
.close-lightbox,
.lb-close {
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  user-select: none;
  background: none;
  border: none;
  padding: 4px;
}

.close-lightbox:hover,
.lb-close:hover {
  color: #fff;
  transform: scale(1.15) rotate(90deg);
}

/* Navigációs nyilak */
.prev, .lb-prev,
.next, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 6px;
  user-select: none;
  transition: color 0.2s, background 0.2s;
}

.prev:hover, .lb-prev:hover,
.next:hover, .lb-next:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.prev, .lb-prev { left: 14px; }
.next, .lb-next { right: 14px; }

/* Reszponzív */
@media (max-width: 640px) {
  #lightbox-img,
  .lightbox-content {
    max-width: 95vw;
    max-height: 78vh;
  }

  .prev, .lb-prev { left: 4px;  padding: 10px 12px; }
  .next, .lb-next { right: 4px; padding: 10px 12px; }

  .close-lightbox,
  .lb-close {
    top: 12px;
    right: 14px;
    font-size: 1.7rem;
  }
}

/* Rólunk */
.rolunkh1 {
  color: inherit;
}

.logo-row {
  text-align: center;
}

.logo-row img {
  height: auto;
  width: auto;
}

.about-quote {
  text-align: center;
  font-style: italic;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 10px 0 4px;
}

.about-quote-attr {
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: var(--margin);
  font-style: italic;
}

.about-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: var(--margin);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.about-section h3 {
  margin: var(--font);
}

.about-section p {
  margin: 0;
  line-height: 1.8;
}

.about-join {
  text-align: center;
  padding: 24px 16px;
}

.about-join p {
  line-height: 1.8;
}

/* Kapcsolat */
table,
th,
td {
  border: none !important;
}

.contact-table {
  margin-top: var(--margin);
  width: 100%;
  border-collapse: collapse;
}

.contact-table td {
  padding: 9px 0;
  vertical-align: top;
}

.contact-table td:first-child {
  font-weight: 700;
  color: var(--brown);
  width: 150px;
}

.first-h4 {
  margin-top: var(--margin);
}

table {
  margin-bottom: var(--margin);
}

a[href^="mailto:"],
a[href^="tel:"] {
  color: var(--text-dark);
  font-style: italic;
  text-decoration: none;
}

a[href^="mailto:"]:hover,
a[href^="tel:"]:hover {
  color: var(--brown-mid);
}

/* Naptár */
.calendar-wrap {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.calendar-wrap iframe {
  display: block;
  width: 100%;
  height: 580px;
  border: 0;
  overflow: hidden;
}

/* Section fejléc */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  color: var(--brown);
  margin: 24px 0 16px;
}

.section-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--margin);
}

/* Back gomb */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: var(--margin);
  margin-top: var(--margin);
  transition: background 0.2s;
}

.back-link:hover {
  background: var(--accent);
  color: var(--text-dark);
}

/* =====================
   MEDIA QUERIES
   - 1024px : tablet (nav elrejtés, hamburger)
   - 640px  : mobil (layout, padding, képek)
   - 2561px : 4K
   ===================== */

@media (max-width: 1024px) {
  nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: .9rem;
  }

  h2,
  .h2-index {
    font-size: 1.2rem;
  }

  .logo img {
    height: 80%;
  }

  .container {
    padding: 20px 16px;
  }

  .img-float-right,
  .img-float-left {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 14px 0;
  }

  .img-row-3 img,
  .img-row-top img {
    width: 45%;
  }

  .medal-bar {
    width: calc(100% - var(--font));
  }

  .cikk-cim .cim-szoveg {
    font-size: 1.2rem;
  }

  .card-grid .card,
  .result-grid .card {
    flex-basis: 100%;
  }

  .contact-table tr {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
  }

  .contact-table td {
    border-bottom: none;
    padding: 2px 0;
    width: 100% !important;
  }

  .contact-table td:first-child {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
  }

  .lightbox-content {
    max-width: 95%;
  }

  .prev,
  .next {
    padding: 10px;
  }

  .prev {
    left: 5px;
  }

  .next {
    right: 5px;
  }
}

@media (min-width: 2561px) {
  .container {
    margin-top: 18rem;
  }
}