/* ============================================================
   Tierärztliche Gemeinschaftspraxis Dr. Herold & Dr. Simon
   Farbschema: #8499B4 (Blau), #B8B9B3 (Grau), Weiß
   ============================================================ */

:root {
  --blue: #8499B4;
  --blue-dark: #6c819c;
  --blue-light: #eef1f6;
  --grey: #B8B9B3;
  --grey-light: #f4f4f2;
  --text: #3a3f47;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(58, 63, 71, 0.10);
  --shadow-soft: 0 3px 12px rgba(58, 63, 71, 0.08);
  --header-height: 4.75rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  font-family: "Nunito", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  padding-top: var(--header-height);
}

img { max-width: 100%; display: block; }

a { color: var(--blue-dark); }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

section[id] { scroll-margin-top: var(--header-height); }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover { background: var(--blue-dark); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--blue-dark);
  border: 2px solid var(--blue);
}

.btn-outline:hover { background: var(--blue); color: var(--white); }

.btn-small { padding: 0.45rem 1.2rem; font-size: 0.92rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}

.logo-link { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }

.logo-link img { height: 58px; width: auto; }

/* Kontakt-Schnellbutton (nur mobil sichtbar) */
.header-contact-mobile {
  display: none;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  background: var(--blue);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.main-nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover { background: var(--blue-light); color: var(--blue-dark); }

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 11rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.35rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 110;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: block;
  white-space: nowrap;
  text-align: left;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
/* Slider + Textbalken füllen zusammen genau die Bildschirmhöhe,
   sodass der Balken mit dem unteren Bildschirmrand abschließt. */
.hero {
  background: var(--blue-light);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  min-height: 480px;
}

.hero-slider {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slider .slide.active { opacity: 1; }

.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.slider-dots button.active { background: var(--blue); }

.hero-text { text-align: center; padding: 2.2rem 0 2.6rem; }

.hero-text .hero-sub {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  color: var(--blue-dark);
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.hero-text .hero-title {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--text);
}

/* ---------- Sektionen allgemein ---------- */
.section { padding: 4rem 0; }

.section.alt { background: var(--grey-light); }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--blue);
  border-radius: 2px;
  margin: 0.7rem auto 0;
}

.section-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.4rem;
}

/* ---------- Team ---------- */
.team-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 2.2rem auto;
  max-width: 900px;
}

/* 3 Mitarbeiter pro Reihe; unvollständige letzte Reihe wird zentriert */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.6rem;
  margin-top: 2rem;
}

.team-grid .member-card {
  flex: 0 1 calc((100% - 2 * 1.6rem) / 3);
  max-width: calc((100% - 2 * 1.6rem) / 3);
}

.member-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-align: center;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.member-card:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--shadow);
  border-color: var(--blue);
}

.member-card img {
  width: 100%;
  aspect-ratio: 3 / 3.4;
  object-fit: cover;
  object-position: top center;
}

.member-info { padding: 1.2rem 1rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }

.member-info .member-title { color: var(--blue-dark); font-size: 0.9rem; font-weight: 700; }

.member-info h3 { font-size: 1.15rem; }

.member-info .member-phone { font-size: 0.95rem; color: var(--text); }

.member-info .btn { margin-top: auto; align-self: center; margin-top: 0.9rem; }

/* ---------- Dienstleistungen ---------- */
.services-action { text-align: center; margin-bottom: 2rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.service-card {
  background: var(--white);
  border: 1px solid #e4e5e1;
  border-left: 5px solid var(--grey);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s ease;
}

.service-card:hover { transform: translateY(-3px); }

.service-card.featured {
  border-left-color: var(--blue);
  background: var(--blue-light);
}

.service-card h3 { font-size: 1.12rem; }

.service-card p { font-size: 0.95rem; }

.service-card .btn { align-self: flex-start; margin-top: auto; }

.services-more { display: none; margin-top: 1.2rem; }

.services-more.open { display: grid; }

.services-toggle-wrap { text-align: center; margin-top: 1.8rem; }

/* ---------- Kontakt ---------- */
.contact-head { text-align: center; margin-bottom: 2rem; }

.contact-head p { font-size: 1.1rem; }

.contact-head .contact-appointment {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}

.contact-head .contact-appointment a {
  color: inherit;
  text-decoration: none;
}

.contact-head .contact-appointment a:hover { text-decoration: underline; }

.contact-head .btn { margin-bottom: 2rem; }

.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2.6rem;
}

