/* ============================================================
   Back Treppenstudio – style.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:     #F5F3EC;
  --cream-2:   #EEEBE0;
  --dark:      #1E1E1E;
  --mid:       #4A4A4A;
  --light:     #8A8A8A;
  --gold:      #A67C3B;
  --gold-2:    #C49848;
  --white:     #FFFFFF;
  --alert-bg:  #ffe0e0;
  --alert-bd:  #0d0c0b;
  --alert-text:#ff0000;
  --radius:    6px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--cream);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { transition: color .2s; }

/* ── TOP BAR ─────────────────────────────────────────────── */

.topbar {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  font-size: .77rem;
  letter-spacing: .04em;
  padding: 8px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.topbar a { color: rgba(255,255,255,.65); text-decoration: none; }
.topbar a:hover { color: var(--gold-2); }
.topbar-right { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ── HEADER ──────────────────────────────────────────────── */

header {
  background: var(--white);
  border-bottom: 1px solid var(--cream-2);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.logo-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: .01em;
  line-height: 1;
}
.logo-sub {
  font-size: .7rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  text-decoration: none;
  color: var(--mid);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.nav-cta {
  background: var(--gold) !important;
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: var(--radius) !important;
  border-bottom: none !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--gold-2) !important; }

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .2s;
}
.nav-toggle:hover { background: var(--cream-2); }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── FRAUD ALERT ─────────────────────────────────────────── */

.fraud-alert {
  background: var(--alert-bg);
  border-left: 4px solid var(--gold);
  border-bottom: 1px solid var(--alert-bd);
  padding: 14px 40px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.fraud-alert.hidden { display: none; }
.fraud-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; color:#b03030;}
.fraud-text { flex: 1; min-width: 0;color: var(--alert-text); }
.fraud-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: .88rem;
  color: var(--alert-text);
}
.fraud-text p {
  font-size: .8rem;
  color: var(--mid);
  line-height: 1.55;
}
.fraud-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--light);
  font-size: 1.1rem;
  padding: 2px 6px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.fraud-close:hover { color: var(--dark); background: rgba(0,0,0,.06); }

/* ── HERO ────────────────────────────────────────────────── */

.hero {
  background: var(--dark);
  color: var(--white);
  padding: 80px 40px 68px;
  text-align: center;
}
.hero-inner { max-width: 720px; margin: 0 auto; }

.hero-label {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold-2); }
.btn-outline {
  border: 1.5px solid rgba(255,255,255,.45);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.07); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: #333; }

/* ── TICKER / MARQUEE ────────────────────────────────────── */

.ticker-wrap {
  overflow: hidden;
  background: var(--gold);
  padding: 13px 0;
  user-select: none;
  cursor: default;
}
.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
  will-change: transform;
}
.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  color: var(--white);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 28px;
  display: inline-block;
}
.ticker-sep {
  color: rgba(255,255,255,.35);
  font-size: .75rem;
  display: inline-block;
  padding: 0 2px;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTION WRAPPER ─────────────────────────────────────── */

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
}

.section-header { margin-bottom: 36px; }
.section-label {
  display: block;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 400;
  color: var(--dark);
}
.section-divider {
  width: 44px; height: 2px;
  background: var(--gold);
  margin-top: 14px;
}

/* ── PRODUCT GRID ────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* mobile default: 2 col */
  gap: 14px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--cream-2);
  transition: transform .4s ease;
}
.product-card:hover .product-card-img {
  transform: scale(1.04);
}
/* Wrapper needed for overflow on img zoom */
.product-card-thumb {
  overflow: hidden;
  flex-shrink: 0;
}
.product-card-body {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.product-card-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--dark);
  line-height: 1.35;
}
.product-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .04em;
  transition: gap .2s;
}
.product-card-arrow::after { content: '→'; }
.product-card:hover .product-card-arrow { gap: 8px; }

.product-card.pdf-card {
  border: 2px solid var(--gold);
}
.product-card.pdf-card .product-card-title { color: var(--gold); }

/* ── CTA STRIP ───────────────────────────────────────────── */

