/* =========================================
   KOMPONENTEN (Wiederverwendbare Elemente)
   - Kacheln (tile, praxis-tile, index-tile, leistungen-tile)
   - Icon-Styling
   - Ausbildungs-Statistiken
   ========================================= */

/* --- Ausbildungs-Statistiken --- */
.ausbildung-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stat-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #afd0c2ff 0%, #5c9d81ff 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
}

.stat-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.stat-label {
  text-align: center;
  font-size: 0.9rem;
  color: #2c4770;
  line-height: 1.3;
}

.stat-total .stat-circle {
  background: linear-gradient(135deg, #5f7597 0%, #0c2348 100%);
  width: 60px;
  height: 60px;
  font-size: 1.3rem;
}

.stat-total .stat-circle::after {
  content: "h";
  font-size: 0.7rem;
  font-weight: normal;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.stat-total .stat-label {
  font-weight: bold;
  font-size: 1rem;
}

/* Link in Praxis-Tile unauffällig */
.praxis-tile a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.praxis-tile a:hover {
  color: #277453ff;
  text-decoration: underline;
}

/* --- Standard Tile (Leistungen-Grid) --- */
.tile {
  background: #f7f5f2;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  color: #2c4770;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tile .tile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 10px;
}

.tile h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #2c4770ff;
}

.tile .icon img {
  width: 48px;
  height: 48px;
  opacity: 0.9;
}

/* --- Große Kacheln (Praxisinfo, Index, Leistungen) --- */
.praxis-tile,
.index-tile,
.leistungen-tile {
  background: #f7f5f2;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  color: #2c4770;
  display: block;
  text-decoration: none;
}

.praxis-tile:hover,
.index-tile:hover,
.leistungen-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

.praxis-tile h3,
.index-tile h3,
.leistungen-tile h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.praxis-tile h4,
.index-tile h4,
.leistungen-tile h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.praxis-tile p,
.index-tile p,
.leistungen-tile p {
  line-height: 1.7;
  margin: 0;
}

.praxis-tile ul,
.index-tile ul,
.leistungen-tile ul {
  line-height: 1.7;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.praxis-tile ul li,
.index-tile ul li,
.leistungen-tile ul li {
  margin-bottom: 0.8rem;
}

.contact-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- Formular-Kachel --- */
.formular-kachel {
  background: #f7f5f2;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  color: #2c4770;
}

.formular-kachel h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #2c4770;
}

.formular-kachel h3 {
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: #2c4770;
}

.formular-kachel label {
  font-weight: bold;
  margin-top: 15px;
  display: block;
  color: #2c4770;
}

.formular-kachel input[type="text"],
.formular-kachel input[type="email"],
.formular-kachel input[type="date"],
.formular-kachel input[type="file"],
.formular-kachel textarea,
.formular-kachel select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #d0ccc5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: white;
  box-sizing: border-box;
}

.formular-kachel .file-input {
  padding: 8px;
  cursor: pointer;
}

.formular-kachel textarea {
  resize: vertical;
}

.formular-kachel .row {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.formular-kachel .row > div {
  flex: 1;
}

.formular-kachel .checkbox-group {
  margin-top: 10px;
}

.formular-kachel .checkbox-group label {
  font-weight: normal;
  display: block;
  margin-top: 8px;
  cursor: pointer;
}

.formular-kachel .checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.formular-kachel .chat-threema-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.formular-kachel .chat-threema-row label {
  margin: 0;
  flex-shrink: 0;
}

.formular-kachel .threema-input {
  width: 140px;
  padding: 6px 10px;
  margin: 0;
  font-size: 0.9rem;
}

.formular-kachel .agb-label {
  font-weight: normal;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  position: relative;
  padding: 5px 0;
  line-height: 1.6;
  color: #2c4770;
}

.formular-kachel .agb-label input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
  min-width: 20px;
  min-height: 20px;
  -webkit-appearance: checkbox;
  appearance: checkbox;
  accent-color: #277453ff;
}

/* Links innerhalb des agb-label */
.formular-kachel .agb-label .link-popup {
  color: #277453ff;
  text-decoration: none;
  font-weight: 500;
  display: inline;
  cursor: pointer;
  transition: color 0.3s ease;
}

.formular-kachel .agb-label .link-popup:hover {
  color: #1f5940;
  text-decoration: underline;
}

.formular-kachel button {
  margin-top: 30px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  background: #2c4770;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.formular-kachel button:hover {
  background: #1e3250;
}

.formular-kachel .hidden {
  display: none !important;
}

.formular-kachel .field-error {
  border: 2px solid #590731 !important;
  background-color: rgba(89, 7, 49, 0.1) !important;
}

.formular-kachel .error-message {
  background-color: #590731;
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: bold;
  text-align: center;
}

