/* =========================================================
   Arztpraxis – Basis CSS Styles (verbessert, themenfähig)
   ========================================================= */

/* ---------- Theme-Variablen ---------- */
:root {
  --bg: #ffffff;
  --text: #222222;
  --panel: #fafafa;
  --header: #f8f8f8;
  --border: #dddddd;
  --muted-border: #eeeeee;
  --link: #333333;
  --hover: #eeeeee;
  --icon: #333333;
  --button-fade-1: #dbd8d8;
  --button-fade-2: #9c9a9a;

  /* Cookie-Banner Farben */
  --cookiebgray: #666666;
  --cookiebslidefade1green: #4CAF50;
  --cookiebslidefade2green: #45a049;
  --cookiebslidefade1grey: #9E9E9E;
  --cookiebslidefade2grey: #757575;
  --cookiebslidefade1red: #f44336;
  --cookiebslidefade2red: #da190b;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --panel: #0f172a;
  --header: #0f172a;
  --border: #1f2937;
  --muted-border: #1f2937;
  --link: #e5e7eb;
  --hover: #1f2937;
  --icon: #e5e7eb;
  --button-fade-1: #3e74f1;
  --button-fade-2: #294ea3;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 100%;
  padding: 0;
}

h1, h2, h3 {
  margin: 0 0 15px 0;
  font-weight: bold;
}

p {
  margin: 0 0 15px 0;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 10px;
}

/* ---------- Header / Nav ---------- */
.header {
  position: sticky;
  top: 0;
  background-color: var(--header);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  isolation: isolate; /* verhindert Überlappungen vom Hero */
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  padding: 5px;
  gap: 10px;
}

.logo {
  font-size: 20px;
  font-weight: bold;
}

.logo img {
  max-width: 60px;
  display: flex;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: var(--link);
  padding: 6px 10px;
  border-radius: 6px;
}

.nav-links li a:hover {
  background-color: var(--hover);
}

.moblie {
  display: none;
}

/* Mobile Ansicht */
@media (max-width: 768px) {
  .logo {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: auto;
    margin-left: 17%;
  }

  .logo img {
    max-width: 60px;
    height: auto;
    display: block;
    height: auto;
  }
}


/* ---------- Hero Slider Navigation ---------- */
.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: 0;
  border: none;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  color: #ffffff;
  z-index: 1;
  border-radius: 50%;
}

.slider-nav-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

.slider-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-nav-btn.prev {
  left: 20px;
}

.slider-nav-btn.next {
  right: 20px;
}

/* SVG Arrow Styling */
.slider-nav-btn .arrow-icon {
  width: 100%;
  height: 100%;
  color: inherit;
  transition: filter .2s ease;
}

.slider-nav-btn:hover .arrow-icon {
  filter: brightness(1.2);
}

/* Responsive Anpassungen für Hero-Slider */
@media (max-width: 720px) {
  .slider-nav-btn {
    width: 40px;
    height: 40px;
  }

  .slider-nav-btn .arrow-icon {
    width: 20px;
    height: 20px;
  }

  .slider-nav-btn.prev {
    left: 10px;
  }

  .slider-nav-btn.next {
    right: 10px;
  }
}

/* ---------- Burger (mobil) ---------- */
.nav-burger {
  display: none;
  background: none;
  border: 1px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-burger .burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--link);
  margin: 4px;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-burger.is-open .burger-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-burger.is-open .burger-line:nth-child(2) {
  opacity: 0;
}

