/* Popup modal — ana sayfada açılır. */

.popup {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
  animation: popup-fade 220ms var(--ease-out);
}

.popup[hidden] { display: none; }

@keyframes popup-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.popup__box {
  position: relative;
  background: var(--surface-1);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - var(--sp-lg));
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
  animation: popup-slide 260ms var(--ease-out);
}

/* Metin+resim popup'ta resim üstte, tam genişlik, doğal oran korunur */
.popup__box > .popup__image {
  max-width: 100%;
  max-height: 60vh;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--surface-2);
  display: block;
}

@keyframes popup-slide {
  from { transform: translateY(20px) scale(0.96); }
  to   { transform: translateY(0) scale(1); }
}

.popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.popup__close:hover {
  background: #fff;
  transform: scale(1.08);
}

/* Sadece resim (başlık/link yok) — box resmin doğal oranına göre boyutlanır */
.popup--image-only .popup__box {
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  width: auto;
  max-width: min(90vw, 900px);
  max-height: 92vh;
  display: inline-block;
}
.popup--image-only .popup__image {
  width: auto;
  height: auto;
  max-width: min(90vw, 900px);
  max-height: 92vh;
  object-fit: contain;
  background: var(--surface-1);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: block;
}

.popup__body {
  padding: var(--sp-lg);
  overflow-y: auto;
}

.popup__title {
  margin: 0 0 var(--sp-sm);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.popup__content {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.55;
}

.popup__content p:not(:last-child) { margin-bottom: var(--sp-sm); }
.popup__content a {
  color: var(--brand-green);
  text-decoration: underline;
}

.popup__actions {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.popup__cta,
.popup__ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 var(--sp-md);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--dur-fast) var(--ease-out);
  text-decoration: none;
}

.popup__cta {
  background: var(--brand-green);
  color: #fff;
}
.popup__cta:hover { background: var(--brand-green-dark); }

.popup__ok {
  background: var(--surface-2);
  color: var(--text-primary);
}
.popup__ok:hover { background: var(--surface-3); }

/* Body scroll lock while open */
body.popup-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 560px) {
  .popup__box { max-width: 100%; }
  .popup__image { max-height: 220px; }
  .popup__body { padding: var(--sp-md); }
  .popup__title { font-size: 18px; }
  .popup__content { font-size: 14px; }
  .popup__actions { justify-content: stretch; }
  .popup__cta, .popup__ok { flex: 1; }
}

/* ==============================================================
   Popup — Ferienzeit-Vorlage (Slot 1, feste Struktur, editierbare Zeiten)
   ============================================================== */
.popup--ferien .popup__box.popup-ferien {
  background: #fff;
  border: 3px double #2f7a3b;
  border-radius: 4px;
  max-width: 460px;
  width: 100%;
  padding: 0;
  overflow: visible;
}

.popup-ferien__inner {
  padding: 20px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.popup-ferien__crown {
  display: flex;
  justify-content: center;
  margin-top: -2px;
}
.popup-ferien__trees { width: 92px; height: 46px; display: block; }

.popup-ferien__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.popup-ferien__brand-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 12px/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 4px;
  color: #1c1c1c;
}
.popup-ferien__rule {
  display: inline-block;
  width: 40px;
  height: 1.5px;
  background: #1c1c1c;
}
.popup-ferien__logo {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
}

.popup-ferien__title {
  margin: 4px 0 6px;
  font: 700 17px/1.25 "Helvetica Neue", Arial, sans-serif;
  color: #2f7a3b;
  text-transform: uppercase;
  text-align: left;
  letter-spacing: 0.3px;
}

.popup-ferien__table {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid #d4d4d4;
}
.popup-ferien__row {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid #d4d4d4;
  gap: 12px;
}
.popup-ferien__day {
  font: 700 17px/1 "Helvetica Neue", Arial, sans-serif;
  color: #2f7a3b;
}
.popup-ferien__hours {
  font: 500 17px/1.2 "Helvetica Neue", Arial, sans-serif;
  color: #1c1c1c;
}
.popup-ferien__hours--closed {
  font-weight: 700;
  letter-spacing: 0.6px;
}

.popup-ferien__footer {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding-top: 6px;
}
.popup-ferien__sun,
.popup-ferien__palm {
  width: 44px;
  height: 52px;
  display: block;
}
.popup-ferien__msg {
  text-align: center;
  font: 400 13px/1.5 "Helvetica Neue", Arial, sans-serif;
  color: #1c1c1c;
}
.popup-ferien__msg::first-line {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-style: italic;
  font-size: 18px;
  color: #2f7a3b;
}

