/* ===== Girardethaus Directory – kompletter Style (mit Pagination & Kontrast-Badges) ===== */

/* Layout-Wrapper */
.girard-wrap {
  display: flex;
  gap: 2.25rem;
  align-items: flex-start;
  margin: 2rem auto;
}

/* Linke Spalte: Plan */
.girard-left { flex: 3; position: relative; }
.girard-left img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  transition: opacity .35s ease;
}

/* Rechte Spalte: Suche + Kategorien */
.girard-right { flex: 2; display: flex; flex-direction: column; gap: 1rem; width: 100%;}

/* iOS-Fokus-Zoom verhindern */
#girard-search {
  padding: .85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px !important; /* wichtig: >=16px */
  line-height: 1.25;
  box-shadow: 0 2px 8px rgba(0,0,0,.03) inset;
}

.girard-catblock { margin-bottom: 1.25rem; }

.girard-cat {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 1.75rem 0 .5rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid #2176be;
  background: linear-gradient(90deg, #2176be, #26a6a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Liste (rechte Spalte) – stabil eine Spalte, Items immer gestreckt */
.girard-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);  /* 1 Spalte, keine Shrink-Bugs */
  justify-items: stretch;                  /* Items füllen die Spalte */
  align-items: stretch;
  gap: .6rem;
}

/* Listeneintrag – harte Streckung gegen Safari-Content-Shrink */
.girard-item {
  box-sizing: border-box;
  display: block;              /* wichtig, falls jQuery Display resettiert */
  width: 100% !important;      /* volle Breite */
  max-width: 100%;
  min-width: 0;                /* Grid-Shrink verhindern */
  justify-self: stretch;

  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: .9rem 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: default; /* Karte selbst nicht klickbar – nur der Details-Button */
}
.girard-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,.08);
  background: #f9fbff;
}

/* nur der Details-Button zeigt die "Link-Hand" */
.girard-details { cursor: pointer; }

/* Loading-State im Modal */
.girard-loading {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
  color: #374151;
  font-weight: 700;
}
.girard-loading::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: .5rem;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  border-top-color: transparent;
  vertical-align: -2px;
  animation: girardspin .8s linear infinite;
}
.girard-loading.is-error::after { display: none; }
@keyframes girardspin { to { transform: rotate(360deg); } }

/* Name oben */
.girard-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .45rem;
}

