/* ---------------------------------------------------------------
   zsupteto.hu — alap stíluslap
   Paletta a fotóról: szalma, meszelt fal, árnyék a tető alatt.
   --------------------------------------------------------------- */

:root {
  --szalma: #faf2dc;
  --szalma-melyebb: #f0e0b6;
  --mesz: #fffcf4;
  --okker: #b57a12;
  --okker-melyebb: #8a5a0b;
  --fold: #3b2f20;
  --fold-halvany: #7a6a52;
  --vonal: rgba(59, 47, 32, 0.16);

  --meret-sor: 1.65;
  --sugar: 2px;
  --oldal: clamp(1.25rem, 5vw, 4rem);
  --max: 76rem;

  --arnyek:
    0 1px 2px rgba(59, 47, 32, 0.08), 0 8px 24px -16px rgba(59, 47, 32, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--szalma);
  color: var(--fold);
  font-family:
    "Karla",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: var(--meret-sor);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
}
h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.1em;
  max-width: 68ch;
}
strong {
  font-weight: 700;
}

a {
  color: var(--okker-melyebb);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--fold);
}

:focus-visible {
  outline: 3px solid var(--okker);
  outline-offset: 3px;
  border-radius: var(--sugar);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 1000;
  background: var(--mesz);
  padding: 0.6rem 1rem;
  border: 1px solid var(--vonal);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0.75rem;
}

/* --- Hero ---------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(92svh, 46rem);
  display: flex;
  align-items: flex-end;
  padding: calc(env(safe-area-inset-top, 0px) + 2rem) var(--oldal)
    clamp(2rem, 6vh, 4.5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--szalma-melyebb);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to top,
      rgba(38, 28, 14, 0.88) 0%,
      rgba(38, 28, 14, 0.62) 30%,
      rgba(38, 28, 14, 0.18) 58%,
      rgba(38, 28, 14, 0) 80%
    ),
    linear-gradient(
      to bottom,
      rgba(38, 28, 14, 0.35) 0%,
      rgba(38, 28, 14, 0) 22%
    );
}

.hero__bar {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 1.1rem);
  left: 0;
  right: 0;
  padding-inline: max(var(--oldal), calc((100% - var(--max)) / 2));
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: #fff8e7;
  font-size: 0.9rem;
}
.hero__wordmark {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero__bar a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 248, 231, 0.5);
  padding-bottom: 2px;
}
.hero__bar a:hover {
  border-color: #fff;
}

.hero__body {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  color: #fff8e7;
  animation: elotunik 0.8s ease-out both;
}

@keyframes elotunik {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: clamp(3rem, 1.4rem + 11vw, 8.5rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin: 0 0 0.35em;
  text-shadow: 0 2px 30px rgba(30, 20, 8, 0.35);
}

.hero__lead {
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.35rem);
  max-width: 34ch;
  color: #fbf0d8;
  margin-bottom: 1.6rem;
}

.hero__cue {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff8e7;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 248, 231, 0.45);
  padding-bottom: 0.35rem;
  font-weight: 500;
}
.hero__cue:hover {
  color: #fff;
  border-color: #fff;
}
.hero__cue svg {
  flex: none;
}

/* --- Bevezető + tények --------------------------------------- */

.intro {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3rem, 8vh, 6rem) var(--oldal) clamp(1rem, 3vh, 2rem);
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.intro__text p {
  font-size: 1.05em;
}

.facts {
  background: var(--mesz);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  padding: 1.5rem 1.5rem 0.5rem;
  align-self: start;
  box-shadow: var(--arnyek);
}

.facts__title {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.facts dl {
  margin: 0;
}
.facts dl > div {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--vonal);
}
.facts dl > div:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.facts dt {
  font-size: 0.82rem;
  color: var(--fold-halvany);
}
.facts dd {
  margin: 0;
  font-weight: 500;
}

@media (min-width: 62rem) {
  .intro {
    grid-template-columns: minmax(0, 1.75fr) minmax(16rem, 0.85fr);
  }
}