.contact-block .contact-img,
.contact-block .contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 300px;
}

.contact-block .contact-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-block iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
  display: block;
}

.contact-sub {
  text-align: center;
  margin: 0 0 1.4rem;
}

.contact-sub h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }

.contact-cta { text-align: center; margin-top: -1rem; margin-bottom: 1rem; }

/* ---------- Buch ---------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.book-card img {
  max-height: 420px;
  width: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.book-card .btn { align-self: center; margin-top: auto; }

/* ---------- Galerie ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease;
}

.gallery-grid img:hover { transform: scale(1.03); }

.gallery-action { text-align: center; margin-top: 2rem; }

/* ---------- App ---------- */
.app-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.app-badges img { height: 62px; width: auto; }

.app-badges a { transition: transform 0.2s ease; display: block; }

.app-badges a:hover { transform: scale(1.05); }

.app-video {
  max-width: 860px;
  margin: 0 auto;
}

.app-video video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue);
  color: var(--white);
  padding: 2.6rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.6rem;
}

.footer-address { font-style: normal; line-height: 1.7; }

.footer-address strong { font-size: 1.06rem; }

.site-footer .btn {
  background: var(--white);
  color: var(--blue-dark);
}

.site-footer .btn:hover { background: var(--blue-light); }

/* ---------- Unterseiten ---------- */
.page-hero-img {
  max-width: 1100px;
  margin: 2rem auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-hero-img img { width: 100%; object-fit: cover; max-height: 540px; }

.prose {
  max-width: 820px;
  margin: 0 auto;
}

.prose h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 1.4rem; }

.prose h2 { font-size: 1.45rem; margin: 2.2rem 0 0.8rem; color: var(--blue-dark); }

.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 0.6rem; }

.prose p { margin-bottom: 1rem; }

.prose ul { margin: 0 0 1rem 1.4rem; }

.prose li { margin-bottom: 0.7rem; }

.prose li ul { margin-top: 0.5rem; }

.lead {
  font-size: 1.08rem;
}

/* ---------- Q&A Accordion ---------- */
.accordion { max-width: 820px; margin: 0 auto; }

.accordion details {
  background: var(--white);
  border: 1px solid #e4e5e1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.3rem;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--blue-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--blue);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.accordion details[open] summary::after { transform: rotate(45deg); }

.accordion .accordion-body { padding: 0 1.3rem 1.2rem; }

.accordion .accordion-body p { margin-bottom: 0.9rem; }

.accordion .accordion-body ul { margin: 0 0 0.9rem 1.3rem; }

/* ---------- Mitarbeiter-Detailseiten ---------- */
.cv-header {
  text-align: center;
  margin-bottom: 2rem;
}

.cv-header .member-title { color: var(--blue-dark); font-weight: 700; }

.cv-photo {
  max-width: 640px;
  margin: 2rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ---------- Abwechselnde Text-Bild-Karten ---------- */
.split-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.4rem;
  align-items: center;
  background: var(--white);
  border: 1px solid #e4e5e1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 2rem 2.2rem;
  margin: 0 auto 2.2rem;
  max-width: 1050px;
}

.split-row:last-of-type { margin-bottom: 0; }

.split-row.reverse .split-text { order: 2; }

.split-row.reverse .split-img { order: 1; }

.split-text h2 { font-size: 1.45rem; margin-bottom: 0.8rem; color: var(--blue-dark); }

.split-text p { margin-bottom: 1rem; }

.split-text p:last-child { margin-bottom: 0; }

.split-text ul { margin: 0 0 1rem 1.4rem; }

.split-text li { margin-bottom: 0.55rem; }

.split-text li ul { margin-top: 0.45rem; }

.split-img img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .split-row {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1.4rem;
  }

  /* Auf dem Handy steht der Text immer oben */
  .split-row.reverse .split-text { order: 1; }
  .split-row.reverse .split-img { order: 2; }
}

