/* ==========================================================================
   AUSWANDERN-ZYPERN.DE — Main Stylesheet
   ========================================================================== */

:root {
  --gold: #b8944f;
  --gold-light: #d4af63;
  --gold-dark: #96783f;
  --dark: #1a1a1a;
  --dark-soft: #2a2a2a;
  --dark-card: #222222;
  --text: #e8e4dc;
  --text-muted: #a09a8e;
  --white: #ffffff;
  --bg: #141414;
  --bg-alt: #1c1c1c;
  --border: rgba(184,148,79,0.2);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 8px;
  --max-w: 1200px;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; color: var(--white); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.8rem; margin-top: 2.5rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: 0.6rem; margin-top: 2rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }
p { margin-bottom: 1.2rem; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(20,20,20,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 36px; width: auto; }
.logo-text { font-family: var(--font-heading); font-size: 1.15rem; color: var(--white); letter-spacing: 1.5px; }
.logo-text span { color: var(--gold); }

/* Navigation */
.main-nav ul { display: flex; list-style: none; gap: 28px; align-items: center; }
.main-nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; position: relative; padding: 4px 0; }
.main-nav a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--gold); transition: width var(--transition); }
.main-nav a:hover, .main-nav a.active { color: var(--gold-light); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.nav-cta {
  background: var(--gold); color: var(--dark) !important; padding: 8px 20px;
  border-radius: 4px; font-weight: 700; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 1px;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--gold-light); color: var(--dark) !important; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: var(--transition); }

/* ── HERO ── */
.hero {
  position: relative; padding: 160px 0 100px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--dark-soft) 50%, var(--bg) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(184,148,79,0.08) 0%, transparent 60%);
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 700px; }
.hero-badge {
  display: inline-block; background: rgba(184,148,79,0.15); color: var(--gold-light);
  padding: 6px 16px; border-radius: 4px; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 20px;
  border: 1px solid rgba(184,148,79,0.25);
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15; margin-bottom: 1.2rem; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 560px; margin-bottom: 2rem; }

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--dark); padding: 14px 32px;
  border-radius: 4px; font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.5px; transition: all var(--transition); border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--gold-light); color: var(--dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184,148,79,0.3); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--gold-light); padding: 14px 32px;
  border-radius: 4px; font-weight: 600; font-size: 0.92rem;
  border: 1px solid var(--gold); transition: all var(--transition); cursor: pointer;
}
.btn-secondary:hover { background: rgba(184,148,79,0.1); color: var(--white); }

/* ── SECTIONS ── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.section-title p { color: var(--text-muted); max-width: 600px; margin: 0.5rem auto 0; font-size: 1.05rem; }
.gold-line { width: 60px; height: 3px; background: var(--gold); margin: 12px auto 0; }

/* ── CARDS ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 28px; }
.card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(184,148,79,0.4); }
.card-img { position: relative; height: 200px; overflow: hidden; background: var(--dark-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-tag {
  position: absolute; bottom: 12px; left: 12px;
  background: var(--gold); color: var(--dark); padding: 4px 12px;
  border-radius: 3px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-body { padding: 24px; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card-body h3 a { color: var(--white); }
.card-body h3 a:hover { color: var(--gold-light); }
.card-body p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 1rem; }
.card-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); }

/* ── ARTICLE PAGE ── */
.article-hero {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--dark-soft) 100%);
  border-bottom: 1px solid var(--border);
}
.article-hero .hero-badge { margin-bottom: 16px; }
.article-hero h1 { max-width: 800px; }
.article-meta { display: flex; gap: 20px; color: var(--text-muted); font-size: 0.9rem; margin-top: 16px; flex-wrap: wrap; }

.article-content {
  max-width: 780px; margin: 0 auto; padding: 60px 24px 80px;
}
.article-content h2 { color: var(--gold-light); margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.article-content h2:first-of-type { border-top: none; padding-top: 0; }
.article-content h3 { color: var(--white); }
.article-content ul, .article-content ol { margin: 0 0 1.5rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px; margin: 2rem 0;
  background: rgba(184,148,79,0.05); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-muted);
}
.article-content strong { color: var(--white); }

/* Info boxes */
.info-box {
  background: rgba(184,148,79,0.08); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; margin: 2rem 0;
}
.info-box.tip { border-left: 4px solid var(--gold); }
.info-box.warning { border-left: 4px solid #c0392b; background: rgba(192,57,43,0.06); }
.info-box h4 { color: var(--gold-light); margin-top: 0; margin-bottom: 8px; font-family: var(--font-body); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 2rem 0; }
.styled-table {
  width: 100%; border-collapse: collapse; font-size: 0.92rem;
}
.styled-table thead { background: var(--gold); color: var(--dark); }
.styled-table th { padding: 12px 16px; text-align: left; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.styled-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.styled-table tbody tr { transition: background var(--transition); }
.styled-table tbody tr:hover { background: rgba(184,148,79,0.06); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; cursor: pointer; font-weight: 600; color: var(--white);
  font-size: 1rem; background: none; border: none; width: 100%; text-align: left;
  font-family: var(--font-body);
}
.faq-question:hover { color: var(--gold-light); }
.faq-question::after { content: '+'; font-size: 1.4rem; color: var(--gold); flex-shrink: 0; margin-left: 16px; transition: transform var(--transition); }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-answer-inner { padding: 0 0 18px; color: var(--text-muted); font-size: 0.95rem; }

/* ── SIDEBAR / TOC ── */
.article-layout { display: grid; grid-template-columns: 1fr 260px; gap: 60px; max-width: 1100px; margin: 0 auto; padding: 60px 24px 80px; }
.toc { position: sticky; top: 100px; align-self: start; }
.toc h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 12px; font-family: var(--font-body); }
.toc ul { list-style: none; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--text-muted); font-size: 0.85rem; display: block; padding: 4px 0 4px 12px; border-left: 2px solid transparent; transition: all var(--transition); }
.toc a:hover, .toc a.active { color: var(--gold-light); border-left-color: var(--gold); }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark); border-top: 1px solid var(--border); padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; max-width: 320px; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.88rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem; color: var(--text-muted);
}