.nav-burger.is-open .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-burger {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    background: var(--header);
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 12px;
    z-index: 90;
    max-width: 720px;
  }

  .nav-links.is-open {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 700px;
  overflow: hidden;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.slider {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.slides {
  display: flex;
  transition: transform .5s ease-in-out;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
}

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

/* ---------- News ---------- */
.news {
  padding: 40px 0;
}

.news-scroll-container {
  overflow: hidden;
  position: relative;
  max-width: calc(320px * 3.5 + 20px * 3);
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.news-slider {
  display: flex;
  flex-direction: row;
  gap: 20px;
  transition: transform .5s ease;
  padding-left: 80px;
  /* Platz für prev-Button */
  padding-top: 15px;
  padding-bottom: 15px;
}

.news-card {
  flex: 0 0 290px;
  height: 200px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  opacity: 0.9;
}

.news-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

/* Begrenze auf 5 Boxen */
.news-slider>.news-card:nth-child(n+6) {
  display: none;
}

/* Buttons */
.news-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: 0;
  border: none;
  width: 60px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease;
  color: var(--text);
  z-index: 1;
}

.news-nav-btn:hover .arrow-icon {
  filter: brightness(0.8);
}

.news-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.news-nav-btn.prev {
  left: 10px;
}

.news-nav-btn.next {
  right: 10px;
}

.news-nav-btn.prev:before,
.news-nav-btn.next:before {
  content: "";
  position: absolute;
  left: -4em;
  width: 4em;
  height: 100%;
  top: 0;
  transition: transform .4s ease-in-out;
}

/* SVG Arrow Styling */
.arrow-icon {
  width: 100px;
  height: 100px;
  color: inherit;
  transition: filter .2s ease;
}

.news-nav-btn .arrow {
  display: none;
}

@media (max-width: 1000px) {
  .news-card {
    flex: 0 0 280px;
    height: 180px;
    font-size: 15px;
  }

  .news-scroll-container {
    max-width: calc(280px * 2.5 + 15px * 2 + 60px);
  }

  .news-slider {
    gap: 15px;
    padding-left: 50px;
  }

  .news-nav-btn {
    width: 50px;
    height: 180px;
  }

  .arrow-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 720px) {
  .news-card {
    flex: 0 0 240px;
    height: 200px;
    font-size: 14px;
  }

  .news-scroll-container {
    max-width: calc(240px * 1.5 + 10px * 1 + 40px);
  }

  .news-slider {
    gap: 10px;
    padding-left: 40px;
  }

  .news-nav-btn {
    width: 40px;
    height: 160px;
  }

  .arrow-icon {
    width: 16px;
    height: 16px;
  }
}

/* iOS-spezifische Optimierung */
@media screen and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 2) {
  .news-slider {
    transition: transform 0.3s ease;
  }
}

/* ---------- Popup-Styling (News & Kontakt & Profil) ---------- */
.popup {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.popup-content {
  background-color: var(--bg);
  margin: 15% auto;
  padding: 20px;
  border: 1px solid var(--border);
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: var(--text);
  text-decoration: none;
}

/* CV-spezifisches Styling */
.cv-header {
  text-align: center;
  border-bottom: 2px solid var(--button-fade-1);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.cv-section {
  margin-bottom: 15px;
}

.cv-section h3 {
  color: var(--button-fade-1);
  margin-bottom: 5px;
  font-size: 16px;
}

.cv-section ul {
  margin: 5px 0;
  padding-left: 20px;
}

.cv-section li {
  margin-bottom: 5px;
}

/* ---------- Digitale Services ---------- */
.digital-services {
  padding: 40px 0;
}

.digital-services .digital-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.digital-service-item {
  border: 1px solid var(--border);
  padding: 20px;
  text-align: left;
  background-color: var(--panel);
  border-radius: 6px;
  display: grid;
  align-content: space-between;
}

.digital-service-heading {
  text-align: center;
  max-height: 38px;
}

.digital-service-item .button {
  display: inline-block;
  max-height: 40px;
  align-self: end;
}

/* ---------- Sprechzeiten & Notfall ---------- */
.times {
  padding: 40px 0;
}

.times .times-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.open-hours,
.emergency {
  border: 1px solid var(--border);
  padding: 20px;
  background-color: var(--panel);
  border-radius: 6px;
}

.numbertable {
  text-align: left;
  width: 100%;
  height: 80%;
}

.open-hours table {
  width: 100%;
  border-collapse: collapse;
}

.open-hours th,
.open-hours td {
  padding: 8px;
  border-bottom: 1px solid var(--muted-border);
  text-align: left;
}

.emergency ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.emergency li {
  padding: 8px 0;
  border-bottom: 1px solid var(--muted-border);
}

.emergency li:last-child {
  border-bottom: 0;
}

/* ---------- Leistungen ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  min-width: 100%;
}

.service-card {
  border: 1px solid var(--border);
  padding-right: 20px;
  padding-left: 20px;
  text-align: left;
  background-color: var(--panel);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.service-card h2 {
  color: var(--text);
  margin: 0;
  padding: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
}

.service-card-text {
  padding-bottom: 15px;
  padding-left: 0px;
  padding-right: 0px;
  line-height: 1.6;
  color: var(--text);
}

.service-card-text ul {
  padding-left: 0px;
  padding-right: 0px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card h2 .arrow {
  display: none;
  font-size: 1em;
  transition: transform 0.3s ease;
  line-height: 1.2em; /* Höhenanpassung für vertikale Zentrierung */
}

.service-card.active h2 .arrow {
  transform: rotate(180deg);
}

/* Service-spezifisches Styling */
.service-card-header {
  text-align: center;
}

/* Mobile Ansicht */
@media (max-width: 768px) {
  .services {
    grid-template-columns: 1fr;
  }
  .services .container{
    min-width: 100%;
  }
  .service-card {
    box-sizing: border-box; /* Padding in Breite einbeziehen */
  }

  .service-card h2 .arrow {
    display: inline-block;
  }

  .service-card-text {
    display: none;
  }

  .service-card.active .service-card-text {
    display: block;
  }
}

/* Desktop Ansicht */
@media (min-width: 769px) {
  .service-card h2 {
    cursor: default;
  }

  .service-card-text+ {
    display: block !important;
  }
}


/* ---------- Team ---------- */
.team {
  padding: 40px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-items: center;
}

.team-card {
  text-align: center;
  cursor: pointer;
  display: inherit;
  margin: 10px;
  transition: opacity .2s;
}

.team-card:hover {
  opacity: 0.7;
}

.team-card img {
  border-radius: 10px;
  border: 1px solid var(--border);
  max-width: 200px;
}

.team-card p {
  margin: 5px 0 0 0;
  color: var(--text);
}

.team-name {
  font-weight: bold;
  margin-top: 10px;
}

.team-role {
  color: #888;
  font-size: 14px;
}

/* ---------- Kontakt ---------- */
.contact {
  padding: 40px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

.contact-info,
.map {
  border: 1px solid var(--border);
  padding: 20px;
  background-color: var(--panel);
  border-radius: 6px;
}

.map iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 6px;
  display: grid;
}

.contact-grid > div {
  display: flex;
  flex-direction: column; 
}

.contact-info,
.map {
  min-height: 200px; 
  display: flex;
  flex-direction: column;
  justify-content: center;
} 

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  background-color: var(--header);
  text-align: center;
}

.footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.footer a {
  text-decoration: none;
  color: var(--link);
}

.footer a:hover {
  text-decoration: underline;
}

/* ---------- Buttons ---------- */
.button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(to right,
      transparent 1%,
      var(--cookiebslidefade1grey) 40%,
      var(--cookiebslidefade2grey) 60%,
      transparent 100%);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all .3s ease;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.button.termin {
  align-items: center;
  gap: 0.5em;
  position: relative;
  letter-spacing: 0.06em;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all .3s;
  line-height: 1.0em;
  border: 2px solid var(--cookiebgray);
  background: linear-gradient(to right,
      #8282821a 1%,
      transparent 40%,
      transparent 60%,
      #8282821a 100%);
  color: var(--text);
  box-shadow: inset 0 0 10px #4f4f4f66, 0 0 9px 3px #1bfd9c1a;
}

.button.termin:hover {
  color: var(--text);
  box-shadow: inset 0 0 10px var(--cookiebslidefade1grey), 0 0 9px 3px var(--cookiebslidefade2grey);
}

.button.termin:before {
  content: "";
  position: absolute;
  left: -4em;
  width: 4em;
  height: 100%;
  top: 0;
  transition: transform .4s ease-in-out;
  background: linear-gradient(to right,
      transparent 1%,
      var(--cookiebslidefade1green) 40%,
      var(--cookiebslidefade2green) 60%,
      transparent 100%);
}

button.termin .icon {
  display: none;
}


/* ---------- Kontakt-Popup spezifisch ---------- */
.contact-popup {
  background-color: var(--panel);
  margin: 15% auto;
  padding: 10px;
  border: 1px solid var(--border);
  width: 80%;
  max-width: 800px;
  border-radius: 8px;
  position: relative;
}

.contact-form-container {
  padding: 30px;
  margin-top: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Grid für Vorname + Nachname und E-Mail + Telefon */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.contact-form-container label {
  display: block;
  margin: 5px;
  font-weight: bold;
  color: var(--text);
}

.contact-form-container input[type="text"],
.contact-form-container input[type="date"],
.contact-form-container input[type="email"],
.contact-form-container input[type="tel"],
.contact-form-container select,
.contact-form-container textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  color: var(--text);
  background-color: var(--panel);
}

.contact-form-container textarea {
  min-height: 100px;
  resize: vertical;
}

/* Submit-Button */
.contact-form-container input[type="submit"] {
  background-color: var(--button-fade-2);
  color: var(--text);
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .3s;
  margin-top: 10px;
}

.contact-form-container input[type="submit"]:hover {
  background-color: var(--button-fade-2);
}

/* Checkbox für Datenschutzerklärung */
.contact-form-container .privacy {
  display: flex;
  align-items: center;
}

.contact-form-container .privacy input {
  margin-right: 10px;
}

/* ---------- Cookie Banner ---------- */
.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 750px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cookie-content {
  text-align: left;
}

.cookie-content h2 {
  margin: 0 0 16px 0;
  font-size: 24px;
  color: var(--text);
}

.cookie-content p {
  margin: 0 0 20px 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

.cookie-content a {
  color: var(--link);
  text-decoration: underline;
}

.cookie-content a:hover {
  text-decoration: none;
}

.cookie-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.cookie-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  padding: 12px;
  background-color: var(--panel);
  border: 1px solid var(--muted-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
}

.cookie-label:hover {
  background-color: var(--hover);
  border-color: var(--border);
}

.cookie-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--button-fade-1);
  cursor: pointer;
}

.cookie-label input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-label span {
  flex: 1;
  color: var(--text);
}

.cookie-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cookiebutton {
  font-size: 15px;
  padding: 0.7em 2.7em;
  letter-spacing: 0.06em;
  position: relative;
  font-family: inherit;
  border-radius: 0.6em;
  overflow: hidden;
  transition: all .3s;
  line-height: 1.4em;
  border: 2px solid var(--cookiebgray);
  background: linear-gradient(to right,
      #8282821a 1%,
      transparent 40%,
      transparent 60%,
      #8282821a 100%);
  color: var(--text);
  box-shadow: inset 0 0 10px #4f4f4f66, 0 0 9px 3px #1bfd9c1a;
  flex: 1;
  min-width: 140px;
  cursor: pointer;
}

.cookiebutton:hover {
  color: #cfcfcf;
}

.cookiebutton:before {
  content: "";
  position: absolute;
  left: -4em;
  width: 4em;
  height: 100%;
  top: 0;
  transition: transform .4s ease-in-out;
}

#cookie-accept-all:hover {
  color: var(--text);
  box-shadow: inset 0 0 10px var(--cookiebslidefade1green), 0 0 9px 3px var(--cookiebslidefade2green);
}

#cookie-accept-all:before {
  background: linear-gradient(to right, transparent 1%,
      var(--cookiebslidefade1green) 40%,
      var(--cookiebslidefade2green) 60%,
      transparent 100%);
}

