/* ========== Design-Variablen (optional) ========== */
:root{
  --pot-radius-pill: 18px;        /* weiche, rechteckige Ecken */
  --pot-gap: 14px;                /* Abstand im Grid */
  --pot-pad-pill-y: 16px;         /* vertikales Padding der Pills */
  --pot-pad-pill-x: 16px;
  --pot-shadow: 0 6px 18px rgba(0,0,0,.08);
  --pot-shadow-hover: 0 10px 22px rgba(0,0,0,.12);
  --pot-text: #000000;            /* Überschriften/Text dunkel */
  --pot-text-on-color: #000000;   /* dunkler Text auf hellen Farben (Icons/Labels-Ton) */
  --pot-btn-primary: #008037;
  --pot-btn-primary-text: #ffffff;
  --pot-bg: #ffffff;
}

/* ========== Section-Headline (optional) ========== */
#kategorien-title,
.pot-section__title,.pot-hero__title{
  margin: 0 0 14px 0;
  font-weight: 800;
  line-height: 1.2;
  
}

/* ========== GRID für Kategorie-Pills ========== */
.pot-grid{
  display: grid;
  gap: var(--pot-gap);
}

.pot-grid.pot-grid--pills{
  /* Fallback: PHP setzt inline grid-template-columns:repeat(n,1fr); */
  /* Hier überschreiben wir auf auto-fit für bessere Responsivität */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* für sehr kleine Geräte kompakteres Grid */
@media (max-width: 420px){
  .pot-grid.pot-grid--pills{
    grid-template-columns: repeat(2, 1fr)!important;
    gap: 12px;
  }
}

/* ========== einzelne Pill ========== */
.pot-pill{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--pill-bg, #e2f6f7); /* Farbe kommt aus Inline-Style */
  border-radius: var(--pot-radius-pill);
  padding: var(--pot-pad-pill-y) var(--pot-pad-pill-x);
  min-height: 104px;  
  min-width: 125px;               /* Verhältnis wie im Screenshot */
  box-shadow: var(--pot-shadow);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  isolation: isolate;                /* saubere Shadow-Layer */
}

.pot-pill:hover{
  transform: translateY(-2px);
  box-shadow: var(--pot-shadow-hover);
  filter: saturate(1.02);
}

.pot-pill:focus{
  outline: none;
}

.pot-pill:focus-visible{
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(15,118,110,.35);
}

/* ========== Icon oben, Text darunter ========== */
.pot-pill__icon{
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  border-radius: 12px;               /* leicht abgerundet, kein Vollkreis */
  overflow: hidden;
}

.pot-pill__icon img{
  width: 45px;
  height: 45px;
  object-fit: contain;
  display: block;
}

/* Fallback-Icon */
.pot-pill__icon--placeholder{
  font-size: 20px;
  line-height: 1;
  color: rgba(0,0,0,.6);
}

/* Text etwas kleiner als vorher (dezent) */
.pot-pill__title{
  text-align: center;
  font-weight: 700;
  /* leicht kleiner: clamp verhindert zu klein/zu groß */
  font-size: clamp(.92rem, .95vw, 1.02rem);
  line-height: 1.25;
  color: #09333a;  /* dunkler, harmoniert mit Türkis/Teal-Tönen */
  letter-spacing: .2px;
  max-width: 100%;
  word-break: break-word;
}

/* ========== Dichte Darstellung auf sehr kleinen Screens ========== */
@media (max-width: 360px){
  .pot-pill{
    min-height: 96px;
    padding: 12px;
  }
  .pot-pill__icon{
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }
  .pot-pill__icon img{
    width: 26px;
    height: 26px;
  }
  .pot-pill__title{
    font-size: .9rem;
  }
}

/* ========== Hover-Farbanpassung für helle/dunkle Hintergründe (optional) ========== */
.pot-pill:is(:hover, :focus-visible) .pot-pill__title{
  text-decoration: none;
}

/* ========== Hero + Suche (dein zweiter Codeblock) – optional, aber vollständig responsiv ========== */
.pot-hero{
  
  padding: clamp(28px, 5vw, 60px) 0;
}
.pot-hero--light{
  background: #f8fafc;
}
.pot-hero__grid{
   padding: 0rem!important; 
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(18px, 3vw, 36px);
  align-items: center;
}
/* Variante: Hero mit breiter Suchzeile ohne Bild */
.pot-hero.pot-hero--search-full .pot-hero__grid{
  max-width: 1120px !important;          /* Gesamtbreite der Sektion */
  margin: 0 0 !important;
  padding: 0 0px !important;            /* Abstand zum Rand */
  grid-template-columns: minmax(0, 1fr) !important;  /* nur eine Spalte */
}

.pot-hero.pot-hero--search-full .pot-hero__left{
  max-width: 820px !important;           /* Content-Breite */
}

/* Text linksbündig */
.pot-hero.pot-hero--search-full .pot-hero__title,
.pot-hero.pot-hero--search-full .pot-hero__subtitle{
  text-align: left !important;
}

/* Suchbox schön breit */
.pot-hero.pot-hero--search-full .pot-search{
  width: 100% !important;
  max-width: 820px !important;
  margin-top: 18px !important;
}

/* Mobile Optimierung */
@media (max-width: 600px){
  .pot-hero.pot-hero--search-full .pot-hero__grid{
    padding: 0 0px !important;
  }
  .pot-hero.pot-hero--search-full .pot-hero__left{
    max-width: 100% !important;
  }
  .pot-hero.pot-hero--search-full .pot-search{
    max-width: 100% !important;
  }
}

@media (max-width: 900px){
  .pot-hero__grid{ grid-template-columns: 1fr; }
}
.pot-hero__title{
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 6px 0;
  color: var(--pot-text);
}
.pot-hero__subtitle{
  margin: 0 0 18px 0;
  color: #475569;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}
.pot-hero__img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: var(--pot-shadow);
}

/* Suche */
.pot-search{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--pot-shadow);
}
.pot-search__icon{
  font-size: 18px;
  line-height: 1;
  opacity: .75;
}
.pot-search__input{
  flex: 1 1 auto;
  border: 0;
  outline: none;
  background: transparent;
  font-size: clamp(1rem, 1.1vw, 1.05rem);
  color: var(--pot-text);
}
.pot-search__input::placeholder{ color: #94a3b8; }
.pot-search__results{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--pot-shadow-hover);
  display: none; /* JS blendet ein */
  max-height: 60vh;
  overflow: auto;
  z-index: 20;
}