/* ── WhatsApp Button ── */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: all var(--transition);
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,0.5); color: #fff; }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ── STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; padding: 40px 0; }
.stat-item h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--gold); margin-bottom: 4px; }
.stat-item p { color: var(--text-muted); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 1px; }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
  padding: 60px 0; text-align: center;
}
.cta-banner h2 { color: var(--dark); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.6rem; }
.cta-banner p { color: rgba(26,26,26,0.7); max-width: 500px; margin: 0 auto 1.5rem; }
.cta-banner .btn-primary { background: var(--dark); color: var(--gold-light); }
.cta-banner .btn-primary:hover { background: var(--bg); }

/* ── ARTICLE IMAGE ── */
.article-img {
  margin: 2rem 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.article-img img { width: 100%; }
.article-img figcaption { padding: 10px 16px; font-size: 0.82rem; color: var(--text-muted); font-style: italic; }

/* ── KONTAKT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info-card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.contact-info-card h3 { margin-bottom: 1rem; }
.contact-detail { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-detail svg { width: 20px; height: 20px; fill: var(--gold); flex-shrink: 0; margin-top: 3px; }
.contact-detail span { color: var(--text-muted); font-size: 0.95rem; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; }
.team-card { text-align: center; }
.team-card img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 3px solid var(--border); object-position: top; }
.team-card h4 { margin-bottom: 4px; }
.team-card p { color: var(--text-muted); font-size: 0.88rem; }

/* ── Breadcrumb ── */
.breadcrumb { padding: 0; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { margin: 0 6px; }

/* ── Pagination / Related ── */
.related-articles { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* ── RESPONSIVE ── */
@media (max-width: 968px) {
  .header-inner { padding: 12px 16px; }
  .main-nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--dark); padding: 80px 32px; transition: right var(--transition); z-index: 999; }
  .main-nav.active { right: 0; }
  .main-nav ul { flex-direction: column; gap: 16px; }
  .nav-toggle { display: block; z-index: 1000; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 998; }
  .nav-overlay.active { display: block; }

  .hero { padding: 120px 0 60px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero-buttons { flex-direction: column; }
  .hero h1 { font-size: 1.8rem; }
}

/* Article list page */
.article-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

/* Scroll animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Search */
.search-box { max-width: 500px; margin: 0 auto 3rem; position: relative; }
.search-box input {
  width: 100%; padding: 14px 20px 14px 48px; border-radius: var(--radius);
  background: var(--dark-card); border: 1px solid var(--border); color: var(--white);
  font-size: 1rem; font-family: var(--font-body); outline: none;
  transition: border-color var(--transition);
}
.search-box input:focus { border-color: var(--gold); }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: var(--text-muted); }

/* Cookie notice */
.cookie-notice {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--dark); border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; font-size: 0.88rem;
}
.cookie-notice.hidden { display: none; }
.cookie-notice p { max-width: 700px; color: var(--text-muted); margin: 0; }
.cookie-btn { background: var(--gold); color: var(--dark); padding: 8px 20px; border: none; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 0.85rem; }

/* Print */
@media print {
  .site-header, .site-footer, .whatsapp-float, .cookie-notice { display: none; }
  body { background: #fff; color: #000; }
}

/* Fix: article-content inside article-layout should fill its grid column */
.article-layout .article-content {
  max-width: none;
  padding: 0;
}

/* Fix: Ensure article images don't overflow on mobile */
.article-img img {
  width: 100%;
  height: auto;
  display: block;
}
.article-img {
  border-radius: 8px;
  overflow: hidden;
}

/* Fix: Table overflow on mobile */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.styled-table {
  min-width: 480px;
}

/* Fix: Hero section overflow */
.hero {
  overflow: hidden;
}

/* Fix: Card grid min-width for very small screens */
@media (max-width: 400px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
}

/* Fix: Logo visibility */
.logo-text {
  white-space: nowrap;
}
.logo-text span {
  color: var(--gold);
}

/* Scroll-to-Top Button */
.scroll-top {
  position: fixed; bottom: 96px; right: 28px; z-index: 998;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--dark-card); border: 1px solid var(--border);
  color: var(--gold); display: none; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.scroll-top:hover { background: var(--gold); color: var(--dark); border-color: var(--gold); }
.scroll-top.visible { display: flex; }
.scroll-top svg { width: 20px; height: 20px; fill: currentColor; }

/* Focus Styles for Accessibility */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
a:focus-visible { outline-offset: 3px; }
button:focus-visible { outline-offset: 2px; }
input:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; }
