/* Frontend Styles - Modern Blog Archive Design */
/* Styles für archive.php mit Premium Glassmorphism Design */

/* ============================================
   ROOT VARIABLES
============================================ */
:root {
  --primary-color: #0f766e;
  --primary-hover: #0d9488;
  --text-dark: #0f172a;
  --text-medium: #64748b;
  --text-light: #cbd5e1;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: rgba(15, 118, 110, 0.1);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 118, 110, 0.12), 0 2px 8px rgba(15, 118, 110, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 118, 110, 0.12), 0 4px 12px rgba(15, 118, 110, 0.08);
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE TYPOGRAPHY
============================================ */
body.mpa-archive,
.mpa-archive {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   MAIN ARCHIVE LAYOUT
============================================ */
.mpa-archive {
  background: var(--bg-light);
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

.mpa-archive > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   BREADCRUMBS
============================================ */
.mpa-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  font-size: 0.9375rem;
  max-width: 1400px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mpa-breadcrumbs:hover {
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12), 0 2px 8px rgba(15, 118, 110, 0.06);
  border-color: rgba(15, 118, 110, 0.2);
}

.mpa-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

.mpa-breadcrumbs a:hover {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.05);
}

.mpa-breadcrumbs a:first-child::before {
  content: "🏠";
  font-size: 1rem;
  display: inline-block;
  margin-right: 0.25rem;
}

.mpa-breadcrumbs > span {
  color: transparent;
  position: relative;
  width: 1.25rem;
  text-align: center;
}

.mpa-breadcrumbs > span::before {
  content: "›";
  color: #cbd5e1;
  font-size: 1.25rem;
  font-weight: 300;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.mpa-breadcrumbs > span:last-child {
  color: #0f766e;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1) 0%, rgba(13, 148, 136, 0.08) 100%);
  border-radius: 8px;
  width: auto;
}

.mpa-breadcrumbs > span:last-child::before {
  display: none;
}

/* ============================================
   ARCHIVE HEADER
============================================ */
.mpa-archive__header {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 3rem 3rem 2.5rem;
  margin-bottom: 3rem;
  transition: var(--transition);
}

.mpa-archive__header:hover {
  box-shadow: var(--shadow-md);
}

.mpa-archive__title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 2rem 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   FILTER SECTION
============================================ */
.mpa-archive__filters {
  width: 100%;
}

.mpa-filters__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: center;
}

.mpa-filters__row select,
.mpa-filters__row input[type="search"] {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.9375rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  transition: var(--transition);
  color: var(--text-dark);
  font-family: inherit;
}

.mpa-filters__row select:focus,
.mpa-filters__row input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.mpa-filters__row input[type="search"]::placeholder {
  color: var(--text-medium);
}

.mpa-filters__row button[type="submit"] {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
  white-space: nowrap;
}

.mpa-filters__row button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.3);
}

.mpa-filters__row button[type="submit"]:active {
  transform: translateY(0);
}

/* ============================================
   POST GRID
============================================ */
.mpa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Post Card */
.mpa-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mpa-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   BILD FIX: Feste Höhe + Kopf sichtbar
============================================ */

/* 1. Die Box wieder in feste Form zwingen (damit alle gleich hoch sind) */
.mpa-card__thumb {
  aspect-ratio: 16/9 !important; /* Standard-Format erzwingen */
  height: auto !important;       /* Höhe ergibt sich aus der Breite */
  width: 100% !important;
  overflow: hidden;
}

/* 2. Bild füllt die Box, zeigt aber IMMER den oberen Teil */
.mpa-card__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;           /* Bild füllt die Fläche */
  object-position: top center !important; /* WICHTIG: Fokus oben (Köpfe) */
  background-color: transparent !important;
}

.mpa-card:hover .mpa-card__thumb img {
  transform: scale(1.05);
}

.mpa-card__body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mpa-card__meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-medium);
}

.mpa-card__category {
  display: inline-flex;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1) 0%, rgba(13, 148, 136, 0.08) 100%);
  color: var(--primary-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: var(--transition);
}

