/* =====================================================
   TELVE – MAIN STYLES (clean, single hero logic)
   White + Telve tone • Modern • Responsive hero-grid
   ===================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Variables ---------- */
:root{
  --telve:#b08a3e;
  --telve-deep:#8f6c2f;
  --telve-soft:rgba(176,138,62,.12);

  --bg:#ffffff;
  --paper:#ffffff;

  --ink:#0f1115;
  --ink-soft:rgba(15,17,21,.62);

  --line:rgba(15,17,21,.10);

  --radius:18px;
  --shadow-soft:0 14px 40px rgba(0,0,0,.10);
  --shadow-heavy:0 24px 70px rgba(0,0,0,.18);

  --max:1240px;
  --pad:clamp(18px,3vw,36px);

  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --font-display: "Cormorant Garamond", Georgia, serif;

  /* JS sets this from DB */
  --accent: #C28F56;
  --accent-rgb: 194,143,86;
  --accent-soft: rgba(var(--accent-rgb), .18);
  --accent-border: rgba(var(--accent-rgb), .35);
  --accent-border-weak: rgba(var(--accent-rgb), .30);
  --accent-bg-hero: rgba(var(--accent-rgb), .22);
}

/* ---------- Reset ---------- */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}

/* ---------- Base ---------- */
body{
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* =====================================================
   TOPBAR
   ===================================================== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 14px;
}
.brand{
  display:flex;
  align-items:center;
  padding: 0 10px;
}
.brand img{
  height: 56px;
  max-height: 56px;
  width:auto;
  object-fit:contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.12));
}

