/* Állat Apróhirdetés — restaurált archívum
   Palette derives from the original js_jamba "style3" template:
   header green #2E8344, hover slate #335a74, pale slogan #abccd6.
   Modernised onto a warm paper canvas instead of the 2009 dark-grey box. */

:root {
  --zold-900: #16351f;
  --zold-700: #1f5c33;
  --zold-600: #276b3b;
  --zold-500: #2f7d46;
  --zold-400: #46975c;
  --zold-100: #dff0e2;
  --zold-50:  #eef7ef;

  --agyag-600: #a34a1f;
  --agyag-500: #c4622d;
  --agyag-100: #f7e5d9;

  --papir:     #fbf7ef;
  --papir-2:   #f4eee1;
  --feher:     #ffffff;

  --tinta:     #24301f;
  --tinta-70:  #4d5a48;
  --tinta-45:  #7a8474;
  --vonal:     #e0d9c8;

  --palakek:   #335a74;
  --jeg:       #abccd6;

  --sugar:     10px;
  --sugar-sm:  6px;
  --arnyek:    0 1px 2px rgba(36, 48, 31, .06), 0 6px 18px rgba(36, 48, 31, .07);
  --arnyek-sm: 0 1px 2px rgba(36, 48, 31, .07);
  --max:       1180px;
}

/* Safeguard: content is never hidden waiting on JS. Any reveal animation
   is progressive enhancement only. */
[data-aos] { opacity: 1 !important; transform: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--papir);
  color: var(--tinta);
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: Bitter, Georgia, "Times New Roman", serif;
  color: var(--zold-900);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.01em;
}

a { color: var(--zold-600); text-decoration: none; }
a:hover { color: var(--palakek); text-decoration: underline; text-underline-offset: 2px; }

.burok { max-width: var(--max); margin: 0 auto; padding: 0 20px; width: 100%; }

/* ---------- fejléc ---------- */

.fejlec {
  background: linear-gradient(180deg, var(--zold-600) 0%, var(--zold-700) 100%);
  border-bottom: 4px solid var(--agyag-500);
  color: #fff;
}

.fejlec-belso {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 0 20px;
}

.jelvenyek { display: flex; align-items: center; gap: 12px; min-width: 0; }

.cimer {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
  font-family: Bitter, Georgia, serif; font-weight: 700; font-size: 22px; color: #fff;
}

.markanev { min-width: 0; }
.markanev .nev {
  display: block;
  font-family: Bitter, Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  color: #fff; line-height: 1.1; letter-spacing: -.015em;
}
.markanev .nev:hover { color: #fff; text-decoration: none; }
.markanev .mottó, .markanev .motto {
  display: block; margin-top: 4px;
  color: var(--jeg); font-size: .93rem; font-style: italic; line-height: 1.35;
}

.archiv-jelzo {
  margin-left: auto;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; white-space: nowrap;
}

/* ---------- navigáció ----------
   Custom flex nav: min-width:0 + flex-wrap so a long Hungarian category list
   can never be pushed past the viewport and clipped. Never position:fixed. */

.fonav {
  background: var(--zold-900);
  position: static;
}

.fonav-lista {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 2px 0;
  padding: 6px 0;
  list-style: none;
  margin: 0;
}

.fonav-lista li { min-width: 0; }

.fonav-lista a {
  display: block;
  padding: 8px 13px;
  color: #d8e7d9;
  font-size: .93rem;
  font-weight: 600;
  border-radius: var(--sugar-sm);
  white-space: nowrap;
}
.fonav-lista a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.fonav-lista a.aktiv { background: var(--agyag-500); color: #fff; }

.nav-gomb {
  display: none;
  width: 100%;
  margin: 6px 0;
  padding: 9px 13px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  border-radius: var(--sugar-sm);
  font: inherit; font-weight: 600;
  cursor: pointer;
  text-align: left;
}

/* ---------- morzsa ---------- */

.morzsa { padding: 14px 0 0; font-size: .88rem; color: var(--tinta-45); }
.morzsa a { color: var(--tinta-70); }
.morzsa span { padding: 0 7px; color: var(--vonal); }

/* ---------- hős kép ---------- */

.hos { margin: 18px 0 4px; }
.hos img {
  display: block; width: 100%;
  border-radius: var(--sugar);
  box-shadow: var(--arnyek);
  border: 1px solid var(--vonal);
}

/* ---------- elrendezés ---------- */

.torzs { padding: 8px 0 56px; }

.racs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

@media (min-width: 1024px) {
  .racs { grid-template-columns: minmax(0, 1fr) 308px; gap: 42px; }
}

.cikk {
  background: var(--feher);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  box-shadow: var(--arnyek-sm);
  padding: 30px 32px 34px;
  min-width: 0;
}

@media (max-width: 640px) { .cikk { padding: 22px 20px 26px; } }

.cikk h1 { font-size: clamp(1.7rem, 4.4vw, 2.45rem); margin: 0 0 18px; }
.cikk h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  margin: 34px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--zold-100);
}
.cikk h3 { font-size: 1.14rem; margin: 24px 0 8px; color: var(--zold-700); }
.cikk p { margin: 0 0 15px; }
.cikk ul, .cikk ol { margin: 0 0 18px 0; padding-left: 0; list-style: none; }
.cikk ol { counter-reset: sor; }
.cikk li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.cikk ul > li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--agyag-500); transform: rotate(45deg);
}
.cikk ol > li { counter-increment: sor; }
.cikk ol > li::before {
  content: counter(sor) ".";
  position: absolute; left: 0; top: 0;
  color: var(--agyag-600); font-weight: 700;
}
.cikk strong { color: var(--zold-900); }
.cikk a[target="_blank"]::after {
  content: "↗"; font-size: .72em; margin-left: 3px;
  color: var(--tinta-45); vertical-align: super;
}

