/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ---------- Design Tokens (global) ---------- */
:root {
  --brand-green: #198754; /* AlbanischLernen.de Grün (Bootstrap Success) */
  --pod-gap: 1rem;
  --pod-radius: .85rem;
  --pod-border: 1px solid rgba(0,0,0,.07);
  --chip-gap: .5rem;
}

@media (min-width: 768px){
  :root { --pod-gap: 1.25rem; }
}

/* ---------- Footer / Utilities ---------- */

.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
@media (min-width: 768px) {
  .bd-placeholder-img-lg { font-size: 3.5rem; }
}

.b-example-divider {
  height: 3rem;
  background-color: rgba(0, 0, 0, .1);
  border: solid rgba(0, 0, 0, .15);
  border-width: 1px 0;
  box-shadow:
    inset 0 .5em 1.5em rgba(0,0,0,.1),
    inset 0 .125em .5em rgba(0,0,0,.15);
}

.bi {
  vertical-align: -.125em;
  fill: currentColor;
}

/* Print handling */
.printable { display: none; }
@media only print {
  .container { display: none !important; }
  .printable { display: block !important; }
}

/* ---------- Memory Grid ---------- */

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.memory-card {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  transition: transform 0.3s;
}
.memory-card img {
  width: 50%;
  height: auto;
}
.memory-card:hover {
  transform: scale(1.05);
}

/* ---------- Accordion (Success Variant) ---------- */

.accordion-button.custom-success {
  background-color: #198754; /* Bootstrap Success */
  color: #fff;
}
.accordion-button.custom-success:not(.collapsed) {
  background-color: #146c43; /* Darker when expanded */
  color: #fff;
}
.accordion-body {
  background-color: #d1e7dd;
  color: #000;
}

/* ==========================================================================
   Podcasts Theme
   ========================================================================== */

/* --- Typo Tweaks --- */
#podcasts-app .podcast-title {
  line-height: 1.22;
  text-wrap: balance;
  margin-bottom: .75rem;
  font-weight: 600;
}

/* Einheitliche Kartenhöhe: Titel auf 2 Zeilen clampen */
#podcasts-app .podcast-title.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1em * 1.22 * 2); /* entspricht 2 Zeilen bei obiger line-height */
}

#podcasts-app .podcast-card p { margin-bottom: .5rem; }

/* --- Klickbare Beschreibung wie Link aussehen lassen --- */
.desc-trigger {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.desc-trigger:hover,
.desc-trigger:focus {
  text-decoration: underline;
}

/* --- Kleinere Chips --- */
#podcasts-app .chip {
  font-size: .80rem;
  padding: .3rem .6rem;
}

/* --- Line clamp --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Card Look & Feel --- */
.podcast-card {
  height: 100%;
  border: var(--pod-border);
  border-radius: var(--pod-radius);
  background: var(--bs-body-bg);
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(0,0,0,.015);
  transition: transform .15s ease, box-shadow .15s ease;
}
.podcast-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .6rem 1.4rem rgba(0,0,0,.08);
}

/* --- Image --- */
.podcast-thumb-wrap { 
  overflow: hidden; 
  border-top: 1px solid rgba(0,0,0,.05);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.podcast-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
  transition: transform .35s ease;
}
.podcast-card:hover .podcast-thumb { transform: scale(1.03); }

/* --- Filter Chips --- */
.chip-row {
  display: flex;
  gap: var(--chip-gap);
  flex-wrap: nowrap;
  overflow: auto;
  padding-bottom: .25rem;
  margin-bottom: .25rem;
  scroll-snap-type: x proximity;
}
.chip-row .chip { scroll-snap-align: start; }

/* Outline-Chip Look */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  background: transparent;
  color: #212529;                        /* ✅ Schwarz statt Grün */
  border: 1px solid var(--brand-green);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.chip:hover,
.chip:focus {
  background: rgba(25,135,84,.08);       /* zartes Grün beim Hover */
  text-decoration: none
}

.chip.active {
  background: var(--brand-green);        /* satt grün */
  color: #fff;                           /* weißer Text */
  border-color: var(--brand-green);
}

.chip input { display: none; }
.chip:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }

/* Sticky filter bar */
.sticky-filters {
  position: sticky;
  top: 0.5rem;
  z-index: 1;
  padding-top: .25rem;
  background: var(--bs-body-bg);
}

/* --- Suche --- */
.search-pill {
  border-radius: 999px;
  padding-right: 3rem; /* Platz für Clear-Button */
}
.position-relative .input-clear {
  position: absolute;
  right: 3.25rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
}
.position-relative .input-clear:hover { color: #6b7280; }

/* --- Audio --- */
audio,
.podcast-card audio {
  display: block;
  width: 100%;
  border-radius: .6rem;
  background: #fff !important;
  border: 2px solid var(--brand-green);
  accent-color: var(--brand-green);
  color-scheme: light;
}

/* Chrome/Safari: internes Panel wirklich weiß */
.podcast-card audio::-webkit-media-controls-panel { background-color: #fff !important; }
.podcast-card audio::-webkit-media-controls-enclosure { border-radius: .6rem; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .podcast-card,
  .podcast-thumb {
    transition: none;
  }
}

/* --- Mobile Tweaks --- */
@media (max-width: 767.98px) {
  .chip-row { margin-bottom: .5rem; }
}

/* ==========================================================================
   Navbar / Offcanvas
   ========================================================================== */

.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
  border-radius: .5rem;
  min-width: 14rem;
  padding: .4rem 0;
}
.navbar .dropdown-item { padding: .55rem .9rem; }

.offcanvas.text-bg-dark { background-color: #156b3b; }
.offcanvas .nav-link { padding-left: 0; padding-right: 0; }
.offcanvas .nav-link:hover { text-decoration: underline; }
@media (min-width: 992px) { #navOffcanvas { display: none !important; } }

/* ==========================================================================
   Nachhilfe Landing
   ========================================================================== */

.hero-nachhilfe { max-width: 900px; margin: 0 auto; }
.hero-badge {
  font-weight: 600;
  background: rgba(25,135,84,.1);
  border: 1px solid rgba(25,135,84,.2);
}
.hero-sub { max-width: 720px; }

/* Divider */
.divider { position: relative; text-align: center; }
.divider::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0,0,0,.12);
  transform: translateY(-50%);
}
.divider .divider-text {
  position: relative;
  display: inline-block;
  padding: .35rem .9rem;
  background: var(--bs-body-bg);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  color: --brand-green;
}

/* Dark Mode: Audio hell lassen */
@media (prefers-color-scheme: dark) {
  .podcast-card audio {
    background: #fff !important;
    border-color: var(--brand-green);
    color-scheme: light;
  }
}