nav{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
nav a{
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(15,17,21,.72);
  border: 1px solid transparent;
}
nav a:hover{
  color: var(--ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

/* =========================
   TOPBAR – Mobile nav: single row scroll (no awkward wrapping)
   ========================= */
@media (max-width: 620px){
  .topbar-inner{
    gap: 10px;
    padding: 10px 0;
  }

  .brand{
    padding: 0 6px;
  }
  .brand img{
    height: 46px;
    max-height: 46px;
  }

  nav{
    flex-wrap: nowrap;          /* ✅ no wrap */
    overflow-x: auto;           /* ✅ scroll */
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;      /* Firefox hide */
  }
  nav::-webkit-scrollbar{ display:none; } /* Chrome/Safari hide */

  nav a{
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 13px;
  }
}

/* =====================================================
   HERO
   ===================================================== */
.hero{
  position: relative;
  overflow:hidden;
  padding: 0;
}

.hero::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(900px 420px at 18% 0%, var(--accent-bg-hero), transparent 62%),
    linear-gradient(to bottom, #fff, #fff);
  z-index:0;
}

.heroPdf{
  position:absolute;
  right:-90px;
  top:52%;
  transform: translateY(-50%) rotate(8deg);
  width:min(520px, 60vw);
  aspect-ratio: 3/4;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  box-shadow: 0 22px 60px rgba(0,0,0,.14);
  border:1px solid rgba(0,0,0,.06);
  opacity:.10;
  filter:saturate(1.05);
  z-index:1;
  pointer-events:none;
}
.heroPdf img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.hero .wrap{ position:relative; z-index:2; width:100%; }

.hero-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  grid-template-areas: "left mag";
  align-items: stretch;
  column-gap: 32px;
  row-gap: 0;
  padding: clamp(28px, 4.4vw, 56px) 0 clamp(20px, 4vw, 42px);
}

.heroCol{
  grid-area: left;
  min-width: 0;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.heroText{ min-width:0; }

.hero h1{
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.05;
  letter-spacing: .2px;
}
.hero p{
  margin: 0;
  max-width: 72ch;
  color: rgba(15,17,21,.72);
  font-size: 16px;
  white-space: pre-line;
}

.cta{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  margin-top: 0;
  align-self: start;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(var(--accent-rgb), .22);
}
.btn.primary{
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #111;
  font-weight: 800;
}
.btn.primary:hover{filter:brightness(1.04)}

.heroMag{
  grid-area: mag;
  display:block;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 46px rgba(0,0,0,.14);
  width: 100%;
  max-width: 360px;
  justify-self: end;
  align-self: start;
  transform: translateX(-12px);
  transition: transform .18s ease, box-shadow .18s ease;
}
.heroMag:hover{
  transform: translateX(-12px) translateY(-2px);
  box-shadow: 0 22px 60px rgba(0,0,0,.18);
}
.heroMag img{
  width:100%;
  height:auto;
  aspect-ratio: 3/4;
}

.heroMagKicker{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.heroMagMeta{
  padding: 12px 16px 14px;          /* biraz daha güvenli */
  border-top: 1px solid rgba(0,0,0,.06);
  display:flex;
  flex-direction:column;
  gap: 4px;
}

.heroMagTitle{
  margin: 0;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);                 /* ✅ artık gerçek metin */
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;           /* ✅ taşmayı engeller */
}

.hero-side{
  width: 100%;
  margin-top: auto;
  border-radius: var(--radius);
  border: 1px solid var(--accent-border-weak);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}
.hero-side .kicker{
  font-size: 12px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: rgba(194,143,86,.95);
  margin-bottom: 10px;
}

@media (max-width: 860px){
  .heroCol{ display: contents; }

  .hero-grid{
    grid-template-columns: 170px minmax(0,1fr);
    grid-template-areas:
      "mag   text"
      "cta   text"
      "editor editor";
    column-gap: 18px;
    row-gap: 14px;
    align-items: start;
  }

  .heroText{ grid-area: text; }
  .cta{
    grid-area: cta;
    display:flex;
    flex-direction: column;
    gap: 10px;
    align-self: start;
  }
  .cta .btn{
    width: 100%;
    padding: 11px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .heroMag{
    justify-self: start;
    max-width: 170px;
    transform: none;
  }
  .heroMag:hover{ transform: translateY(-2px); }

  .hero h1{
    font-size: clamp(28px, 5.2vw, 44px);
  }

  .heroPdf{
    opacity:.10;
    right:-140px;
    top:55%;
  }

  /* ✅ FIX: ensure editor card actually occupies the "editor" row */
  .hero-side{
    grid-area: editor;
    max-width: none;
  }
}

/* =========================
   MID BREAKPOINT FIX (621–860): CTA full-width under content
   ========================= */
@media (max-width: 860px) and (min-width: 621px){

  .hero-grid{
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      "mag   text"
      "cta   cta"
      "editor editor";
    column-gap: 22px;
    row-gap: 16px;
  }

  /* CTA artık tam genişlik */
  .cta{
    grid-area: cta;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start;
    gap: 12px;
  }
  .cta .btn{
    width: auto !important;
    min-width: 170px;
  }

  /* Kapak orta aralıkta biraz daha “yerine otursun” */
  .heroMag{
    max-width: 220px;
    width: 220px;
  }

  /* Editör kutusu full width */
  .hero-side{
    grid-area: editor;
    max-width: none;
    width: 100%;
  }
}


@media (max-width: 620px){
  .hero-grid{
    grid-template-columns: 140px minmax(0, 1fr);
    column-gap: 14px;
    padding: 24px 0 28px;
  }

  .heroMag{
    max-width: 140px;
    width: 140px;
  }

  .hero h1{
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.08;
  }
  .hero p{ font-size: 15px; }

  .heroPdf{
    opacity: .08;
    right: -160px;
    top: 58%;
  }
}

@media (max-width: 360px){
  .heroCol{ display: contents; }
  .hero-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "mag"
      "text"
      "cta"
      "editor";
    row-gap: 14px;
  }

  .heroMag{
    width: min(260px, 90vw);
    max-width: 260px;
    justify-self: center;
  }

  .cta{
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .cta .btn{
    width: auto;
    flex: 1 1 140px;
    white-space: nowrap;
  }
}

/* =====================================================
   SECTIONS
   ===================================================== */
section{
  padding: clamp(48px, 7vw, 110px) 0;
}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head h2{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 34px);
}
.hint{
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 60ch;
}
.paper{
  background: var(--paper);
  color: var(--ink);
}

/* =====================================================
   HORIZONTAL MAGAZINE SCROLL
   ===================================================== */
.hscroll{
  display:flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar{height:10px}
.hscroll::-webkit-scrollbar-thumb{
  background: rgba(15,17,21,.18);
  border-radius: 999px;
}
.magCard{
  flex: 0 0 auto;
  width: 155px;
  scroll-snap-align: start;
}
.magCover{
  width: 155px;
  height: 220px;
  border-radius: 16px;
  overflow:hidden;
  background:#f3f3f3;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.magCover img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.magTitle{
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
}
.magSub{
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* =====================================================
   PARALLAX BAND
   ===================================================== */
.band{
  position:relative;
  min-height: 40vh;
  display:flex;
  align-items:center;
  padding: 0;
}
.band::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(194,143,86,.85) 0%, rgba(194,143,86,.55) 40%, rgba(255,255,255,.78) 100%),
    url("https://images.unsplash.com/photo-1455885666462-a0f93b25f81b?auto=format&fit=crop&w=2200&q=70");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: saturate(1.05) contrast(1.02);
}
.band .wrap{
  position:relative;
  padding: clamp(36px, 6vw, 78px) var(--pad);
}
.band h2{
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 34px);
}
.band p{
  margin: 0;
  max-width: 72ch;
  color: rgba(15,17,21,.78);
}

/* =====================================================
   CARDS & FORMS
   ===================================================== */
.card{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.form-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
}
@media (max-width: 980px){
  .form-grid{grid-template-columns:1fr}
}

input,textarea{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  background: #fff;
}
textarea{min-height:120px;resize:vertical}

button{
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #111;
  font-weight: 900;
  cursor: pointer;
}
button:hover{filter:brightness(1.04)}
.msg{margin-top:10px;font-size:13px;color:var(--ink-soft);}

#submitForm{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
#submitForm input,
#submitForm textarea{ margin:0; }
#submitForm input[type="file"]{ padding: 10px 12px; }
#submitForm button{ margin-top: 6px; }
@media (max-width: 520px){
  #submitForm{ gap: 10px; }
}

/* ----------------------------
   FOOTER – STABLE RESPONSIVE
   ---------------------------- */

footer{
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  background: #fff;
}

/* Masaüstü: Telve + Impressum + Datenschutz | Sağ Menü */
.footer-grid{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:nowrap;      /* büyük ekranda kayma yok */
  gap: 26px;
}

/* Sol blok */
.footer-left{
  display:flex;
  align-items:center;
  gap: 26px;
  flex-wrap:nowrap;
}

.footer-brand{
  font-weight:700;
  white-space:nowrap;
}

.footer-legal{
  display:flex;
  gap: 26px;
  white-space:nowrap;
}

.footer-legal a{
  color:rgba(15,17,21,.70);
  text-decoration:none;
}
.footer-legal a:hover{
  color:var(--ink);
  text-decoration:underline;
}

/* Sağ menü */
.links{
  display:flex;
  align-items:center;
  gap: 18px;
  white-space:nowrap;
}

.links a{
  color:rgba(15,17,21,.70);
  text-decoration:none;
}
.links a:hover{
  color:var(--ink);
  text-decoration:underline;
}

/* © satırı */
.footer-copy{
  margin-top: 10px;
  opacity:.7;
  text-align:left;
}

/* ----------------------------
   RESPONSIVE
   ---------------------------- */

/* Küçük ekranda kırılma aktif */
@media (max-width: 900px){

  .footer-grid{
    flex-wrap:wrap;        /* sol + sağ blok alt alta */
    gap:14px;
  }

  .footer-left{
    flex-wrap:wrap;        /* telve + legal alt alta geçebilir */
    gap:14px;
  }

  .links{
    justify-content:flex-start;
    flex-wrap:wrap;        /* menü de kırılabilir */
    gap:14px;
  }
}


/* ===================== PROGRAM CARDS (Index) ===================== */
.posts-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;          /* equal height within row */
}
@media (max-width: 900px){
  .posts-grid{ grid-template-columns: 1fr; }
}

/* Modern: left side = full cover image, right side = content, with fade transition */
.postCard{
  display:grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease;
  color: inherit;
  height: clamp(240px, 18vw, 280px); /* ✅ all cards same height, responsive */
  overflow: hidden;
}
.postCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(0,0,0,.14);
}