/* Darunter: Haus-Badge (Outline) + Details-Button */
.girard-item__meta {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Kontrast-sichere Haus-Badges (Outline + Farbpunkt) */
.girard-house,
.girard-house--lg {
  --house-color: #2176be; /* Fallback */
  position: relative;
  padding: .32rem .7rem .32rem 1.35rem; /* Platz für Punkt links */
  border: 1px solid var(--house-color);
  background: #fff;
  color: #374151;            /* neutraler Text für Kontrast */
  border-radius: 999px;
  line-height: 1.2;
  font-weight: 700;
}
.girard-house::before,
.girard-house--lg::before {
  content: "";
  position: absolute;
  left: .55rem;
  top: 50%;
  transform: translateY(-50%);
  width: .55rem; height: .55rem;
  border-radius: 999px;
  background: var(--house-color);
}


.girard-area-chip {
  padding: .32rem .7rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  line-height: 1.2;
  font-weight: 700;
}

.girard-item__meta .girard-details {
  margin-left: auto;
}

.girard-details {
  margin-left: auto;
  padding: .45rem .8rem;
  background: linear-gradient(135deg, #2176be, #26a6a8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.girard-details:hover { filter: saturate(1.05); }

/* Pagination je Kategorie */
.girard-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .6rem;
}
.girard-page-btn {
  padding: .35rem .65rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}
.girard-page-btn[disabled] {
  opacity: .45; cursor: not-allowed;
}
.girard-page-indicator { font-size: .9rem; color: #6b7280; }

/* ===== Modal (oben startend & scrollbar mobil, zentriert Desktop per MQ unten) ===== */
.girard-modal {
  display: none;            /* via .is-open zu block / flex */
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;

  /* Mobil/klein: Overlay scrollt, startet oben */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 12px;
}
.girard-modal.is-open { display: block; }

.girard-modal-content {
  background: #fff;
  width: min(720px, 92vw);
  border-radius: 18px;
  padding: 24px;
  margin: 0 auto;           /* zentriert horizontal */
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}

/* Schließen-Button: schlichtes „X“ ohne Rahmen/Effekt */
.girard-close,
.girard-close:hover,
.girard-close:focus,
.girard-close:active {
  position: absolute;
  top: 12px; right: 14px;
  background: transparent !important;
  border: none !important;
  color: #1f2937 !important;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* Zusätzlich: mobiler Close-Button am Ende des Modals */
.girard-close-bottom {
  display: none;
  width: 100%;
  margin-top: 14px;
  padding: .7rem .9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 640px) {
  .girard-close-bottom { display: block; }
}

/* Kopfbereich im Modal */
.girard-modal-title {
  text-align: left;
  margin: .25rem 0 .5rem;
  font-size: 1.45rem;       /* etwas schlanker */
  font-weight: 600;         /* Medium statt Bold */
}

/* Logo klein, linksbündig, ohne Schnörkel */
.girard-logo {
  max-width: 110px;
  max-height: 64px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 0 .5rem;   /* linksbündig */
  border-radius: 0;
  box-shadow: none;
}

/* Zeile unter dem Namen: Haus (Outline) + Fläche (Outline) */
.girard-modal-toprow {
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: .6rem;
}
.girard-house--lg { font-size: .95rem; }
.girard-area {
  padding: .35rem .7rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: .95rem;
  color: #0f172a;
  background: #fff;
}

/* Abschnitt-Überschriften mit kurzem Gradient-Underline (ausblendbar per PHP) */
.girard-modal-cols h4,
h4.girard-section {
  position: relative;
  display: inline-block;
  font-weight: 800;
  margin: 0 0 .8rem;
  padding-bottom: .35rem;
}
.girard-modal-cols h4::after,
h4.girard-section::after {
  content: "";
  display: block;
  width: 88px;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #26a6a8, #2176be);
}

/* Zwei Spalten: links Kontakt (+ Über uns), rechts Öffnungszeiten */
.girard-modal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* ===== Karten-Style für Kontakt & Zeiten – bündig, ohne Bullets ===== */

.girard-contact,
.girard-times {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-top: 0;
  margin-bottom: 0;
}

/* Basis-Karte (flächig, bündig) */
.girard-contact li,
.girard-times li {
  position: relative;
  margin: 12px 0 0 0;
  padding: 16px 14px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}

/* Kontakt: „schwebendes Label“ + klickbarer Wert */
.girard-contact li.gh-field { padding-top: 20px; }
.girard-contact li.gh-field::before {
  content: attr(data-label);
  position: absolute;
  top: 0;
  left: 12px;
  transform: translateY(-50%);
  font-size: .78rem;
  color: #6b7280;
  background: #fff;
  padding: 0 .35rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  line-height: 1.4;
}
.girard-contact li.gh-field > a {
  display: inline-block;
  margin-top: 4px;
  color: #2176be;
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}
.girard-contact li.gh-field > a:hover { text-decoration: underline; }

/* Öffnungszeiten: wie Kontakt (Label schwebt), Wert darunter als Badge */
.girard-times li.gh-field { padding-top: 20px; }
.girard-times li.gh-field::before {
  content: attr(data-label);
  position: absolute;
  top: 0;
  left: 12px;
  transform: translateY(-50%);
  font-size: .78rem;
  color: #6b7280;
  background: #fff;
  padding: 0 .35rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  line-height: 1.4;
}
.gh-value,
.gh-badge {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: .9rem;
  color: #111827;
  line-height: 1.2;
  margin-top: 4px;
}
.gh-badge.is-closed {
  background: #fafafa;
  color: #6b7280;
  border-color: #eee;
}

/* Button im Modal: Lageplan anzeigen */
.girard-show-plan {
  margin-top: .9rem;
  width: 100%;
  padding: .6rem .9rem;
  background: linear-gradient(135deg, #2176be, #26a6a8);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}
.girard-show-plan:hover { filter: saturate(1.05); }

/* ===== Lightbox (schlichtes X) ===== */
.girard-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.girard-lightbox img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}

/* Schließen-Button in der Lightbox: reines weißes X, ohne Hover/Rand */
.girard-lightbox-close,
.girard-lightbox-close:hover,
.girard-lightbox-close:focus,
.girard-lightbox-close:active {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 0;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* ===== "Keine Treffer" Hinweis ===== */
#girard-no-results {
  margin-top: 12px;
  color: #6b7280;
  font-style: italic;
}

/* Body-Scroll sperren, wenn Overlay offen (fix für iOS/Android) */
body.girard-lock {
  position: fixed;
  overflow: hidden;
  width: 100%;
}

/* ===== Desktop: Modal wieder mittig zentrieren ===== */
@media (min-width: 901px) {
  .girard-modal { 
    display: none;
    padding: 0;
  }
  .girard-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
  }
  .girard-modal-content {
    margin: 0 auto;
    max-height: 90vh;
    overflow: auto;
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .girard-wrap { flex-direction: column; }
  .girard-modal-cols { grid-template-columns: 1fr; }
}

.girard-item__subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin: -2px 0 6px;
  line-height: 1.4;
}
.girard-modal-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: -4px 0 10px;
  font-weight: 500;
}

/* Untertitel näher an Name + eleganter Divider */
.girard-item__title { margin: 0 0 2px; }
.girard-item__subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 8px;          /* dichter unter dem Namen */
  line-height: 1.35;
}

/* dünner, kurzer Divider in CI-Farben unter Kopfbereich */
.girard-head-divider {
  height: 2px;
  width: 96px;
  border-radius: 999px;
  background: linear-gradient(90deg, #26a6a8, #2176be);
  margin: 6px 0 10px;
}

/* Modal: Titel/Untertitel & Divider enger zusammen */
.girard-modal-title { margin: .25rem 0 2px; }
.girard-modal-subtitle { margin: 0 0 8px; }

/* Foto im Modal – volle Breite, responsiv, mit sanftem Shadow */
.girard-modal-photo-wrap {
  margin-top: 14px;
}
.girard-modal-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}

/* Kategorie-Chips (Index) */
.girard-catindex {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .75rem;
}
.girard-chip {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0b1222;
  padding: .5rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.04);
}
.girard-chip em {
  font-style: normal;
  font-weight: 700;
  font-size: .85rem;
  color: #2176be;
}

/* Topbar (Kategorie-Ansicht / Suche) */
.girard-topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .75rem 0 .5rem;
}
.girard-back {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: .45rem .7rem;
  cursor: pointer;
}
.girard-topbar h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(90deg, #2176be, #26a6a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Besser lesbarer Zurück-Button */
.girard-back {
  color: #111827;                 /* sichtbare Textfarbe */
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  min-height: 38px;               /* ausreichend große Klickfläche */
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  border: 1px solid #d1d5db;      /* etwas dunkler als zuvor */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.girard-back:hover,
.girard-back:focus-visible {
  border-color: #2176be;          /* CI-Fokus */
  box-shadow: 0 4px 14px rgba(33,118,190,.12);
  transform: translateY(-1px);
  outline: none;
}

.girard-back:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(33,118,190,.10);
}

/* Pagination: sichtbare Pfeile + saubere States */
.girard-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .5rem;
}

