/* ===== Final Optimiert: default.css ===== */

/* 
 * BUNKERBANDITS Theme - Developed by Dennis Joest
 */
/* ============================================= */
/* 🔤 LOCALLY HOSTED FONTS (DSGVO Compliant) */
/* ============================================= */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/caveat-regular.woff2') format('woff2');
}

/* ============================================= */
:root {
  /* Core Variables Hub */
  --color-brand-orange: #ff5e00;
  /* Ursprünglicher Wert von #ff5e00 */
  --color-brand-dark: #1a0f08;
  /* Ursprünglicher Wert von #1a0f08 */
  --color-accent: #ff5e00;
  /* Alias für Akzentfarbe */
  --color-bg-black: #000000;
  --color-text-white: #f0f0f0;
  /* Soft white for better readability */
  --color-text-dim: #acacac;
  --color-text: #f0f0f0;
  /* Alias für Standard-Text */
  --color-white: #ffffff;
  /* Alias für Weiß */

  --font-primary: 'Roboto', sans-serif;
  --font-accent: 'Caveat', cursive;

  --transition-standard: all 0.3s ease;

  /* Prevent WP Core Admin Bar from injecting messy CSS warnings in the console */
  --wp-admin-theme-color: inherit;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  background: linear-gradient(180deg, var(--color-bg-black) 30%, var(--color-brand-dark) 60%, var(--color-brand-orange) 100%);
  background-attachment: fixed;
  color: var(--color-text-white);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100vw;
}

.page-viewport {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.2rem;
  background: transparent;
}

.content-container {
  max-width: 700px;
  margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  margin: 1.2em 0 0.4em 0;
  color: var(--color-brand-orange);
  letter-spacing: 0.02em;
  /* Scroll offset for anchor links to prevent header overlap */
  scroll-margin-top: 170px;
}

p {
  margin: 0.8em 0;
  line-height: 1.6;
}

.bb-orange {
  color: var(--color-brand-orange) !important;
  font-weight: inherit;
}

.dynamic-page-content {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 3rem;
  max-width: 800px;
}

a {
  color: var(--color-brand-orange);
  text-decoration: underline;
  transition: color 0.2s;
}

a:hover,
a:focus {
  color: #fff;
  text-decoration: none;
}

ul,
ol {
  margin: 0.7em 0 0.7em 1.4em;
}

img {
  max-width: 100%;
  border-radius: 7px;
  margin: 0.3em 0;
}

hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 2em 0;
}

/* ✅ Heading-Abstände am Seitenanfang neutralisieren */
main h1:first-child,
main h2:first-child,
main h3:first-child {
  margin-top: 0;
}

/* ============================================= */
/* 📱📲💻🖥 RESPONSIVE BREAKPOINTS – 5 STUFEN BASIS */
/* ============================================= */

/* 📱 1. XS – Kleine Smartphones */
@media (max-width: 480px) {
  main {
    position: relative;
    padding-top: 150px;
    padding-bottom: 20px;
    min-height: auto;
    overflow-y: visible;
  }
}

/* 📱 2. S – Normale Smartphones */
@media (min-width: 481px) and (max-width: 768px) {
  main {
    position: relative;
    padding-top: 150px;
    padding-bottom: 20px;
    min-height: auto;
    overflow-y: visible;
  }
}

/* 📲 3. M – Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  main {
    position: relative;
    padding-top: 150px;
    padding-bottom: 20px;
    min-height: auto;
    overflow-y: visible;
  }
}

/* 💻 4. L – Laptops / kleine Desktops */
@media (min-width: 1025px) and (max-width: 1440px) {
  main {
    position: absolute;
    top: 150px;
    bottom: 110px;
    left: 0;
    right: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 0 1.2rem;
    box-sizing: border-box;
  }
}

/* 🖥 5. XL – Große Bildschirme / 4K */
@media (min-width: 1441px) {
  main {
    position: absolute;
    top: 150px;
    bottom: 110px;
    left: 0;
    right: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 0 1.2rem;
    box-sizing: border-box;
  }
}

/* ============================================= */
/*  FOTO-OVERLAY / LIGHTBOX (CENTRALIZED)      */
/* ============================================= */

/* Lightbox Base */
.photo-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 9999;
  background: transparent;
}

.photo-overlay.is-visible {
  display: flex;
}

.photo-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.photo-overlay-dialog {
  position: relative;
  max-width: 960px;
  width: calc(100% - 40px);
  height: 80vh;
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.85);
  /* Slightly darker for better contrast */
  border-radius: 10px;
  padding: 18px 18px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.photo-overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.photo-overlay-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.photo-overlay-arrow {
  border: none;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  font-size: 26px;
  width: 38px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.photo-overlay-arrow:hover {
  background: rgba(0, 0, 0, 1);
  color: var(--color-brand-orange);
}

.photo-overlay-image-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-overlay-image {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-overlay-thumbs {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  flex: 0 0 auto;
  max-height: 96px;
  justify-content: center;
}

.photo-overlay-thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #222222;
  padding: 0;
}

.photo-overlay-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-overlay-thumb.is-active {
  border-color: var(--color-brand-orange);
}

.photo-overlay-open .page-viewport {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .photo-overlay {
    padding: 0;
  }

  .photo-overlay-dialog {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 12px;
  }

  .photo-overlay-image {
    max-height: 80vh;
  }

  html.photo-overlay-open header,
  html.photo-overlay-open footer {
    display: none;
  }
}