/* === Kitas Page === */

/* Artik & Lozzi am oberen Header-Rand */
.ps-header-hanging-mascots {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}
.ps-header-hanging-mascots img {
  height: clamp(80px, 14vw, 160px);
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}
@media (max-width: 500px) {
  .ps-header-hanging-mascots img { height: 65px; }
}

.ps-header-hanging-mascots--custom img {
  height: clamp(112px, 17.5vw, 210px);
  max-width: min(94vw, 500px);
  object-fit: contain;
}

@media (max-width: 500px) {
  .ps-header-hanging-mascots--custom img {
    height: clamp(82px, 24vw, 130px);
    max-width: 88vw;
  }
}

.ps-kitas-hero {
  background: var(--brand-red);
  color: #fff;
  text-align: center;
  padding: 48px 20px 36px;
  position: relative;
  z-index: 1;
}
.ps-kitas-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); }
.ps-kitas-hero p { margin: 0; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); opacity: 0.9; }

/* Deko als ::before und ::after Pseudo-Elemente */
.ps-kita-card::before,
.ps-kita-card::after {
  content: "";
  position: absolute;
  width: 80px;
  aspect-ratio: 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 5;
}
.ps-kita-card::before { background-image: var(--deko-img); }
.ps-kita-card::after { background-image: var(--deko-img2); }

/* 16 Positionssets - Mix aus Paaren und Einzeln */
/* Paare eng zusammen */
.ps-kita-deko-0::before { top: -18px; left: 20px; }
.ps-kita-deko-0::after  { top: -14px; left: -15px; }

.ps-kita-deko-1::before { top: -16px; right: 25px; left: auto; }
.ps-kita-deko-1::after  { top: -20px; right: -10px; left: auto; }

.ps-kita-deko-2::before { bottom: -18px; left: 15px; top: auto; }
.ps-kita-deko-2::after  { bottom: -14px; left: -20px; top: auto; }

.ps-kita-deko-3::before { bottom: -16px; right: 20px; top: auto; left: auto; }
.ps-kita-deko-3::after  { bottom: -20px; right: -15px; top: auto; left: auto; }

.ps-kita-deko-4::before { top: -14px; right: 30px; left: auto; }
.ps-kita-deko-4::after  { top: -18px; right: -10px; left: auto; }

.ps-kita-deko-5::before { bottom: -18px; right: 25px; top: auto; left: auto; }
.ps-kita-deko-5::after  { bottom: -14px; right: -15px; top: auto; left: auto; }

.ps-kita-deko-6::before { top: -16px; left: 25px; }
.ps-kita-deko-6::after  { top: -20px; left: -15px; }

.ps-kita-deko-7::before { bottom: -14px; left: 20px; top: auto; }
.ps-kita-deko-7::after  { bottom: -18px; left: -20px; top: auto; }

/* Einzeln - nur ::before sichtbar, ::after versteckt */
.ps-kita-deko-8::before  { top: -18px; left: 40px; }
.ps-kita-deko-8::after   { display: none; }

.ps-kita-deko-9::before  { top: -16px; right: 50px; left: auto; }
.ps-kita-deko-9::after   { display: none; }

.ps-kita-deko-10::before { bottom: -18px; left: 30px; top: auto; }
.ps-kita-deko-10::after  { display: none; }

.ps-kita-deko-11::before { bottom: -16px; right: 40px; top: auto; left: auto; }
.ps-kita-deko-11::after  { display: none; }

.ps-kita-deko-12::before { top: -14px; right: 30%; left: auto; }
.ps-kita-deko-12::after  { display: none; }

.ps-kita-deko-13::before { bottom: -18px; right: 25%; top: auto; left: auto; }
.ps-kita-deko-13::after  { display: none; }

.ps-kita-deko-14::before { top: -16px; right: 20px; left: auto; }
.ps-kita-deko-14::after  { display: none; }

.ps-kita-deko-15::before { bottom: -14px; left: 15px; top: auto; }
.ps-kita-deko-15::after  { display: none; }