/* Buttons */
.pot-hero__ctas{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.pot-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: .98rem;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  box-shadow: var(--pot-shadow);
}
.pot-btn--primary{
  background: var(--pot-btn-primary);
  color: var(--pot-btn-primary-text);
}
.pot-btn--primary:hover{ transform: translateY(-1px); box-shadow: var(--pot-shadow-hover); }
.pot-btn--ghost{
  background: #ffffff;
  color: var(--pot-btn-primary);
  border: 1px solid rgba(15,118,110,.2);
}
.pot-btn--ghost:hover{
  background: rgba(15,118,110,.06);
  transform: translateY(-1px);
}

/* Bevorzugt-reduzierte Bewegung */
@media (prefers-reduced-motion: reduce){
  .pot-pill,
  .pot-btn{ transition: none; }
}

/* Dark Mode (optional, falls du ihn nutzt) */
@media (prefers-color-scheme: dark){
  :root{
    --pot-bg: #0b1220;
    --pot-text: #000000;
  }
  .pot-hero--light{ background: #ffffff; }
  .pot-search{ background: #ffffff; border-color: #1f2937; }
  .pot-search__results{ background: #ffffff; border-color: #1f2937; }
  .pot-btn--ghost{ background: transparent; color: #67e8f9; border-color: #008037; }
}
/* --- Optimiertes Styling für Suchergebnisse --- */
.pot-search__results{
  display: none;
  position: absolute;
  top: calc(100% + 8px);  /* etwas mehr Abstand zum Input */
  left: 0;
  right: 0;
  z-index: 2000;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  max-height: 60vh;      /* scrollbar bei vielen Treffern */
  overflow-y: auto;
  padding: 6px 0;
}

/* Ergebnisse einblenden, wenn vorhanden */
.pot-search__results:not(:empty){
  display: block;
}

/* Einzelnes Ergebnis-Item */
.pot-search__results .pot-result{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  color: #0f172a;
  font-size: .95rem;
  line-height: 1.4;
  transition: background .15s ease, color .15s ease;
}

/* Hover/Fokus */
.pot-search__results .pot-result:hover,
.pot-search__results .pot-result:focus{
  background: #f1f5f9;
  color: #0c4a6e;
}

/* Optional: kleines Icon oder Thumbnail */
.pot-search__results .pot-result__icon{
  flex: 0 0 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
  display: grid;
  place-items: center;
}
.pot-search__results .pot-result__icon img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Titeltext */
.pot-search__results .pot-result__title{
  flex: 1 1 auto;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Optimierung */
@media (max-width: 480px){
  .pot-search__results{
    max-height: 50vh;
    font-size: .9rem;
  }
}
.pot-loader{ width:64px; height:64px; margin:10px auto; display:block; }
.pot-loading{ padding:12px; text-align:center; color:#6b7280; }

/* Optional schicker Empty-State */
.pot-empty-state{
  display:flex; align-items:center; gap:12px;
  padding:12px; border-radius:12px; background:#f8fafc;
}
.pot-empty-state__icon{
  width:40px; height:40px; display:grid; place-items:center;
  background:#eef2ff; color:#4f46e5; border-radius:10px; font-size:20px;
}
.pot-empty-state__text strong{ display:block; margin-bottom:2px; }
.pot-empty-state__text p{ margin:0; color:#6b7280; }
.pot-empty-state__text a{ color:#2563eb; text-decoration:underline; }

/* --- STATE-KLASSEN AM CONTAINER ------------------------------------------ */
/* Ergebnisliste standardmäßig sichtbar, wenn JS sie befüllt */
.pot-search__results:not(:empty){ display:block; }

/* Öffne die Box sofort beim Tippen, damit Layout stabil bleibt */
.pot-search.is-open .pot-search__results{ display:block; }

/* Während Loading: Ergebnisliste bleibt offen, Inhalte können leer sein */
.pot-search.is-loading .pot-search__results{ display:block; }

/* Wenn wirklich leer NACH dem Fetch */
.pot-search.is-empty .pot-search__results{ display:block; }

/* --- PERSISTENTER LOADER IM ERGEBNISBEREICH ------------------------------ */
.pot-search { position: relative; }

.pot-loader-overlay{
  position: absolute;
  top: calc(100% + 8px);  /* gleiche Y-Position wie die Liste */
  left: 0;
  right: 0;
  display: none;          /* JS zeigt/verbirgt */
  place-items: center;
  padding: 12px;
  z-index: 3000;          /* über Ergebnissen */
  pointer-events: none;
  background: transparent;
}

/* Loader nur zeigen, wenn wir laden */
.pot-search.is-loading .pot-loader-overlay{
  display: grid;
}

/* Optional: sanftes Fade */
@media (prefers-reduced-motion: no-preference){
  .pot-loader-overlay { transition: opacity .15s ease; opacity: 0; }
  .pot-search.is-loading .pot-loader-overlay { opacity: 1; }
}

/* Optional: Minimalhöhe, damit die Box beim ersten Tippen nicht „springt“ */
.pot-search__results{
  min-height: 64px;       /* Platz für Loader/Empty */
  padding: 6px 0;
}
/* Screenreader-only Text */
.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Aktives Ergebnis (Keyboard) */
.pot-search__results .pot-result.is-active{
  background: #f1f5f9;
  outline: 2px solid #e2e8f0;
}

/* Skeleton-Loading im Ergebnisbereich */
.pot-result.pot-skel{ 
  cursor: default;
  pointer-events: none;
}
.pot-skel-thumb{
  flex: 0 0 56px; height: 56px; border-radius: 8px; background: #e5e7eb;
}
.pot-skel-lines{ flex:1 1 auto; display:grid; gap:6px; }
.pot-skel-lines .line{ height:12px; border-radius:6px; background: linear-gradient(90deg,#e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%); background-size:400% 100%; animation: pot-shimmer 1.1s infinite linear; }
.pot-skel-lines .line.short{ width:58%; }
@keyframes pot-shimmer{ 0%{background-position:100% 0} 100%{background-position:0 0} }
/* ===== Karten-Grid – "Neue Methoden" ===== */
/* ========== Design-Variablen für Karten ========== */
:root {
  --pot-card-radius: 24px;
  --pot-card-padding: 32px 28px 28px;
  --pot-card-bg: #ffffff;
  --pot-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --pot-card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
  --pot-card-border: 1px solid rgba(0, 0, 0, 0.03);
  --pot-icon-size: 70px;
  --pot-icon-bg: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
  --pot-icon-shadow: 0 12px 24px rgba(24, 90, 157, 0.25);
  --pot-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --pot-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --pot-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --pot-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --pot-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --pot-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --pot-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* ========== Karten-Grid ========== */
.pot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin: 40px 0;
}

@media (max-width: 768px) {
  .pot-cards {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ========== Einzelne Karte ========== */
.pot-card {
  background: var(--pot-card-bg);
  border-radius: var(--pot-card-radius);
  padding: var(--pot-card-padding);
  box-shadow: var(--pot-card-shadow);
  border: var(--pot-card-border);
  transition: var(--pot-transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  font-family: var(--pot-font-family);
}

.pot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--icon-color, #07387B);
  opacity: 0.8;
  transition: var(--pot-transition);
}

.pot-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--pot-card-shadow-hover);
}

.pot-card:hover::before {
  opacity: 1;
  height: 6px;
}

/* ========== Icon-Container ========== */
.pot-card__icon-container {
  position: relative;
  width: var(--pot-icon-size);
  height: var(--pot-icon-size);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pot-card__icon {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--icon-color) 0%, color-mix(in srgb, var(--icon-color), black 30%) 100%);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--icon-color), transparent 40%);
  font-size: 32px;
  transition: var(--pot-transition);
  transform-origin: center;
  position: relative;
  z-index: 2;
}

.pot-card__shine {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--icon-color), white 30%) 0%, transparent 60%);
  opacity: 0.3;
  border-radius: 28px;
  transition: var(--pot-transition);
  z-index: 1;
}

.pot-card:hover .pot-card__icon {
  transform: scale(1.15) rotate(5deg);
}

.pot-card:hover .pot-card__shine {
  opacity: 0.5;
  transform: scale(1.2);
}

/* ========== Karten-Inhalt ========== */
.pot-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pot-card__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  justify-content: center;
}

/* ========== Badges ========== */
.pot-badge {
  background: color-mix(in srgb, var(--icon-color), transparent 85%);
  color: color-mix(in srgb, var(--icon-color), black 20%);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.3px;
  border: 1px solid color-mix(in srgb, var(--icon-color), transparent 70%);
}

.pot-badge--muted {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ========== Titel und Text ========== */
.pot-card__title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 16px 0;
  line-height: 1.4;
  color: #1a202c;
  text-align: center;
  transition: var(--pot-transition);
}

.pot-card__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size 0.3s;
}

.pot-card__title a:hover {
  color: var(--icon-color);
  background-size: 100% 2px;
}

.pot-card__text {
  color: #718096;
  line-height: 1.6;
  margin: 0 0 24px 0;
  font-size: 15px;
  text-align: center;
  flex: 1;
}

/* ========== Karten-Aktionen ========== */
.pot-card__actions {
  margin-top: auto;
  text-align: center;
}

.pot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--pot-transition);
  font-size: 14px;
  letter-spacing: 0.3px;
  gap: 8px;
}