.mpa-card__category:hover {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.15) 0%, rgba(13, 148, 136, 0.12) 100%);
}

.mpa-card__date {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.mpa-card__date::before {
  content: "📅";
  font-size: 0.875rem;
}

.mpa-card__title {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--text-dark);
}

.mpa-card__title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.mpa-card__title a:hover {
  color: var(--primary-color);
}

.mpa-card__excerpt {
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.mpa-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.mpa-card__link::after {
  content: "→";
  font-size: 1.25rem;
  transition: var(--transition);
}

.mpa-card__link:hover {
  gap: 0.75rem;
}

.mpa-card__link:hover::after {
  transform: translateX(4px);
}

/* ============================================
   PAGINATION
============================================ */
.mpa-archive__pager {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  margin-top: 3rem;
}

.mpa-pagination {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.mpa-pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mpa-pagination li {
  margin: 0;
}

.mpa-pagination a,
.mpa-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  color: var(--text-medium);
}

.mpa-pagination a:hover {
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-color);
}

.mpa-pagination .current {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
}

/* Load More Button */
.mpa-loadmore {
  padding: 1rem 3rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.2);
}

.mpa-loadmore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.3);
}

.mpa-loadmore:active {
  transform: translateY(0);
}

.mpa-loadmore:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

/* Tablet */
@media (max-width: 968px) {
  .mpa-archive {
    padding: 1.5rem 1rem;
  }

  .mpa-archive__header {
    padding: 2rem 2rem 1.5rem;
  }

  .mpa-archive__title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

  .mpa-filters__row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .mpa-filters__row button[type="submit"] {
    grid-column: 1 / -1;
  }

  .mpa-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .mpa-card__body {
    padding: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .mpa-breadcrumbs {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .mpa-archive__header {
    padding: 1.5rem;
  }

  .mpa-archive__title {
    font-size: 1.75rem;
  }

  .mpa-filters__row {
    grid-template-columns: 1fr;
  }

  .mpa-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .mpa-card__body {
    padding: 1.25rem;
  }

  .mpa-card__title {
    font-size: 1.25rem;
  }

  .mpa-pagination ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .mpa-loadmore {
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    width: 100%;
  }
}

/* ============================================
   EMPTY STATE
============================================ */
.mpa-grid > p {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-medium);
  font-size: 1.125rem;
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}
.mpa-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin: 2rem auto; /* FIX: 'auto' sorgt für die Zentrierung der Box */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  font-size: 0.9375rem;
  max-width: 1400px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Optional: Falls auch der Text IN der Leiste mittig sein soll, entferne den Kommentar unten: */
  /* justify-content: center; */
}
/* ==========================================================================
   ARCHIV HEADER GESAMT-LAYOUT (Final Version)
   ========================================================================== */

/* ------------------------------------------------------------------
   1. DESKTOP STANDARD (ab 1201px)
   Layout: Links Titel & Filter (Filter in einer Zeile!) | Rechts Profil
   ------------------------------------------------------------------ */