#cookie-save:hover {
  color: var(--text);
  box-shadow: inset 0 0 10px var(--cookiebslidefade1grey), 0 0 9px 3px var(--cookiebslidefade2grey);
}

#cookie-save:before {
  background: linear-gradient(to right, transparent 1%,
      var(--cookiebslidefade1grey) 40%,
      var(--cookiebslidefade2grey) 60%,
      transparent 100%);
}

#cookie-reject:hover {
  color: var(--text);
  box-shadow: inset 0 0 10px var(--cookiebslidefade1red), 0 0 9px 3px var(--cookiebslidefade2red);
}

#cookie-reject:before {
  background: linear-gradient(to right, transparent 1%,
      var(--cookiebslidefade1red) 40%,
      var(--cookiebslidefade2red) 60%,
      transparent 100%);
}

.cookiebutton:hover:before {
  transform: translateX(15em);
}

.cookiebutton:focus {
  outline: 2px solid var(--button-fade-1);
  outline-offset: 2px;
}

.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* Mobile Anpassung für Cookie-Banner */
@media (max-width: 768px) {
  .cookie-modal {
    width: 95%;
    padding: 20px;
    margin: 10px;
    top: 0;
    left: 0;
    transform: none;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .cookie-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
  }

  .cookie-content h2 {
    font-size: 20px;
  }

  .cookie-content p {
    font-size: 14px;
  }

  .cookie-categories {
    gap: 12px;
  }

  .cookie-label {
    padding: 10px;
    font-size: 14px;
  }

  .cookie-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .cookie-buttons {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  .cookiebutton {
    min-width: 100%;
    padding: 0.8em 1.5em;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .cookie-modal {
    padding: 16px;
  }

  .cookie-content h2 {
    font-size: 18px;
  }

  .cookie-content p {
    font-size: 13px;
  }

  .cookie-label {
    padding: 8px;
    font-size: 13px;
  }

  .cookiebutton {
    padding: 0.9em 1.2em;
    font-size: 15px;
  }
}

/* Dark Mode Feinschliff */
html[data-theme="dark"] .cookie-label {
  background-color: var(--panel);
}

html[data-theme="dark"] .cookiebutton {
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .cookiebutton:hover {
  color: #e5e7eb;
}

/* ---------- Responsive Tweaks ---------- */
@media screen and (max-width: 720px) {
  .times .times-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .team-card {
    margin: 5px;
  }

  .team-card img {
    margin: 5px;
    max-width: 90%;
  }

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

  .footer {
    grid-template-columns: 1fr;
  }

  .footer ul {
    display: block;
  }

  .navbar {
    max-width: 100%;
  }

  .open-hours,
  .emergency {
    padding: 10px;
  }

  .hero {
    height: auto;
  }

  body {
    font-size: 16px;
  }

  .container {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .button {
    position: relative;
    padding: 7px 11px;
  }

  .button.termin .btn-text {
    display: none;
  }

  .button.termin .moblie {
    display: inline-block;
    width: 3.4em;
    height: 1.2em;
    color: var(--text);
    padding-top: 0.1em;
  }

  .digital-services .digital-services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .digital-service-item {
    padding: 20px;
    text-align: left;
    display: grid;
    align-content: space-between;
    gap: 20px;
  }

  .digital-service-item .button {
    display: inline-block;
    min-height: 50px;
    align-self: end;
  }

  .digital-service-item .button.termin .btn-text {
    display: block;
  }
}

@media screen and (min-width: 481px) and (max-width: 1000px) {
  .digital-service-item {
    gap: inherit;
  }
}

/* Theme toggle – mit echtem <img> (iOS-sicher) */
/* Theme toggle – mit echtem <img> (iOS-sicher) */
.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--icon);
}

.theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Das Icon selbst */
#theme-toggle-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.theme-toggle:hover #theme-toggle-icon { filter: brightness(0.9); }
}