.pot-btn--ghost {
  background: transparent;
  color: var(--icon-color);
  border: 2px solid color-mix(in srgb, var(--icon-color), transparent 70%);
}

.pot-btn--ghost:hover {
  background: color-mix(in srgb, var(--icon-color), transparent 90%);
  color: var(--icon-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--icon-color), transparent 80%);
  border-color: var(--icon-color);
}

/* ========== "Alle Methoden"-Button ========== */
.pot-latest__more {
  text-align: center;
  margin-top: 48px;
}

.pot-btn--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 32px;
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
  border: none;
  position: relative;
  overflow: hidden;
}

.pot-btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.pot-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.35);
}

.pot-btn--primary:hover::before {
  left: 100%;
}

/* ========== Keine Methoden Text ========== */
.pot-no-methods {
  text-align: center;
  padding: 60px 40px;
  color: #a0aec0;
  font-style: italic;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 16px;
  margin: 40px 0;
}

/* ========== Animationen ========== */
@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.pot-card {
  animation: fadeInUp 0.6s ease forwards;
}

.pot-card:nth-child(1) { animation-delay: 0.1s; }
.pot-card:nth-child(2) { animation-delay: 0.2s; }
.pot-card:nth-child(3) { animation-delay: 0.3s; }
.pot-card:nth-child(4) { animation-delay: 0.4s; }

/* ========== Hover-Effekte ========== */
.pot-card:hover .pot-card__title {
  color: var(--icon-color);
}

/* ========== Dark Mode Support ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --pot-card-bg: #ffffff;
    --pot-card-border: 1px solid rgba(255, 255, 255, 0.05);
    --pot-card-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    --pot-card-shadow-hover: 0 24px 48px rgba(0, 0, 0, 0.4);
  }
  
  .pot-card__title {
    color: #e2e8f0;
  }
  
  .pot-card__text {
    color: #a0aec0;
  }
  
  .pot-badge--muted {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .pot-no-methods {
    background: rgba(255, 255, 255, 0.03);
  }
}

/* ========== SVG Icons ========== */
.pot-btn svg {
  transition: transform 0.3s ease;
}

.pot-btn--ghost:hover svg {
  transform: translateX(4px);
}

.pot-btn--primary:hover svg {
  transform: translateX(4px);
}