/* --- Footer: links ausgerichtet und im Container wie auf der Startseite --- */
footer {
  padding: 28px 20px;
  background: transparent;
  color: #0c2348;
  font-size: 0.95rem;
  border-top: 1px solid rgba(12, 35, 72, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  flex-shrink: 0;
}

.footer-copyright {
  margin: 0;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
}

.footer-links {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0c2348;
  background: rgba(12, 35, 72, 0.06);
  border: 1px solid rgba(12, 35, 72, 0.16);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-link-facebook:hover,
.social-link-facebook:focus-visible {
  color: #fff;
  background: #1877f2;
  border-color: #1877f2;
  transform: translateY(-1px);
}

.social-link:focus-visible {
  outline: 2px solid #0c2348;
  outline-offset: 2px;
}

.footer-links a,
.cookie-settings-link {
  color: #0c2348 !important;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  cursor: pointer;
  position: relative;
  z-index: 10;
  white-space: nowrap;
  font-weight: 400;
  border: 0;
  font: inherit;
}

.footer-links a:hover,
.cookie-settings-link:hover {
  color: #277453 !important;
  text-decoration: underline;
  background: transparent !important;
}

.footer-links a:not(:last-child)::after {
  content: "|";
  margin-left: 15px;
  color: #0c2348;
  pointer-events: none;
}

.cookie-banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(12, 35, 72, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  z-index: 2000;
  animation: cookieOverlayIn 240ms ease-out;
}

@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .cookie-banner {
    background: rgba(12, 35, 72, 0.45);
  }
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  line-height: 1.5;
  font-size: clamp(0.92rem, 0.85rem + 0.25vw, 1rem);
}

.cookie-banner-card {
  width: min(620px, calc(100% - 20px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  background: #f7f5f2;
  color: #0c2348;
  border: 1px solid rgba(12, 35, 72, 0.2);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 18px;
  animation: cookieCardIn 280ms ease-out;
}

@keyframes cookieOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cookieCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-banner-card {
    animation: none !important;
  }
}

.cookie-banner-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 12px;
  aspect-ratio: 4 / 3;
}

.cookie-banner-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(175, 208, 194, 0.4);
  pointer-events: none;
}

.cookie-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cookie-banner a {
  color: #1f5940;
  font-weight: 600;
}

.cookie-banner-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn {
  border-radius: 8px;
  border: 1px solid #277453;
  padding: 8px 12px;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.cookie-btn-accept {
  background: #277453;
  color: #fff;
}

.cookie-btn-decline {
  background: #fff;
  color: #277453;
}

.cookie-btn-accept:hover {
  background: #1f5940;
  border-color: #1f5940;
}

.cookie-btn-decline:hover {
  background: #277453;
  color: #fff;
  border-color: #277453;
}

@media (max-width: 600px) {
  .cookie-banner {
    padding: 10px;
  }

  .cookie-banner-card {
    padding: 14px;
    max-height: calc(100dvh - 20px);
    border-radius: 12px;
  }

  .cookie-banner-image-wrap {
    aspect-ratio: 1 / 1;
  }

  .cookie-banner-actions {
    flex-direction: column;
    justify-content: stretch;
  }

  .cookie-btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .cookie-banner-card {
    padding: 12px;
  }

  .cookie-banner-image-wrap {
    aspect-ratio: 5 / 4;
  }
}
/* =========================================
   POPUP-LINKS UND MODAL
   ========================================= */

/* Grüne Links ohne Unterstreichung */
.link-popup {
  color: #277453ff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.3s ease;
}

.link-popup:hover {
  color: #1f5940;
  text-decoration: none;
}

/* Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

/* Popup Content Box */
.popup-content {
  background: #f7f5f2;
  border-radius: 12px;
  padding: 40px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Close Button */
.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  color: #590731ff;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.popup-close:hover {
  color: #277453ff;
  transform: rotate(90deg);
}

/* Popup Body Styling */
#popup-body h2 {
  color: #2c4770;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

#popup-body h3 {
  color: #2c4770;
  margin-top: 25px;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

#popup-body p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #2c4770;
}

#popup-body ul {
  margin: 10px 0;
  padding-left: 25px;
}

#popup-body ul li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: #2c4770;
}

#popup-body strong {
  color: #2c4770;
  font-weight: 600;
}

/* Responsive Popup */
@media (max-width: 768px) {
  .popup-content {
    padding: 30px 20px;
    max-height: 85vh;
  }

  #popup-body h2 {
    font-size: 1.5rem;
  }

  #popup-body h3 {
    font-size: 1.2rem;
  }

  .popup-close {
    font-size: 2rem;
    width: 35px;
    height: 35px;
  }
}
