/* =========================================================
   RP MontageBau – style.css (Version 1 – Clip-Path Slider)
   - Dark / modern-handwerklich
   - Dropdown
   - Before/After Slider: clip-path + smooth transitions
   - Sticky Footer (iOS/Android/Desktop kompatibel)
   ========================================================= */

* { box-sizing: border-box; }

/* ---------- Sticky Footer / Viewport (robust, auch iOS) ---------- */
html, body{
  height: 100%;
  min-height: 100%;
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

body{
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: transparent; /* <- wichtig: Background NICHT mehr hier */
  position: relative;

  /* Sticky Footer Layout */
  display: flex;
  flex-direction: column;

  /* robust gegen mobile Browser-UI (iOS Safari etc.) */
  min-height: 100vh;
  min-height: 100svh; /* Safari 16+ */
  min-height: 100dvh; /* moderne Browser */
}

/* main wächst -> Footer bleibt unten */
main{
  flex: 1 0 auto;
}

/* Header/Footer behalten natürliche Höhe */
header, footer{
  flex: 0 0 auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ✅ EIN festes Background-Layer für alle Geräte (auch iOS) */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(196,0,26,0.16), transparent 55%),
    radial-gradient(900px 450px at 80% 0%, rgba(255,255,255,0.06), transparent 55%),
    linear-gradient(180deg, #0b0c0f 0%, #090a0d 100%);

  /* iOS/Safari Stabilität */
  transform: translateZ(0);
  will-change: transform;
}

main, section, .section, .container{
  background: transparent;
}

:root{
  --bg: #0b0c0f;
  --panel: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);
  --muted: rgba(255,255,255,0.72);
  --text: rgba(255,255,255,0.92);
  --brand: #c4001a;
  --shadow: 0 10px 26px rgba(0,0,0,0.22);
  --shadow2: 0 18px 60px rgba(0,0,0,0.35);
  --radius: 18px;
  color-scheme: dark;
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@supports (-webkit-touch-callout: none){
  body{
    background-attachment: scroll;
  }
}

img{ max-width: 100%; display:block; }
a{ color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1600px;      /* größer als vorher */
  padding: 0 2rem;        /* seitliche Luft */
  margin: 0 auto;
}


.section{ padding: 42px 0; }
.section__head{ margin-bottom: 18px; }
.section__head h2{ margin: 0 0 6px; font-size: 24px; letter-spacing: .2px; }
.section__head p{ margin: 0; color: var(--muted); }

/* ---------- Header / Nav ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.90);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.349);
}

.header__row {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.scrolled .header {
  background: rgba(10, 10, 12, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}


.brand{ display:flex; align-items:center; gap:10px; }
.brand__logo{
  width:34px; height:34px; border-radius:10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  overflow:hidden;
}
.brand__name{ font-weight: 900; font-size: 14px; letter-spacing: .4px; }

.nav{ display:flex; align-items:center; gap:14px; }
.nav__link{
  font-weight: 900;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav__link:hover{
  border-color: rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

/* ============================= */
/* Dropdown Button – Leistungen */
/* ============================= */

.dropdown {
  position: relative;
}

/* Button selbst */
.dropdown__toggle {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.02)
  );
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;

  padding: 8px 14px;
  border-radius: 999px;

  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  backdrop-filter: blur(6px);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

/* Hover */
.dropdown__toggle:hover {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.14),
    rgba(255,255,255,0.05)
  );
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}

/* Active / offen */
.dropdown.is-open .dropdown__toggle {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.20),
    rgba(255,255,255,0.08)
  );
  border-color: rgba(255,255,255,0.45);
}

/* Pfeil drehen */
.dropdown.is-open .dropdown__toggle::after {
  transform: rotate(180deg);
}

/* Pfeil */
.dropdown__toggle::after {
  content: "▾";
  font-size: 11px;
  transition: transform 0.25s ease;
}

/* Mobile etwas größer */
@media (max-width: 768px) {
  .dropdown__toggle {
    font-size: 14px;
    padding: 10px 16px;
  }
}


/* Trennlinie */
.dropdown_divider{
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 6px 0;
}


/* ---------- Generic UI ---------- */
.grid{ display:grid; gap:16px; }
.cards{ grid-template-columns: repeat(3, 1fr); }
.projects{ grid-template-columns: repeat(2, 1fr); }