/* --- Lépések -------------------------------------------------- */

.steps {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(2rem, 6vh, 4rem) var(--oldal);
}

.steps__list {
  list-style: none;
  counter-reset: lepes;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.steps__list li {
  counter-increment: lepes;
  padding-top: 1.1rem;
  border-top: 2px solid var(--okker);
}

.steps__list li::before {
  content: counter(lepes);
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  color: var(--okker);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.steps__list p {
  margin-bottom: 0;
  color: var(--fold-halvany);
}

@media (min-width: 48rem) {
  .steps__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* --- Térkép --------------------------------------------------- */

.map-section {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(2rem, 6vh, 4rem) var(--oldal) clamp(3rem, 8vh, 5rem);
}

.map-section__head {
  margin-bottom: 1.75rem;
}

.map-layout {
  display: grid;
  gap: 1.25rem;
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  overflow: hidden;
  background: var(--mesz);
  box-shadow: var(--arnyek);
}

#map {
  height: clamp(20rem, 56svh, 34rem);
  width: 100%;
  background: var(--szalma-melyebb);
  z-index: 0;
}

.places {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.places__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0 0.9rem;
  flex-wrap: wrap;
}

.places__bar input {
  flex: 1 1 12rem;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  background: var(--szalma);
  color: inherit;
}
.places__bar input::placeholder {
  color: var(--fold-halvany);
}

.places__count {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fold-halvany);
}

.places__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 22rem;
  border-top: 1px solid var(--vonal);
}

.places__list li {
  border-bottom: 1px solid var(--vonal);
}

.places__list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  padding: 0.85rem 0.35rem;
  cursor: pointer;
}
.places__list button:hover {
  background: var(--szalma);
}
.places__list button[aria-current="true"] {
  background: var(--szalma-melyebb);
}

.places__name {
  display: block;
  font-weight: 700;
}
.places__where {
  display: block;
  font-size: 0.85rem;
  color: var(--fold-halvany);
}

@media (min-width: 62rem) {
  .map-layout {
    grid-template-columns: minmax(0, 0.7fr) minmax(19rem, 1fr);
    gap: 0;
  }
  #map {
    height: 38rem;
    order: 2;
  }
  .places {
    order: 1;
    border-right: 1px solid var(--vonal);
    padding-top: 1rem;
    height: 38rem;
  }
  .places__list {
    max-height: none;
    flex: 1;
  }
}

.map-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--fold-halvany);
  background: var(--szalma-melyebb);
  border-radius: var(--sugar);
  padding: 0.7rem 0.9rem;
}

/* Leaflet apróbb igazítások */
.leaflet-container {
  font: inherit;
  font-size: 0.95rem;
  background: var(--szalma-melyebb);
}
.leaflet-popup-content-wrapper {
  border-radius: var(--sugar);
  background: var(--mesz);
  color: var(--fold);
}
.leaflet-popup-content {
  margin: 0.9rem 1rem;
  line-height: 1.5;
}
.leaflet-popup-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.leaflet-popup-content p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}
.popup__kep {
  display: block;
  width: calc(100% + 2rem);
  max-width: none;
  max-height: 11rem;
  object-fit: cover;
  margin: -0.9rem -1rem 0.8rem;
  border-radius: var(--sugar) var(--sugar) 0 0;
}
.leaflet-popup-tip {
  background: var(--mesz);
}
.leaflet-bar a {
  color: var(--fold);
}

.jelolo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.jelolo span {
  width: 15px;
  height: 15px;
  background: var(--okker);
  border: 3px solid var(--mesz);
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(45, 33, 12, 0.5);
}
.jelolo--aktiv span {
  background: var(--fold);
  transform: scale(1.25);
}

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

.cta {
  background: var(--szalma-melyebb);
  border-top: 1px solid var(--vonal);
  border-bottom: 1px solid var(--vonal);
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--oldal);
  text-align: center;
}
.cta h2 {
  margin-bottom: 0.4em;
}
.cta p {
  margin-inline: auto;
}