.postCard .postThumb{
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0;
  overflow: hidden;
  display: block;
}

.postCard .postThumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position:center;
  display:block;
}

.postCard .postThumb::after{
  content:"";
  position:absolute;
  top:0; right:0;
  width: 90px;
  height: 100%;
  pointer-events:none;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, #fff 88%);
}

.postBody{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap: 10px;
  height: 100%;
  padding: 16px 18px 14px;
  overflow: hidden;             /* long text never breaks height */
}

.postTitle{
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .1px;
}
.postDesc{
  color: rgba(15,17,21,.72);
  font-size: 14px;
  line-height: 1.55;
}

.clamp-3{
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.postMeta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: auto;             /* keeps “Devamını oku” always aligned */
  padding-top: 8px;
}

.readMore{
  font-size: 13px;
  font-weight: 700;
  color: rgba(15,17,21,.78);
  white-space: nowrap;
}
.postCard:hover .readMore{ color: var(--ink); }

.postCard:hover .postThumb img{
  transform: scale(1.02);
  transition: transform .25s ease;
}

/* Mobile: image on top, fade downward, fixed height still consistent */
@media (max-width: 520px){
  .postCard{
    grid-template-columns: 1fr;
    height: 380px;              /* ✅ consistent list on mobile too */
  }

  .postCard .postThumb{
    height: 220px;              /* fixed hero height */
  }

  .postCard .postThumb::after{
    width: 100%;
    height: 90px;
    right: 0;
    top: auto;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 92%);
  }

  .postBody{
    padding: 14px 14px 12px;
  }

  .clamp-3{
    -webkit-line-clamp: 2;      /* mobile daha sıkı */
  }
}