.card, .project{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.project__title{ margin: 0 0 4px; font-size: 16px; font-weight: 900; }
.project__meta{ margin: 0 0 10px; color: rgba(255,255,255,0.62); font-weight: 900; font-size: 12px; }

/* ---------- Before / After Slider (Version 1) ---------- */
.ba{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  box-shadow: var(--shadow);

  /* Mobile: verhindert Scroll beim Ziehen */
  touch-action: none;
  user-select: none;
}

/* Beide Bilder liegen exakt übereinander */
.ba__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay ist "Vorher" (wird geschnitten) */
.ba__overlay{
  position: absolute;
  inset: 0;

  /* Startzustand (Version 1): 50% Vorher sichtbar */
  clip-path: inset(0 50% 0 0);

  /* SMOOTH wie damals */
  transition: clip-path 180ms ease;
}

/* Optional: Beim kompletten Ausblenden vom JS gesetzt */
.ba__overlay.is-hidden{
  opacity: 0;
  transition: opacity 120ms ease;
}

/* Handle / Trennlinie */
.ba__handle{
  position: absolute;
  top: 0;
  bottom: 0;

  left: 50%;
  width: 2px;
  background: rgba(255,255,255,0.92);

  /* kleiner Glow in Firmen-Rot */
  box-shadow: 0 0 0 4px rgba(196,0,26,0.25);

  transform: translateX(-1px);
  pointer-events: none;

  /* SMOOTH wie damals */
  transition: left 180ms ease;
}

/* Der eigentliche Regler liegt unsichtbar drüber */
.ba__range{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

/* Labels */
.ba__label{
  position: absolute;
  top: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
  pointer-events: none;
}
.ba__label--left{ left: 12px; }
.ba__label--right{ right: 12px; }

.ba__label.is-hidden{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

/* Wenn Nachher ausgeblendet werden soll (JS setzt Klasse) */
.ba.only-before > img.ba__img{
  opacity: 0;
  transition: opacity 120ms ease;
}
.ba.only-before .ba__overlay{
  opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .cards{ grid-template-columns: 1fr; }
  .projects{ grid-template-columns: 1fr; }
  .nav{ gap: 8px; }
}

/* =========================================================
   Admin / Forms – Styling (Projekt hinzufügen / bearbeiten)
   ========================================================= */

.form{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.form__row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.form label{
  display: block;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,0.86);
  margin-bottom: 8px;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="number"],
.form input[type="password"],
.form select,
.form textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.92);
  outline: none;
  font: inherit;
}

.form textarea{
  min-height: 110px;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus{
  border-color: rgba(196,0,26,0.55);
  box-shadow: 0 0 0 4px rgba(196,0,26,0.18);
}

.form input[type="file"]{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.86);
  font: inherit;
}

.form__hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  color: rgba(255,255,255,0.92);
}

.btn:hover{
  background: rgba(255,255,255,0.08);
}

.btn--primary{
  border-color: rgba(196,0,26,0.55);
  background: linear-gradient(180deg, rgba(255,59,48,0.95), rgba(196,0,26,0.95));
  box-shadow: 0 12px 26px rgba(196,0,26,0.20);
}

.btn--primary:hover{
  filter: brightness(1.03);
}

.btn--ghost{
  background: transparent;
  border-color: rgba(255,255,255,0.16);
}

.btn--danger{
  background: rgba(196,0,26,0.18);
  border-color: rgba(196,0,26,0.40);
}

.btn--danger:hover{
  background: rgba(196,0,26,0.26);
}

.admin-project-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px){
  .form__row{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   File Upload – Custom "Datei auswählen" (Pro)
   ========================================================= */

.file{
  display: grid;
  gap: 8px;
}

.file__row{
  display: flex;
  align-items: center;
  gap: 10px;
}

.file input[type="file"]{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  user-select: none;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}

.file__btn:hover{
  background: rgba(255,255,255,0.08);
}

.file__btn--accent{
  border-color: rgba(196,0,26,0.45);
  box-shadow: 0 10px 22px rgba(196,0,26,0.15);
}

.file__name{
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.72);
  font-weight: 800;
  font-size: 12px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   Admin Select (Kategorie) – Dark Theme
   ========================================================= */

.form select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);

  padding-right: 42px;
  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.75) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    100% 0;
  background-size:
    6px 6px,
    6px 6px,
    2.5em 2.5em;
  background-repeat: no-repeat;
}

.form select option{
  background: #121318;
  color: rgba(255,255,255,0.92);
}

.form select optgroup{
  background: #121318;
  color: rgba(255,255,255,0.72);
}

.form select:hover{
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
}
.form select:focus{
  border-color: rgba(196,0,26,0.55);
  box-shadow: 0 0 0 4px rgba(196,0,26,0.18);
}

.admin-panel {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 16px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.02)
  );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Diese min-height Regeln sind im Sticky-Footer Setup nicht mehr nötig,
   aber harmlos. Wir lassen sie drin, um nichts zu "brechen". */
.main,
.page,
.content,
.admin-wrapper {
  min-height: 100%;
}

/* Browser-Hint: Form Controls in Dark (hilft bei manchen UI-Teilen) */
:root{
  color-scheme: dark;
}

/* =========================================================
   Footer (zentriert)
   ========================================================= */

.footer{
  margin-top: 80px;
  padding: 26px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);

  /* iOS Safe Area (Homebar/Notch) */
  padding-bottom: calc(26px + env(safe-area-inset-bottom));
}

/* ✅ alles mittig, auch Desktop */
.footer__inner{
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 10px;
  text-align: center;

  font-size: 14px;
  color: rgba(255,255,255,0.65);
}

.footer__left{
  white-space: nowrap;
}

.footer__right{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer__link{
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__link:hover{
  color: #fff;
}

.footer__sep{
  opacity: 0.4;
}

button,
.nav_link,
.dropdown__toggle,
.footer_link {
  font-family: var(--font-main);
  font-weight: 500;
}
/* =========================================================
   Ende der style.css
   ========================================================= */