.cta-strip {
  background: var(--cream-2);
  border-top: 1px solid #E0DDD2;
  border-bottom: 1px solid #E0DDD2;
}
.cta-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-strip h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
}
.cta-strip p { color: var(--mid); font-size: .9rem; margin-top: 6px; }

/* ── INFO SECTION ────────────────────────────────────────── */

.info-section { background: var(--dark); color: var(--white); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px;
}
.info-block h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 16px;
  color: var(--gold-2);
}
.info-block p,
.info-block li {
  font-size: .88rem;
  color: rgba(255,255,255,.72);
  line-height: 1.85;
}
.info-block ul { list-style: none; }
.info-block ul li::before { content: '— '; color: var(--gold); }
.info-block a { color: rgba(255,255,255,.72); text-decoration: none; }
.info-block a:hover { color: var(--gold-2); }
.info-label {
  display: block;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
  font-weight: 600;
}

/* ── FOOTER ──────────────────────────────────────────────── */

footer {
  background: #141414;
  color: rgba(255,255,255,.45);
  padding: 24px 40px;
  font-size: .78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
footer a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .2s;
}
footer a:hover { color: var(--gold-2); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── RESPONSIVE ──────────────────────────────────────────── */

/* Tablet portrait (≥ 560px): 3-column grid */
@media (min-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .product-card-title { font-size: .82rem; }
}

/* Tablet landscape (≥ 800px): 4-column grid */
@media (min-width: 800px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
  .product-card-body { padding: 16px 16px 18px; }
  .product-card-title { font-size: .85rem; letter-spacing: .05em; }
}

/* Desktop (≥ 1100px): still 4 col, larger gaps */
@media (min-width: 1100px) {
  .product-grid { gap: 24px; }
}

/* ── Mobile adjustments (< 640px) ─────────────────────────── */
@media (max-width: 640px) {

  /* Hide topbar – address/hours already in footer */
  .topbar { display: none; }

  /* Header */
  .header-inner {
    padding: 0 20px;
    height: 60px;
  }
  .logo-name { font-size: 1.25rem; }
  .logo-sub { display: none; }

  /* Show hamburger, hide nav by default */
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--cream-2);
    z-index: 199;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 15px 24px;
    border-bottom: 1px solid var(--cream-2);
    font-size: .9rem;
    border-right: none;
  }
  .main-nav a:last-child { border-bottom: none; }
  .nav-cta {
    margin: 12px 20px 16px !important;
    padding: 13px 20px !important;
    text-align: center;
    border-radius: var(--radius) !important;
  }

  /* Fraud alert */
  .fraud-alert { padding: 12px 20px; gap: 10px; }
  .fraud-text strong { font-size: .84rem; }
  .fraud-text p { font-size: .78rem; }

  /* Hero */
  .hero { padding: 52px 24px 44px; }
  .hero p { font-size: .92rem; }
  .btn { padding: 13px 24px; font-size: .82rem; }

  /* Ticker on mobile */
  .ticker-item { font-size: .74rem; padding: 0 18px; }
  .ticker-sep { font-size: .68rem; }

  /* Section padding */
  .section { padding: 44px 20px; }

  /* Product grid stays 2-col, just tighter */
  .product-grid { gap: 12px; }
  .product-card-body { padding: 10px 12px 13px; }
  .product-card-title { font-size: .75rem; letter-spacing: .02em; }
  .product-card-arrow { font-size: .7rem; }

  /* CTA strip */
  .cta-strip-inner {
    padding: 36px 20px;
    flex-direction: column;
    text-align: center;
  }
  .cta-strip h2 { font-size: 1.2rem; }

  /* Info section */
  .info-grid { gap: 32px; }

  /* Footer */
  footer {
    padding: 20px 20px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-links { justify-content: center; gap: 16px; }
}

/* ── Tablet/mid adjustments (640px–1024px) ──────────────────── */
@media (min-width: 640px) and (max-width: 1024px) {
  .topbar { padding: 6px 24px; font-size: .73rem; }
  .topbar-left { display: none; } /* hide address on tablet */
  .header-inner { padding: 0 24px; }
  .section { padding: 52px 24px; }
  .hero { padding: 60px 24px 52px; }
  .fraud-alert { padding: 12px 24px; }
  .ticker-item { font-size: .78rem; padding: 0 22px; }
  .cta-strip-inner { padding: 40px 24px; }
  footer { padding: 20px 24px; }
}