/* ===================== PROGRAM DETAIL PAGE ===================== */
.postPage{ padding: clamp(28px, 4.5vw, 64px) 0; }

/* WICHTIG: hier kein overflow:hidden, sonst wirkt mobile-swipe “abgeschnitten” */
.postShell{ padding: clamp(16px, 3vw, 26px); }

.postTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.postBack{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,17,21,.12);
  background: rgba(255,255,255,.70);
  color: rgba(15,17,21,.78);
  font-size: 13px;
}
.postBack:hover{ background: rgba(255,255,255,.92); color: var(--ink); }

.postH1{
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.8vw, 46px);
  line-height: 1.08;
  letter-spacing: .2px;
}

.postLead{
  margin: 0 0 18px;
  max-width: 78ch;
  color: rgba(15,17,21,.72);
  font-size: 16px;
}

.postBodyLong{
  max-width: 80ch;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(15,17,21,.84);
}
.postBodyLong p{ margin: 0 0 14px; }

/* Skeleton (optional) */
.is-skeleton{ pointer-events:none; }
.skeleton{ background: rgba(15,17,21,.06); border-radius: 14px; }
.skeleton-line{ height: 14px; background: rgba(15,17,21,.06); border-radius: 999px; }
.skeleton-chip{ height: 28px; width: 86px; background: rgba(15,17,21,.06); border-radius: 999px; display:inline-block; }

/* =====================================================
   PROGRAM DETAIL – GALLERY (Desktop grid → Mobile swipe)
   ===================================================== */

/* Desktop grid */
/* ===== Program Gallery: Hero + Masonry ===== */
/* ===================== PROGRAM DETAIL – GALLERY (Masonry clean) ===================== */
/* ===== Desktop Gallery Layout: Hero left + vertical thumbs right ===== */
.postImages {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px; /* hero | thumbs */
  gap: 14px;
  margin: 12px 0 22px;
  align-items: start;
}

.postHero {
  border-radius: 18px;
  overflow: hidden;
  outline: 1px solid rgba(15,17,21,.10);
  outline-offset: -1px;
  background: transparent;
}

.postHero img{
  width: 100%;
  height: min(56vh, 520px);
  object-fit: contain;   /* never crop */
  display: block;
  background: transparent;
}