@media (min-width: 1201px) {
    .mpa-archive__header {
        display: grid;
        gap: 1.5rem;
        padding: 2.5rem !important;
        align-items: start;
        
        /* Spalten: Links flexibel, Rechts Profil */
        grid-template-columns: 1fr auto; 
        grid-template-rows: auto auto;
        grid-template-areas: 
            "title profile"
            "form  profile";
    }

    /* Titel */
    .mpa-archive__title {
        grid-area: title;
        margin: 0 !important;
        align-self: center;
    }

    /* Filter-Bereich */
    .mpa-archive__filters {
        grid-area: form;
        align-self: start;
        width: 100%;
    }

    /* WICHTIG: DESKTOP FILTER IN EINER REIHE */
    .mpa-filters__row {
        display: flex !important;
        flex-direction: row !important; /* Erzwingt Nebeneinander */
        flex-wrap: nowrap !important;   /* Verbietet Umbruch */
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    /* Inputs teilen sich den Platz */
    .mpa-filters__row select,
    .mpa-filters__row input {
        width: auto !important;  /* Nicht 100% breit machen! */
        flex-grow: 1;            /* Sie sollen den Platz auffüllen */
        margin: 0 !important;
    }

    /* Button nur so breit wie nötig */
    .mpa-filters__row button {
        width: auto !important;
        flex-shrink: 0;
    }

    /* Profil-Bereich (Rechts) */
    .mpa-archive__profile-wrapper {
        grid-area: profile;
        padding-left: 2rem;
        border-left: 1px solid #e2e8f0;
        height: 100%;
        display: flex;
        align-items: center; 
        justify-content: flex-start;
    }
    
    /* Profil Design Desktop: Horizontal (Bild links, Text rechts) */
    .mpa-profile-header .mpa-profile-container {
        display: flex;
        flex-direction: row !important; 
        align-items: center;
        text-align: left;
        gap: 1rem;
    }
    
    /* Toggle Button ausblenden */
    .mpa-mobile-toggle { display: none; }
}

/* ------------------------------------------------------------------
   ARZT PROFIL BASIS-DESIGN (Alle Screens)
   ------------------------------------------------------------------ */
.mpa-profile-header.mpa-widget--profile {
    border: none !important;
    padding: 0 !important;
    background: transparent;
    box-shadow: none;
}
.mpa-profile-header .mpa-profile-image img {
    width: 60px !important;
    height: 60px !important;
    border: 2px solid #e2e8f0;
    margin-bottom: 0 !important;
    border-radius: 50%;
}
.mpa-profile-header .mpa-profile-name {
    font-size: 1rem !important;
    margin-bottom: 2px !important;
    color: #0f172a;
    font-weight: 700;
}
.mpa-profile-header .mpa-profile-titles {
    list-style: none; padding: 0; margin: 0;
}
.mpa-profile-header .mpa-profile-titles li {
    font-size: 0.8rem !important; line-height: 1.3; color: #64748b; white-space: nowrap;
}
.mpa-profile-header .mpa-profile-titles li::before {
    content: "•"; margin-right: 4px; color: #cbd5e1;
}
/* ==========================================================================
   BILD-DIMENSIONEN ANPASSEN (ARCHIV HEADER PROFIL)
   ========================================================================== */

/* BASIS-STYLING: Sorgt dafür, dass das Bild immer rund und unverzerrt ist */
.mpa-profile-header .mpa-profile-image img {
    border-radius: 50%;         /* Macht das Bild kreisrund */
    object-fit: cover;          /* Verhindert Verzerren des Gesichts */
    border: 3px solid #e2e8f0;  /* Heller Rahmen (wie im Design) */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* Leichter Schatten für Tiefe */
    transition: all 0.3s ease;
}

/* ------------------------------------------------------------------
   1. DESKTOP (ab 1201px)
   Layout: Bild und Text stehen nebeneinander.
   Größe: Mittelgroß, damit es nicht zu dominant wirkt.
   ------------------------------------------------------------------ */
@media (min-width: 1201px) {
    .mpa-profile-header .mpa-profile-image img {
        width: 85px !important;
        height: 85px !important;
    }
}

/* ------------------------------------------------------------------
   2. TABLET / IPAD (768px bis 1200px)
   Layout: Bild steht ÜBER dem Text in der rechten Spalte.
   Größe: Hier muss das Bild GRÖSSER sein, um die Spalte optisch zu füllen.
   ------------------------------------------------------------------ */
@media (min-width: 768px) and (max-width: 1200px) {
    .mpa-profile-header .mpa-profile-image img {
        width: 120px !important; /* Deutlich größer für vertikales Layout */
        height: 120px !important;
    }
}

/* ------------------------------------------------------------------
   3. MOBILE (unter 768px)
   Layout: Kompakte horizontale Leiste (Akkordeon).
   Größe: Klein und platzsparend.
   ------------------------------------------------------------------ */
@media (max-width: 767px) {
    .mpa-profile-header .mpa-profile-image img {
        width: 60px !important;
        height: 60px !important;
        border-width: 2px; /* Rahmen etwas feiner auf dem Handy */
    }
}

/* ------------------------------------------------------------------
   2. TABLET / IPAD OPTIMIERUNG (768px bis 1200px)
   Layout: Links Titel + 2x2 Filter | Rechts Arzt (vertikal)
   ------------------------------------------------------------------ */
@media (min-width: 768px) and (max-width: 1200px) {
    
    .mpa-archive__header {
        display: grid;
        grid-template-columns: 1fr 220px !important; 
        grid-template-rows: min-content 1fr !important;
        grid-template-areas: 
            "title profile"
            "form  profile" !important;
        gap: 1.5rem !important;
        padding: 2rem !important;
    }

    .mpa-archive__title {
        grid-area: title;
        align-self: end;
        margin-bottom: 0.5rem !important;
    }

    /* Formular (Links Unten) -> 2x2 Grid */
    .mpa-archive__filters {
        grid-area: form;
        width: 100%;
        margin-top: 0;
        padding-top: 0.5rem;
    }

    .mpa-filters__row {
        display: grid !important;
        grid-template-columns: 1fr 1fr; /* Zwei Spalten */
        gap: 12px;
        width: 100%;
    }

    /* Inputs füllen auf Tablet die Zellen komplett */
    .mpa-filters__row select,
    .mpa-filters__row input,
    .mpa-filters__row button {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* Arzt Profil (Rechts, volle Höhe) */
    .mpa-archive__profile-wrapper {
        grid-area: profile;
        border-left: 1px solid #e2e8f0;
        padding-left: 1.5rem !important;
        justify-content: center !important;
        align-items: flex-start !important;
        padding-top: 1rem;
        display: flex;
    }

    /* Arzt Layout auf Tablet: VERTIKAL (Bild oben, Text unten) */
    .mpa-profile-header .mpa-profile-container {
        display: flex;
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        gap: 1rem;
    }
    
    .mpa-profile-header .mpa-profile-titles li {
        white-space: normal !important;
    }
    .mpa-profile-header .mpa-profile-titles li::before { display: none; }
    
    /* Toggle Button ausblenden */
    .mpa-mobile-toggle { display: none; }
}


/* ------------------------------------------------------------------
   3. MOBILE OPTIMIERUNG (< 768px)
   Layout: Akkordeon
   ------------------------------------------------------------------ */
@media (max-width: 767px) {
    .mpa-archive__header {
        padding: 1.5rem 1rem !important;
        gap: 1rem;
        display: flex;
        flex-direction: column;
    }
    
    .mpa-archive__title {
        text-align: left;
        margin-bottom: 0.5rem !important;
    }

    .mpa-archive__profile-wrapper {
        padding-left: 0;
        border-left: none;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 10px 15px;
        margin-bottom: 0.5rem;
    }

    .mpa-profile-header .mpa-profile-container {
        display: flex;
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        gap: 1rem !important;
    }
    
    .mpa-profile-header .mpa-profile-image img { width: 50px !important; height: 50px !important; }
    
    .mpa-profile-header .mpa-profile-titles li {
        white-space: normal !important; font-size: 0.75rem !important; display: inline;
    }
    .mpa-profile-header .mpa-profile-titles li::after { content: ", "; }
    .mpa-profile-header .mpa-profile-titles li:last-child::after { content: ""; }

    .mpa-mobile-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 12px 15px;
        background: #fff;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        color: #64748b;
        font-weight: 600;
        cursor: pointer;
        font-size: 0.95rem;
    }

    .mpa-archive__filters { display: none; margin-top: 0.5rem; }
    .mpa-archive__header.is-open .mpa-archive__filters { display: block; animation: slideDown 0.3s ease-out; }
    
    .mpa-filters__row {
        display: flex; flex-direction: column; gap: 10px;
    }
    .mpa-filters__row select, .mpa-filters__row input, .mpa-filters__row button { width: 100%; }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
/* ==========================================================================
   PROFILBILD FINAL (Größen & Positionierung)
   ========================================================================== */

/* 1. BASIS-STYLING (Gilt für alle Geräte) */
.mpa-profile-header .mpa-profile-image img {
    border-radius: 50%;          /* Rund */
    object-fit: cover;           /* Füllt den Kreis komplett */
    
    /* WICHTIG: Richtet das Bild am oberen Rand aus. 
       Verhindert, dass der Kopf abgeschnitten wird. */
    object-position: top center !important; 
    
    border: 3px solid #e2e8f0;   /* Schicker Rahmen */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
}

/* 2. DESKTOP (ab 1201px) 
   Bild und Text stehen nebeneinander -> Bild kompakt (60px) */
@media (min-width: 1201px) {
    .mpa-profile-header .mpa-profile-image img {
        width: 60px !important;
        height: 60px !important;
    }
}

/* 3. TABLET / IPAD (768px bis 1200px) 
   Bild steht ÜBER dem Text -> Bild muss größer sein (120px) */
@media (min-width: 768px) and (max-width: 1200px) {
    .mpa-profile-header .mpa-profile-image img {
        width: 120px !important; 
        height: 120px !important;
    }
}

/* 4. MOBILE (< 768px) 
   Leiste ist sehr schmal -> Bild klein (50px) */
@media (max-width: 767px) {
    .mpa-profile-header .mpa-profile-image img {
        width: 50px !important;
        height: 50px !important;
        border-width: 2px;
    }
}
/* ==========================================================================
   LIVE SUCHE STYLING
   ========================================================================== */

/* Container muss relative sein (wurde inline gesetzt, aber sicherheitshalber hier) */
.mpa-search-wrapper {
    position: relative;
    /* Damit es im Flex-Container gut wächst */
    flex-grow: 1; 
    width: auto;
}

/* Das Ergebnis-Fenster (Dropdown) */
.mpa-live-search-results {
    display: none; /* Standardmäßig unsichtbar */
    position: absolute;
    top: 100%; /* Direkt unter dem Input */
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px; /* Nur unten abrunden */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100; /* Muss über allem liegen */
    overflow: hidden;
    margin-top: 5px;
}

/* Die Liste der Ergebnisse */
.mpa-search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mpa-search-results-list li {
    border-bottom: 1px solid #f1f5f9;
}

.mpa-search-results-list li:last-child {
    border-bottom: none;
}

/* Einzelner Ergebnis-Eintrag */
.mpa-search-results-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #334155;
    transition: background 0.2s;
}

.mpa-search-results-list a:hover {
    background-color: #f8fafc;
    color: #0f766e;
}

/* Kleines Vorschaubild im Suchergebnis */
.mpa-search-results-list img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #e2e8f0;
}

/* Footer "Alle anzeigen" */
.mpa-search-footer {
    padding: 10px 15px;
    background: #f1f5f9;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
}

.mpa-search-footer a {
    color: #0f766e;
    text-decoration: none;
}

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

/* Keine Ergebnisse Text */
.mpa-no-results {
    padding: 15px;
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================================================
   AJAX FILTER STATES
   ========================================================================== */

.mpa-filter-status {
    min-height: 1.25rem;
    margin-top: 0.75rem;
    color: #64748b;
    font-size: 0.875rem;
}

.mpa-archive__filters.is-loading {
    cursor: progress;
}

.mpa-archive__filters.is-loading button,
.mpa-archive__filters.is-loading select,
.mpa-archive__filters.is-loading input {
    opacity: 0.72;
}

.mpa-grid.is-loading {
    opacity: 0.58;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mpa-card--return-target {
    outline: 3px solid rgba(15, 118, 110, 0.45);
    outline-offset: 6px;
    box-shadow: 0 18px 46px rgba(15, 118, 110, 0.22), var(--shadow-sm);
}

.mpa-search-spinner {
    color: #0f766e;
    font-size: 1rem;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}
