/* ============================================
   COACH-DATENBANK – nur Directory-spezifische Teile.
   Header/Footer/Buttons/Formulare kommen aus main.css (RA-Komponenten).
   Namespace: .cd-
   ============================================ */

/* Interne Utility-Seiten: Header nicht fixed (kein Offset nötig) */
.cd-page .header { position: static; }

/* Sticky Disclaimer-Leiste ganz oben */
.cd-sticky-note {
    position: sticky;
    top: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--blue);
    color: var(--white);
    font-size: var(--body-small);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    padding: 9px 16px;
    text-align: center;
}
.cd-sticky-note svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---- Intro-Trust-Zeile ---- */
.cd-intro-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-8);
    margin-top: var(--space-6);
}
.cd-intro-trust span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--body-small);
    font-weight: 600;
    color: var(--gray-700);
}
.cd-intro-trust svg { width: 16px; height: 16px; color: var(--blue); flex-shrink: 0; }

/* ---- Filterleiste ---- */
.cd-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-8);
}
.cd-filter__label {
    font-size: var(--body-small);
    font-weight: 700;
    color: var(--gray-500);
    margin-right: var(--space-1);
}
.cd-chip {
    font-family: var(--font-family);
    font-size: var(--body-small);
    font-weight: 600;
    color: var(--gray-700);
    background: var(--white);
    border: 1px solid var(--gray-300);
    padding: 8px 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.cd-chip:hover { border-color: var(--blue); color: var(--blue); }
.cd-chip.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* ---- Grid ---- */
.cd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap-lg);
}
.cd-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gray-500);
    padding: var(--space-16) var(--space-4);
    font-size: var(--body-large);
}

/* ---- Karte (Look an .coaching-card-home angelehnt) ---- */
.cd-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cd-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cd-card:hover {
    border-color: transparent;
    box-shadow: 0 20px 48px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.04);
    transform: translateY(-6px);
}
.cd-card:hover::after { transform: scaleX(1); }