.popup-ferien__actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.popup-ferien__btn {
  min-width: 140px;
  background: #2f7a3b;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}
.popup-ferien__btn:hover { background: #235a2c; }

/* Ferien mobile */
@media (max-width: 560px) {
  .popup--ferien .popup__box.popup-ferien { max-width: 92vw; }
  .popup-ferien__inner { padding: 16px 18px 20px; gap: 12px; }
  .popup-ferien__title { font-size: 15px; }
  .popup-ferien__day,
  .popup-ferien__hours { font-size: 15px; }
  .popup-ferien__row { grid-template-columns: 60px 1fr; padding: 8px 2px; }
  .popup-ferien__logo { max-width: 220px; }
  .popup-ferien__footer { grid-template-columns: 36px 1fr 36px; }
  .popup-ferien__sun, .popup-ferien__palm { width: 36px; height: 44px; }
  .popup-ferien__msg { font-size: 12px; }
  .popup-ferien__msg::first-line { font-size: 16px; }
}

/* ==============================================================
   Popup — Willkommen-Vorlage (Slot 2)
   ============================================================== */
.popup--welcome .popup__box.popup-welcome {
  background: #fff;
  border-radius: 10px;
  max-width: 480px;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.popup-welcome__left {
  position: relative;
  padding: 26px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.popup-welcome__leaf {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}
.popup-welcome__brand { position: relative; z-index: 1; }
.popup-welcome__logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
}
.popup-welcome__divider {
  height: 12px;
  margin: 2px 0 6px;
  position: relative;
  z-index: 1;
}
.popup-welcome__divider svg { width: 100%; height: 100%; display: block; }

.popup-welcome__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}
.popup-welcome__title-top,
.popup-welcome__title-bot {
  font-size: 22px;
  font-weight: 400;
  color: #1c1c1c;
}
.popup-welcome__title-accent {
  font-size: 40px;
  font-weight: 700;
  color: #2f7a3b;
  line-height: 1;
}

.popup-welcome__body {
  margin: 8px 0 4px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  position: relative;
  z-index: 1;
}

.popup-welcome__phone {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.popup-welcome__phone-label {
  font-size: 14px;
  color: #333;
}
.popup-welcome__phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2f7a3b;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
}
.popup-welcome__phone-link svg {
  background: #2f7a3b;
  color: #fff;
  border-radius: 50%;
  padding: 5px;
  width: 26px;
  height: 26px;
}

.popup-welcome__btn {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #2f7a3b;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 150ms ease;
  position: relative;
  z-index: 1;
}
.popup-welcome__btn:hover { background: #235a2c; }

/* Welcome mobile */
@media (max-width: 620px) {
  .popup--welcome .popup__box.popup-welcome { max-width: 92vw; }
  .popup-welcome__left { padding: 20px 20px 22px; }
  .popup-welcome__leaf { display: none; }
  .popup-welcome__title-top,
  .popup-welcome__title-bot { font-size: 18px; }
  .popup-welcome__title-accent { font-size: 32px; }
  .popup-welcome__logo { max-width: 170px; }
  .popup-welcome__phone-link { font-size: 18px; }
}

/* ==============================================================
   Popup — Geschlossene Gesellschaft (Slot 3, Holz + Schild)
   ============================================================== */
.popup--closed .popup__box.popup-closed {
  background:
    repeating-linear-gradient(90deg, #6a3b1e 0 40px, #5a3018 40px 42px, #6a3b1e 42px 80px, #4d2a15 80px 82px),
    #6a3b1e;
  background-size: 120px 100%, 100% 100%;
  border-radius: 6px;
  padding: 40px 30px;
  max-width: 480px;
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5), inset 0 0 60px rgba(0,0,0,0.35);
  overflow: hidden;
}

.popup-closed__sign {
  position: relative;
  background: #f6efd8;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.03) 0 6px, transparent 8px),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.04) 0 8px, transparent 10px),
    radial-gradient(circle at 60% 20%, rgba(0,0,0,0.02) 0 5px, transparent 7px);
  width: 100%;
  min-height: 220px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: rotate(-1.5deg);
  box-shadow:
    0 12px 24px rgba(0,0,0,0.35),
    inset 0 0 20px rgba(120,80,30,0.15);
  border: 1px solid rgba(120,80,30,0.15);
}

.popup-closed__nail {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, #8b6a3a 0%, #4a3418 70%, #2c1e0a 100%);
  border-radius: 50%;
  box-shadow: 0 2px 3px rgba(0,0,0,0.5);
}
.popup-closed__nail--tl { top: 10px; left: 10px; }
.popup-closed__nail--tr { top: 10px; right: 10px; }
.popup-closed__nail--bl { bottom: 10px; left: 10px; }
.popup-closed__nail--br { bottom: 10px; right: 10px; }

.popup-closed__line {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 34px;
  font-weight: 700;
  color: #5a3018;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.5px;
}
.popup-closed__line--big {
  font-size: 46px;
  font-weight: 800;
}

/* Closed mobile */
@media (max-width: 560px) {
  .popup--closed .popup__box.popup-closed { max-width: 92vw; padding: 28px 20px; }
  .popup-closed__sign { min-height: 180px; padding: 24px 18px; }
  .popup-closed__line { font-size: 26px; }
  .popup-closed__line--big { font-size: 36px; }
}