/* ── SUBPAGE WRAPPER ─────────────────────────────────────── */

.subpage-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 40px 60px;
  min-height: 60vh;
}

/* Override old inline font colors */
.subpage-main font[color="#0000FF"],
.subpage-main font[color="#0000ff"],
.subpage-main a font[color="#0000FF"],
.subpage-main a font[color="#0000ff"] { color: var(--gold) !important; }
.subpage-main font[color="#008000"],
.subpage-main font[color="#008000"] { color: var(--mid) !important; }
.subpage-main font[color="#FF0000"],
.subpage-main font[color="#ff0000"] { color: #b03030 !important; }

/* Override old font faces */
.subpage-main font { font-family: inherit !important; }

/* Section headings from old <b><font size="4"> */
.subpage-main b > font[size="4"],
.subpage-main font[size="4"] {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.4rem !important;
  letter-spacing: .04em !important;
  color: var(--dark) !important;
  line-height: 1.3 !important;
  display: block;
  margin-bottom: 4px;
}

/* All images in subpages */
.subpage-main img { max-width: 100%; height: auto; }

/* Thumbnail gallery images (in anchors) */
.subpage-main a > img,
.subpage-main a img {
  border-radius: 4px;
  transition: transform .25s ease, box-shadow .25s ease;
  display: block;
}
.subpage-main a:hover > img,
.subpage-main a:hover img {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

/* Navigation / icon images – no hover zoom */
.subpage-main img[src*="weiter"],
.subpage-main img[src*="zurueck"],
.subpage-main img[src*="home.gif"],
.subpage-main img[src*="LOGO"] {
  border-radius: 0 !important;
  opacity: .6;
  transition: opacity .2s;
}
.subpage-main a:hover img[src*="weiter"],
.subpage-main a:hover img[src*="zurueck"],
.subpage-main a:hover img[src*="home.gif"] {
  transform: none !important;
  box-shadow: none !important;
  opacity: 1;
}

/* Tables: let them scroll on mobile */
.subpage-main table { max-width: 100%; }

/* Dividers */
.subpage-main hr {
  border: none;
  border-top: 1px solid var(--light);
  opacity: .35;
  margin: 20px 0;
}

@media (max-width: 640px) {
  .subpage-main {
    padding: 28px 16px 44px;
    overflow-x: auto;
  }
  .subpage-main table {
    width: auto !important;
    min-width: 0;
  }
}

/* ── GALLERY PAGES (gallery.js) ──────────────────────────────── */

.gallery-section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--dark);
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}
.gallery-section-heading:first-child { margin-top: 0; }

/* Thumbnail grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

.gallery-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  background: var(--cream-2);
  aspect-ratio: 3 / 4;
}
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.gallery-card-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.gallery-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.gallery-card:hover .gallery-card-inner img {
  transform: scale(1.07);
}

/* Detail page */
.gallery-detail-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 28px;
  color: var(--dark);
  line-height: 1.25;
}

.gallery-detail-images {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  align-items: flex-start;
}
.gallery-detail-figure {
  flex: 1;
  min-width: 220px;
  max-width: 720px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.gallery-detail-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-detail-desc {
  font-size: .93rem;
  line-height: 1.75;
  color: var(--mid);
  max-width: 720px;
  margin-bottom: 32px;
  padding: 18px 20px;
  background: var(--white);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Navigation bar */
.gallery-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--light);
  flex-wrap: wrap;
  margin-top: 8px;
  opacity: .9;
}
.gallery-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: 1.5px solid var(--light);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--mid);
  font-size: .85rem;
  font-weight: 500;
  background: var(--white);
  transition: border-color .2s, color .2s, background .2s;
}
.gallery-nav-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--cream-2);
}
.gallery-nav-home {
  font-size: 1.2rem;
  padding: 9px 15px;
}

/* Responsive gallery grid */
@media (min-width: 500px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
@media (min-width: 1000px) {
  .gallery-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .gallery-detail-images { flex-direction: column; }
  .gallery-detail-figure { min-width: 0; }
  .gallery-detail-title { font-size: 1.4rem; }
}