/* ---------- Dentalzentrum Collage ---------- */
.dz-figure {
  margin: 2rem auto;
  max-width: 820px;
}

.dz-figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dz-figure figcaption {
  text-align: center;
  font-size: 0.92rem;
  color: var(--blue-dark);
  margin-top: 0.5rem;
}

.dz-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  max-width: 900px;
  margin: 2rem auto;
}

.dz-duo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --header-height: 4rem; }

  /* Team: 2 pro Zeile, letzte Karte zentriert */
  .team-grid .member-card {
    flex-basis: calc((100% - 1.6rem) / 2);
    max-width: calc((100% - 1.6rem) / 2);
  }

  .nav-toggle { display: block; }

  .header-contact-mobile { display: inline-flex; align-items: center; margin-left: auto; }

  .site-header { position: fixed; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 1.2rem 1.2rem;
    box-shadow: var(--shadow);
    gap: 0.2rem;
  }

  .main-nav.open { display: flex; }

  .main-nav a { padding: 0.8rem 1rem; border-radius: 10px; text-align: center; }

  .nav-dropdown { width: 100%; }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    background: transparent;
    padding: 0.15rem 0 0.35rem;
  }

  .nav-dropdown-menu a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--blue-dark);
    text-align: center;
  }

  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .contact-block { grid-template-columns: 1fr; }

  .dz-duo { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }

  /* Auf dem Handy: Balken beginnt direkt unter dem Bild */
  .hero { height: auto; min-height: 0; }

  /* Bild in voller Breite zeigen, ohne hineinzuzoomen */
  .hero-slider {
    flex: none;
    height: auto;
    min-height: 0;
    aspect-ratio: 3000 / 1818;
  }

  .hero-slider .slide img { object-fit: contain; object-position: center; }

  .hero-text { padding: 1.6rem 0 2rem; }

  .logo-link img { height: 48px; }
}

@media (max-width: 560px) {
  .team-grid .member-card {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* ============================================================
   Admin-Bereich
   ============================================================ */
.btn-danger { background: #c0504d; color: var(--white); }
.btn-danger:hover { background: #a23f3d; }

/* Header: Navigation auch auf dem Smartphone sichtbar lassen */
.admin-header .main-nav {
  display: flex;
  position: static;
  flex-direction: row;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0.6rem;
}
.admin-header .main-nav a {
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
}

/* ---------- Login ---------- */
.admin-login {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(132, 153, 180, 0.25), transparent 60%),
    var(--blue-light);
}

.admin-login-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.6rem 2rem 2.2rem;
  text-align: center;
}

.admin-login-logo { height: 66px; width: auto; margin: 0 auto 1.1rem; }
.admin-login-card h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.admin-login-sub { color: var(--grey); margin-bottom: 1.6rem; }
.admin-login form { display: flex; flex-direction: column; gap: 1.1rem; text-align: left; }

.admin-btn-block { width: 100%; text-align: center; }

/* ---------- Panel ---------- */
.admin-panel { padding-top: 2.5rem; padding-bottom: 3rem; background: var(--grey-light); min-height: 100vh; }
.admin-page-head { margin-bottom: 2rem; }
.admin-page-head h1 { font-size: 2rem; }
.admin-page-head p { color: var(--grey); margin-top: 0.2rem; }

.admin-block {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem;
  margin-bottom: 1.8rem;
}

.admin-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.admin-block-head h2 { font-size: 1.4rem; }
.admin-block-sub { color: var(--grey); font-size: 0.95rem; margin-top: 0.25rem; max-width: 60ch; }
.inline-handle { color: var(--blue); font-weight: 700; }

/* ---------- Formularfelder ---------- */
.admin-form { display: flex; flex-direction: column; gap: 1.1rem; }

.admin-form label,
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.admin-field-narrow { max-width: 220px; }

.admin-login input[type="password"],
.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="number"] {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--grey);
  border-radius: 10px;
  font-weight: 400;
  width: 100%;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-login input:focus,
.admin-form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(132, 153, 180, 0.2);
}

.admin-form input[type="file"] {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  width: 100%;
}

.admin-card {
  background: var(--grey-light);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-top: 1.4rem;
}
.admin-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.admin-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }

/* ---------- Mitarbeiter-Liste ---------- */
.admin-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.2rem; }

.admin-list-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-list-row:hover { border-color: var(--blue); }

.admin-list-name { flex: 1; font-weight: 700; }
.admin-list-order { color: var(--grey); font-weight: 700; font-size: 0.85rem; }

.admin-thumb-sm {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.admin-thumb {
  max-width: 150px;
  border-radius: 10px;
}

.admin-image-field { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }

/* ---------- Upload-Felder (Galerie + Mitarbeiterbilder) ---------- */
.admin-upload-form { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.admin-upload-form .admin-dropzone { width: 100%; }

.admin-field-label { font-weight: 700; font-size: 0.9rem; color: var(--text); }

.admin-dropzone {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.6rem;
  border: 2px dashed var(--grey);
  border-radius: var(--radius);
  background: var(--grey-light);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.admin-dropzone:hover { border-color: var(--blue); background: var(--blue-light); }
.admin-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.admin-dropzone-sm { padding: 1rem; }
.admin-dropzone-text { font-weight: 700; color: var(--text); }
.admin-dropzone-hint { font-size: 0.85rem; color: var(--grey); }

/* ---------- Galerie-Gitter ---------- */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.admin-gallery-cell {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: grab;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.admin-gallery-cell:hover { box-shadow: var(--shadow); }
.admin-gallery-cell:active { cursor: grabbing; }
.admin-gallery-cell.dragging { opacity: 0.4; transform: scale(0.97); }
.admin-gallery-cell.drag-over { outline: 3px solid var(--blue); outline-offset: -3px; }

.admin-gallery-cell img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-drag-handle {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-radius: 8px;
  padding: 0.1rem 0.45rem;
  font-size: 1rem;
  line-height: 1.4;
  user-select: none;
  pointer-events: none;
}

.gallery-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(192, 80, 77, 0.92);
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.gallery-delete:hover { background: #a23f3d; }

.admin-error { color: #c0504d; font-weight: 700; min-height: 1.2em; }
.admin-success { color: #2e7d32; }

/* ---------- Mitarbeiter Drag & Drop ---------- */
.drag-handle {
  cursor: grab;
  color: var(--grey);
  font-size: 1.3rem;
  line-height: 1;
  user-select: none;
  padding: 0 0.3rem;
}
.drag-handle:active { cursor: grabbing; }
.admin-list-row.dragging {
  opacity: 0.6;
  border-color: var(--blue);
  background: var(--blue-light);
}

/* ---------- Toast ---------- */
.admin-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(160%);
  background: var(--text);
  color: var(--white);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
  z-index: 300;
  transition: transform 0.3s ease;
  max-width: 90vw;
}
.admin-toast.show { transform: translateX(-50%) translateY(0); }
.admin-toast.error { background: #c0504d; }
.admin-toast.success { background: #2e7d32; }

/* ---------- Rich-Text-Editor ---------- */
.cv-editor-wrap { width: 100%; }
.cv-editor-wrap .ql-toolbar.ql-snow {
  border-color: var(--grey-light);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background: var(--grey-light);
}
.cv-editor-wrap .ql-container.ql-snow {
  border-color: var(--grey-light);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}
#cv-editor .ql-editor { min-height: 240px; }
#detail-title-editor .ql-editor { min-height: 70px; }

/* Lebenslauf-Editor einklappbar */
.cv-editor-wrap.collapsed { position: relative; }
.cv-editor-wrap.collapsed .ql-container.ql-snow {
  max-height: 220px;
  overflow: hidden;
}
.cv-editor-wrap.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--white));
  pointer-events: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.cv-toggle {
  margin-top: 0.6rem;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--blue-dark);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.cv-toggle:hover { color: var(--blue); }

/* Titel-Zeilen auf der Detailseite kompakt halten */
.cv-header .member-title p { margin: 0; }

@media (max-width: 640px) {
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-block { padding: 1.3rem; }
  .admin-block-head .btn { width: 100%; }

  .admin-list-row { flex-wrap: wrap; row-gap: 0.6rem; }
  .admin-list-name { flex: 1 1 auto; }
  .admin-list-row .btn-small { flex: 1 1 40%; text-align: center; }
}