.girard-page-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #d1d5db;     /* dezente Kante */
  background: #fff;               /* weißer Hintergrund */
  color: #111827;                 /* sichtbare Pfeile « » */
  font-weight: 700;
  font-size: 1rem;                /* Pfeile klar erkennbar */
  line-height: 1;
  padding: .5rem .7rem;
  border-radius: 10px;
  min-width: 42px;                /* gute Klickfläche */
  min-height: 38px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, color .15s ease, background-color .15s ease;
}

.girard-page-btn:hover,
.girard-page-btn:focus-visible {
  border-color: #2176be;          /* CI-Accent */
  box-shadow: 0 4px 14px rgba(33,118,190,.12);
  transform: translateY(-1px);
  outline: none;
  background: #fff;               /* kein invertieren */
  color: #0b1222;                 /* Text bleibt dunkel */
}

.girard-page-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(33,118,190,.10);
}

.girard-page-btn[disabled],
.girard-page-btn[disabled]:hover,
.girard-page-btn[disabled]:focus-visible {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
  border-color: #e5e7eb;
  color: #6b7280;                 /* auch disabled gut lesbar */
  background: #f9fafb;
}

.girard-page-indicator {
  font-weight: 700;
  color: #374151;
  min-width: 72px;
  text-align: center;
}


.girard-plan-wrap {
  position: relative;
  overflow: hidden;
}

#girard-plan {
  transition: transform 0.8s ease;
  transform-origin: center center;
  width: 100%;
  height: auto;
}

.girard-plan-wrap {
  position: relative;
  overflow: hidden;   /* wichtig: Bild bleibt in der Box */
}
#girard-plan {
  position: absolute; /* nötig für translate(px,px) */
  top: 0;
  left: 0;
}

.girard-plan-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  will-change: transform;
}

#girard-plan {
  will-change: transform;
  image-rendering: auto; /* bessere Glättung beim Zoomen */
}

#girard-lightbox {
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Fix: Lageplan mobil sichtbar machen === */
@media (max-width: 900px) {
  .girard-left {
    width: 100% !important;
    position: relative !important;
  }

  .girard-plan-wrap {
    position: relative !important;
    width: 100% !important;
    min-height: 300px !important; /* <-- zwingt sichtbare Höhe */
    overflow: hidden !important;
  }

  #girard-plan {
    position: relative !important; /* raus aus absolute-Flow */
    width: 100% !important;
    height: auto !important;
    display: block !important;
    max-width: none !important;
    opacity: 1 !important;
  }
}

.girard-plan-wrap {
  position: relative;
  overflow: hidden;
}

.girard-reset-view {
	display: block!important;
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10; /* höher als Bild, aber unter Lightbox */
  background: rgba(33, 118, 190, 0.92);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  transition: background .2s ease, transform .2s ease, opacity .25s ease;
  opacity: 0;
  pointer-events: none; /* verhindert Klicks, solange unsichtbar */
}

.girard-reset-view.visible {
  opacity: 1;
  pointer-events: auto;
}

.girard-reset-view:hover {
  background: rgba(33,118,190,1);
  transform: translateY(-1px);
}