.button {
  display: inline-block;
  background: var(--fold);
  color: var(--szalma);
  padding: 0.8rem 1.5rem;
  border-radius: var(--sugar);
  text-decoration: none;
  font-weight: 700;
  border: 0;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.button:hover {
  background: var(--okker-melyebb);
  color: #fff;
}
.button[disabled] {
  opacity: 0.55;
  cursor: progress;
}
.button--secondary {
  background: transparent;
  color: var(--fold);
  border: 1px solid var(--vonal);
}
.button--secondary:hover {
  background: var(--szalma-melyebb);
  color: var(--fold);
}
.button--danger {
  background: #8c3828;
  color: #fff;
}
.button--danger:hover {
  background: #6a2a1e;
}

.footer {
  max-width: var(--max);
  margin-inline: auto;
  padding: 2.5rem var(--oldal) calc(env(safe-area-inset-bottom, 0px) + 3rem);
  font-size: 0.88rem;
  color: var(--fold-halvany);
}
.footer p {
  margin: 0 0 0.3em;
}

/* --- Admin ---------------------------------------------------- */

.admin {
  max-width: 54rem;
  margin-inline: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 2.5rem) var(--oldal)
    calc(env(safe-area-inset-bottom, 0px) + 4rem);
}

.admin__head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.admin__head h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  margin: 0;
}
.admin__head a {
  font-size: 0.9rem;
}

.panel {
  background: var(--mesz);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--arnyek);
  margin-bottom: 2rem;
}

.mezok {
  display: grid;
  gap: 1rem;
}
@media (min-width: 40rem) {
  .mezok--ketto {
    grid-template-columns: 1fr 1fr;
  }
}

.mezo {
  display: grid;
  gap: 0.35rem;
}
.mezo label {
  font-size: 0.85rem;
  color: var(--fold-halvany);
}
.mezo input,
.mezo textarea,
.mezo select {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  background: var(--szalma);
  color: inherit;
  width: 100%;
}
.mezo textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.mezo__sugo {
  font-size: 0.8rem;
  color: var(--fold-halvany);
  margin: 0;
}

.admin__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.uzenet {
  padding: 0.8rem 1rem;
  border-radius: var(--sugar);
  margin: 1rem 0 0;
  font-size: 0.92rem;
}
.uzenet--ok {
  background: #e6efd9;
  border: 1px solid #b6cc93;
  color: #3b4a24;
}
.uzenet--hiba {
  background: #f6dfd6;
  border: 1px solid #dba891;
  color: #6a2f19;
}

.lista {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lista li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--vonal);
}
.lista li:last-child {
  border-bottom: 0;
}
.lista__nev {
  font-weight: 700;
  display: block;
}
.lista__hely {
  font-size: 0.85rem;
  color: var(--fold-halvany);
}
.lista__szerkesztes {
  flex: 1;
  min-width: 0;
  padding: 0.25rem;
  margin: -0.25rem;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--sugar);
  font: inherit;
  cursor: pointer;
}
.lista__szerkesztes:hover,
.lista__szerkesztes[aria-current="true"] {
  color: var(--okker-melyebb);
}

.torles {
  background: none;
  border: 1px solid var(--vonal);
  color: var(--fold-halvany);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--sugar);
  cursor: pointer;
  flex: none;
}
.torles:hover {
  border-color: #b4553a;
  color: #b4553a;
}

.valaszto-terkep {
  height: 18rem;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  background: var(--szalma-melyebb);
  z-index: 0;
}

.foto-elozetes {
  display: block;
  width: min(100%, 28rem);
  max-height: 18rem;
  object-fit: cover;
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  background: var(--szalma-melyebb);
}

.places__empty {
  padding: 1rem 0.35rem;
  color: var(--fold-halvany);
  font-size: 0.92rem;
}
.popup__hely {
  color: var(--fold-halvany);
  font-size: 0.85rem !important;
}