/* ---- Bildzentrierte Karte: Foto oben, Text darunter ---- */
/* Quadratisch – die Fotos sind bereits gesichtszentriert auf 1:1 zugeschnitten */
.cd-card__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--gray-100);
    overflow: hidden;
    cursor: pointer;
}
.cd-card__photo img {
    width: 100%; height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cd-card:hover .cd-card__photo img { transform: scale(1.045); }
.cd-card__photo--fallback {
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cd-card__photo--fallback span { font-size: 46px; font-weight: 800; color: var(--blue); letter-spacing: .02em; }

.cd-card__eyebrow {
    display: block;
    font-size: var(--caption);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 3px;
}
.cd-card__ident { min-width: 0; }
.cd-avatar {
    width: 64px; height: 64px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: top center;
    background: var(--blue-light);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    overflow: hidden;
}
.cd-avatar--zoom { cursor: zoom-in; }

/* ---- Lightbox (Foto vergrößern) ---- */
.cd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,.85);
    cursor: zoom-out;
}
.cd-lightbox.is-open { display: flex; }
.cd-lightbox img {
    max-width: min(92vw, 820px);
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.cd-lightbox__close {
    position: absolute;
    top: 16px; right: 20px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cd-lightbox__close svg { width: 24px; height: 24px; }
.cd-card__name { font-size: 20px; font-weight: 700; color: var(--gray-900); margin: 0 0 3px; line-height: 1.2; }
.cd-card__titel {
    font-size: var(--body-small);
    color: var(--gray-500);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cd-card__body { padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-3); flex-grow: 1; }
.cd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-tag { font-size: var(--caption); font-weight: 600; color: var(--gray-700); background: var(--gray-100); padding: 4px 9px; }

/* Meta-Zeilen: strikt einzeilig, damit alle Karten gleich hoch bleiben */
.cd-card__meta { display: flex; flex-direction: column; gap: 5px; }
.cd-meta-row { display: flex; align-items: center; gap: 8px; font-size: var(--body-small); color: var(--gray-600); line-height: 1.4; min-width: 0; }
.cd-meta-row svg { width: 15px; height: 15px; color: var(--gray-400); flex-shrink: 0; }
.cd-meta-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-meta-row--focus { color: var(--gray-700); font-weight: 600; }
.cd-meta-row--focus svg { color: var(--blue); }
.cd-meta-row__more { color: var(--gray-500); font-weight: 500; font-size: var(--caption); flex-shrink: 0; }

.cd-card__actions { margin-top: auto; display: flex; gap: 8px; padding-top: var(--space-1); }
.cd-card__actions .btn {
    flex: 1 1 auto;
    min-height: 38px;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
    font-size: var(--body-small);
}
.cd-card__actions .btn--secondary { flex: 0 1 auto; }

/* ---- Detail-Modal ---- */
.cd-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
    background: rgba(17,17,17,.55);
    overflow-y: auto;
}
.cd-modal.is-open { display: flex; }
.cd-modal__box {
    background: var(--white);
    max-width: 640px;
    width: 100%;
    margin: auto;
    border: 1px solid var(--gray-200);
    position: relative;
}
.cd-modal__close {
    position: absolute;
    top: 12px; right: 12px;
    width: 38px; height: 38px;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: background var(--transition-fast);
}
.cd-modal__close:hover { background: var(--gray-200); }
.cd-modal__close svg { width: 20px; height: 20px; }
.cd-modal__head {
    display: flex;
    gap: var(--space-5);
    align-items: center;
    padding: var(--space-8) var(--space-6) var(--space-5);
    border-bottom: 1px solid var(--gray-100);
}
.cd-modal__head .cd-avatar { width: 128px; height: 128px; font-size: 40px; }
.cd-modal__name { font-size: var(--heading); font-weight: 700; color: var(--gray-900); margin: 0 0 4px; }
.cd-modal__titel { font-size: var(--body); color: var(--blue); font-weight: 600; margin: 0; }
.cd-modal__quote {
    margin: 0;
    padding: var(--space-5) var(--space-6);
    font-size: var(--body-large);
    font-style: italic;
    color: var(--gray-700);
    background: var(--blue-lighter);
    border-left: 3px solid var(--blue);
    line-height: 1.5;
}
.cd-modal__section { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--gray-100); }
.cd-modal__section h4 {
    font-size: var(--caption);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin: 0 0 var(--space-2);
}
.cd-modal__section p { margin: 0; font-size: var(--body); line-height: 1.6; color: var(--gray-700); }
.cd-modal__list { display: flex; flex-direction: column; gap: var(--space-2); }
.cd-modal__list li { display: flex; gap: 9px; align-items: flex-start; font-size: var(--body); color: var(--gray-700); }
.cd-modal__list svg { width: 17px; height: 17px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.cd-modal__foot { padding: var(--space-6); }
.cd-modal__foot .btn { width: 100%; }

/* ---- Disclaimer-Zeile im Footer ---- */
.cd-disclaimer {
    font-size: var(--body-small);
    color: var(--gray-500);
    line-height: 1.6;
    text-align: center;
    padding: var(--space-6) var(--section-px);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

@media (max-width: 640px) {
    .cd-modal__head { flex-direction: column; text-align: center; }
    .cd-card__actions { flex-direction: column; }
    .cd-card__actions .btn { width: 100%; }
}

/* ============================================
   OEFFENTLICHE COACH-SEITE (/unsere-coaches/)
   Ergaenzungen zur internen Directory-Ansicht oben.
   ============================================ */

/* Kein Hero-Bild -> das Padding muss den fixed Header selbst kompensieren.
   Greift nur, wenn hero-content einziges Kind im hero-wrapper ist. */
@media (max-width: 768px) {
    .hero-wrapper > .hero-content:only-child { padding-top: 120px; }
}
@media (max-width: 480px) {
    .hero-wrapper > .hero-content:only-child { padding-top: 108px; }
}

/* .cd-card ist display:flex -- das HTML-Attribut hidden allein reicht nicht */
.cd-card[hidden] { display: none; }

/* Profiltext liegt im Markup (indexierbar) und wird ins Modal geklont */
.cd-card__detail[hidden] { display: none; }

.cd-note {
    max-width: 760px;
    margin: var(--space-10) auto 0;
    text-align: center;
    font-size: var(--body-small);
    color: var(--gray-500);
    line-height: 1.7;
}
.cd-note a { color: var(--blue); font-weight: 600; }