.bevezeto {
  font-size: 1.1rem;
  color: var(--tinta-70);
  border-left: 4px solid var(--agyag-500);
  padding-left: 16px;
  margin-bottom: 24px;
}

/* ---------- oldalsáv ---------- */

.oldalsav { min-width: 0; display: grid; gap: 20px; }

.doboz {
  background: var(--papir-2);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  padding: 20px 20px 22px;
}
.doboz.kiemelt { background: var(--zold-50); border-color: var(--zold-100); }

.doboz h2 {
  font-size: 1rem; margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--zold-700);
}

.doboz p { font-size: .93rem; color: var(--tinta-70); margin: 0 0 10px; }
.doboz p:last-child { margin-bottom: 0; }

.kat-lista { list-style: none; margin: 0; padding: 0; }
.kat-lista li { border-bottom: 1px dotted var(--vonal); }
.kat-lista li:last-child { border-bottom: 0; }
.kat-lista a {
  display: block; padding: 8px 2px;
  font-size: .95rem; font-weight: 600; color: var(--tinta);
}
.kat-lista a:hover { color: var(--zold-600); text-decoration: none; padding-left: 5px; transition: padding-left .15s ease; }
.kat-lista a.aktiv { color: var(--agyag-600); }

/* ---------- kategória kártyák ---------- */

.kartyak {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 22px 0 8px;
}

.kartya {
  display: block;
  background: var(--papir-2);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  padding: 16px 18px 18px;
  color: var(--tinta);
  animation: felbukkan .45s ease both;
}
.kartya:hover {
  text-decoration: none;
  border-color: var(--zold-400);
  background: var(--zold-50);
  transform: translateY(-2px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.kartya .cim { display: block; font-family: Bitter, Georgia, serif; font-weight: 700; color: var(--zold-800, var(--zold-700)); margin-bottom: 5px; }
.kartya .leiras { display: block; font-size: .9rem; color: var(--tinta-70); line-height: 1.5; }

@keyframes felbukkan { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .kartya { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- lábléc ---------- */

.lablec {
  background: var(--zold-900);
  color: #c3d4c5;
  padding: 40px 0 26px;
  font-size: .93rem;
}
.lablec h2 {
  color: #fff; font-size: .95rem; text-transform: uppercase;
  letter-spacing: .07em; margin: 0 0 12px;
}
.lablec a { color: #c3d4c5; }
.lablec a:hover { color: #fff; }
.lablec ul { list-style: none; margin: 0; padding: 0; }
.lablec li { margin-bottom: 6px; }

.lablec-racs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
}

.lablec-zaras {
  margin-top: 30px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .86rem; color: #9db09f;
}
.lablec-zaras p { margin: 0 0 5px; }

/* ---------- 404 ---------- */

.hiba { text-align: center; padding: 60px 0 40px; }
.hiba .kod {
  font-family: Bitter, Georgia, serif; font-weight: 700;
  font-size: clamp(4rem, 16vw, 8rem); line-height: 1;
  color: var(--zold-100);
}
.hiba h1 { margin: 6px 0 14px; }
.hiba p { color: var(--tinta-70); max-width: 620px; margin: 0 auto 14px; }

.gomb {
  display: inline-block;
  background: var(--agyag-500);
  color: #fff; font-weight: 700;
  padding: 11px 22px;
  border-radius: 999px;
  margin-top: 10px;
}
.gomb:hover { background: var(--agyag-600); color: #fff; text-decoration: none; }

/* ---------- mobil ---------- */

@media (max-width: 900px) {
  .nav-gomb { display: block; }
  .fonav-lista { display: none; }
  .fonav-lista.nyitva { display: flex; flex-direction: column; padding-bottom: 10px; }
  .fonav-lista.nyitva a { white-space: normal; }
  .archiv-jelzo { margin-left: 0; }
}