@media (max-width: 640px) {
  .ps-kita-card::before, .ps-kita-card::after { width: 50px; }
}

/* Sticky Nav */
.ps-kitas-nav {
  position: sticky; top: 0; z-index: 100;
  background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ps-kitas-nav-inner {
  display: flex; overflow-x: auto; gap: 0; padding: 0;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  justify-content: center;
}
.ps-kitas-nav-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 18px; text-decoration: none; color: #333;
  white-space: nowrap; border-bottom: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s; flex-shrink: 0;
}
.ps-kitas-nav-item:hover, .ps-kitas-nav-item:focus-visible {
  border-bottom-color: var(--brand-red); background: rgba(204,0,51,0.04); outline: none;
}
.ps-kitas-nav-name { font-weight: 700; font-size: 0.9rem; color: var(--brand-red); }
.ps-kitas-nav-loc { font-size: 0.75rem; color: #666; margin-top: 2px; }

/* Kita Cards */
.ps-kitas-list {
  max-width: 1100px; margin: 0 auto; padding: 48px 24px 60px;
  display: flex; flex-direction: column; gap: 32px;
  overflow: visible;
}
.ps-kita-card {
  background: #fff; border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  overflow: visible; scroll-margin-top: 70px;
  position: relative;
}
.ps-kita-card-inner {
  display: grid; grid-template-columns: 280px 1fr; gap: 0;
  border-radius: 14px; overflow: hidden;
}

/* Foto */
.ps-kita-image {
  position: relative; overflow: hidden; min-height: 260px;
  background: #f0f0f0;
}
.ps-kita-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.ps-kita-card:hover .ps-kita-image img { transform: scale(1.04); }

/* Info */
.ps-kita-info { padding: 24px; display: flex; flex-direction: column; }
.ps-kita-info h2 {
  margin: 0 0 2px; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); color: var(--brand-red);
}
.ps-kita-subtitle {
  display: inline-block; font-size: 0.85rem; color: #888; font-weight: 600; margin-bottom: 10px;
}
.ps-kita-text { font-size: 0.95rem; line-height: 1.6; color: #444; margin: 0 0 10px; }
.ps-kita-special {
  font-size: 0.85rem; color: #e88200; font-weight: 600; margin: 0 0 12px;
  padding: 6px 10px; background: rgba(232,130,0,0.06); border-radius: 8px;
}

/* Facts */
.ps-kita-facts {
  display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.82rem; color: #666; margin-bottom: 16px;
}
.ps-kita-facts span { white-space: nowrap; }
.ps-kita-facts a { color: var(--brand-red); text-decoration: none; }
.ps-kita-facts a:hover { text-decoration: underline; }

/* Buttons */
.ps-kita-actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.ps-kita-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; text-align: center; cursor: pointer; border: none; font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ps-kita-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.ps-kita-btn--primary { background: var(--brand-red); color: #fff; }
.ps-kita-btn--secondary { background: #fff; color: var(--brand-red); border: 2px solid var(--brand-red); }
.ps-kita-btn--hvv { background: #0a3d91; color: #fff; }

/* Team Members */
.ps-kita-team {
  display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.ps-kita-team-member {
  display: flex; align-items: center; gap: 10px;
}
.ps-kita-team-member img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--brand-red);
}
.ps-kita-team-member div { display: flex; flex-direction: column; }
.ps-kita-team-member strong { font-size: 0.9rem; color: #333; }
.ps-kita-team-member span { font-size: 0.8rem; color: #888; }

/* === Detail Modal === */
.ps-kita-detail-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
.ps-kita-detail-modal.open {
  display: flex; opacity: 1; pointer-events: auto;
}
.ps-kita-detail-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5); cursor: pointer;
}
.ps-kita-detail-content {
  position: relative; background: #fff; border-radius: 18px;
  max-width: 680px; width: calc(100% - 32px); max-height: 85vh; overflow-y: auto;
  padding: 32px; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  transform: translateY(20px); transition: transform 0.25s ease;
}
.ps-kita-detail-modal.open .ps-kita-detail-content { transform: translateY(0); }
.ps-kita-detail-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.8rem; cursor: pointer;
  color: #999; line-height: 1; padding: 4px;
}
.ps-kita-detail-close:hover { color: var(--brand-red); }
.ps-kita-detail-content h2 {
  margin: 0 0 16px; font-size: 1.5rem; color: var(--brand-red);
}
.ps-kita-detail-content h2 small {
  display: block; font-size: 0.85rem; color: #888; font-weight: 600; margin-top: 4px;
}
.ps-kita-detail-text { font-size: 1rem; line-height: 1.7; color: #444; }
.ps-kita-detail-text p { margin: 0 0 14px; }
.ps-kita-detail-footer {
  display: flex; gap: 10px; margin-top: 24px; padding-top: 16px;
  border-top: 1px solid #eee; flex-wrap: wrap;
}

/* === Responsive === */
@media (max-width: 800px) {
  .ps-kita-card-inner { grid-template-columns: 1fr; }
  .ps-kita-image { min-height: 180px; max-height: 220px; }
  .ps-kita-info { padding: 18px; }
  .ps-kita-detail-content { padding: 20px; }
  .ps-kita-card { padding: 20px; }
  .ps-kita-card::after { display: none; }
}
@media (max-width: 500px) {
  .ps-kitas-hero { padding: 28px 16px 20px; }
  .ps-kitas-nav-item { padding: 10px 12px; }
  .ps-kitas-nav-name { font-size: 0.8rem; }
  .ps-kita-actions { flex-direction: column; }
  .ps-kita-detail-footer { flex-direction: column; }
  .ps-kitas-list { gap: 28px; }
  .ps-kita-card { padding: 0; }
  .ps-kita-card::after { display: none; }
}

/* === Schulen-Seite Extras === */
.ps-schule-sidebar {
  background: linear-gradient(135deg, var(--brand-red), #e88200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  min-height: 200px;
  color: #fff;
  text-align: center;
}
.ps-schule-sidebar .ps-schule-type {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.ps-schule-icon {
  font-size: 3rem;
  line-height: 1;
}
.ps-schule-since {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 600;
}
.ps-kita-detail-content .ps-schule-type {
  display: inline-block;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
@media (max-width: 800px) {
  .ps-schule-sidebar { min-height: 120px; flex-direction: row; gap: 16px; }
  .ps-schule-icon { font-size: 2rem; }
}

/* Schulen-Logos statt Fotos */
.ps-kitas-page .ps-kita-image--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 24px;
}
.ps-kitas-page .ps-kita-image--logo img {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 200px;
  object-fit: contain;
}


@media (max-width: 640px) {
  .ps-header-hanging-mascots {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: center;
    background: var(--brand-red);
    line-height: 0;
    padding: 6px 0 0;
    margin: 0;
    z-index: 1;
  }

  .ps-header-hanging-mascots img,
  .ps-header-hanging-mascots--custom img {
    height: clamp(70px, 20vw, 110px);
    width: auto;
    max-width: min(92vw, 420px);
    object-fit: contain;
  }
}


/* Mobile: Custom page mascots above the site header */
.ps-mobile-page-header-mascots {
  display: none;
}

@media (max-width: 640px) {
  .ps-mobile-page-header-mascots {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: var(--brand-red);
    line-height: 0;
    padding: 6px 0 0;
    position: relative;
    z-index: 1;
  }

  .ps-mobile-page-header-mascots img {
    display: block;
    height: clamp(82px, 24vw, 130px);
    max-width: 88vw;
    width: auto;
    object-fit: contain;
  }

  .ps-header-hanging-mascots--custom {
    display: none;
  }
}


@media (max-width: 640px) {
  .ps-header-hanging-mascots--kitas,
  .ps-header-hanging-mascots--schulen {
    display: none;
  }
}