/* Thumbs column */
.postThumbs{
  max-height: min(56vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-gutter: stable;
}

.postThumbs::-webkit-scrollbar{ width: 10px; }
.postThumbs::-webkit-scrollbar-thumb{
  background: rgba(15,17,21,.18);
  border-radius: 999px;
}

.postImages .postThumb{
  display:block;
  width: 100%;
  border-radius: 14px;
  overflow:hidden;
  outline: 1px solid rgba(15,17,21,.10);
  outline-offset: -1px;
  background: transparent;
  opacity: .92;
  transition: transform .12s ease, opacity .12s ease, outline-color .12s ease;
}
.postImages .postThumb:hover{ opacity: 1; transform: translateY(-1px); }
.postImages .postThumb.is-active{ outline-color: rgba(15,17,21,.28); opacity: 1; }

.postImages .postThumb img{
  width: 100%;
  height: 96px;          /* uniform look */
  object-fit: cover;     /* thumbs may crop = ok */
  display:block;
}

/* ===== Mobile: swipe slider (as before) ===== */
@media (max-width: 700px){
  .postImages{
    display:flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .postImages::-webkit-scrollbar{ height: 10px; }
  .postImages::-webkit-scrollbar-thumb{
    background: rgba(15,17,21,.18);
    border-radius: 999px;
  }

  /* On mobile: each anchor is a slide */
  .postImages a{
    flex: 0 0 calc(100% - 56px);
    scroll-snap-align: start;
    border-radius: 18px;
    outline: 1px solid rgba(15,17,21,.10);
    outline-offset: -1px;
  }
  .postImages img{
    width: 100%;
    height: 56vw;
    max-height: 420px;
    object-fit: contain;
    background: transparent;
  }
}


/* =====================================================
   PROGRAM DETAIL – Gallery (Hero + vertical rail + mobile slider)
   ===================================================== */

.progGallery{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin: 12px 0 18px;
  align-items:start;
}

.gHero{ min-width:0; }

.gHeroLink{
  display:block;
  border-radius: 18px;
  overflow:hidden;
  background: transparent;     /* keine box */
  border: 0;
  box-shadow: 0 16px 42px rgba(0,0,0,.12);
}

.gHeroLink img{
  width:100%;
  height: min(56vh, 520px);
  object-fit: contain;
  background: transparent;     /* keine box */
  display:block;
}

.gRail{
  display:flex;
  flex-direction: column;
  gap: 10px;

  max-height: min(56vh, 520px);
  overflow:auto;
  padding-right: 6px;
}

.gRail::-webkit-scrollbar{ width:10px; }
.gRail::-webkit-scrollbar-thumb{
  background: rgba(15,17,21,.14);
  border-radius: 999px;
}

.gThumb{
  display:block;
  border-radius: 14px;
  overflow:hidden;
  background: transparent;    /* keine box */
  border: 0;
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  cursor:pointer;
}

.gThumb img{
  width:100%;
  height: 110px;              /* einheitliche Breite/Höhe */
  object-fit: cover;          /* thumbs dürfen crop -> ruhiger */
  display:block;
  background: transparent;
}

.gThumb.isActive{
  outline: 2px solid rgba(var(--accent-rgb), .35);
  outline-offset: 2px;
}

/* Tablet: etwas schmalere rail */
@media (max-width: 900px){
  .progGallery{
    grid-template-columns: 1fr 190px;
  }
  .gThumb img{ height: 100px; }
}

/* ✅ Smallest: NO HERO, no big spacing, horizontal scroller, click opens lightbox */
@media (max-width: 520px){
  /* remove big card feel around gallery area */
  .postShell{
    padding: 14px !important;
  }

  .progGallery{
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 10px 0 12px;
  }

  .gHero{ display:none; } /* ✅ keine hauptkachel */

  .gRail{
    flex-direction: row;
    overflow-x:auto;
    overflow-y:hidden;
    max-height:none;
    padding: 0;
    gap: 10px;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .gRail::-webkit-scrollbar{ height:8px; width:auto; }
  .gRail::-webkit-scrollbar-thumb{
    background: rgba(15,17,21,.14);
    border-radius: 999px;
  }

  .gThumb{
    flex: 0 0 82%;
    scroll-snap-align: start;
    border-radius: 16px;
  }

  .gThumb img{
    height: 210px;
    object-fit: contain;  /* mobile: kein crop */
  }
}

/* =========================
   MOBILE HERO COMPACT
   ========================= */
@media (max-width: 620px){

  /* weniger Abstand im Hero */
  .hero-grid{
    padding: 14px 0 18px !important;
    row-gap: 10px !important;
  }

  /* Cover + Text nebeneinander (statt riesig) */
  .hero-grid{
    grid-template-columns: 118px minmax(0, 1fr) !important;
    grid-template-areas:
      "mag text"
      "cta cta"
      "editor editor" !important;
  }

  /* Cover kleiner */
  .heroMag{
    width: 118px !important;
    max-width: 118px !important;
    border-radius: 14px !important;
  }
  .heroMag img{ aspect-ratio: 3/4; }

  /* Titel kleiner + kompakter */
  .hero h1{
    font-size: 28px !important;
    line-height: 1.05 !important;
    margin-bottom: 8px !important;
  }
  .hero p{
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  /* Buttons: 2 Spalten statt 3 untereinander */
  .cta{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .cta .btn{
    width: 100% !important;
    justify-content:center;
  }

  /* Editor-Box: kleiner, weniger Padding */
  .hero-side{
    padding: 12px 14px !important;
    grid-area: editor;
    max-width: none !important;
    width: 100%;
  }
}
