/* ==========================================================================
   MSA HOMEPAGE FEED
   "Aktuelles aus der Musicalschule Ahrensburg"
   Layout: 1 großes Card links + 2 kleine Cards rechts gestapelt
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section wrapper — surface background passend zum Alternating-Pattern
   -------------------------------------------------------------------------- */
.msa-feed-section {
  width: 100%;
}

.msa-feed-section--surface {
  padding: clamp(64px, 10vw, 100px) clamp(16px, 4vw, 24px) clamp(48px, 6vw, 88px);
  text-align: center;
}

.msa-feed-section .container {
  max-width: var(--msa-divider-max, 1200px);
  margin: 0 auto;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Header row: Titel + "Alle Beiträge"-Link
   -------------------------------------------------------------------------- */
.msa-feed-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  text-align: center;
  position: relative;
}

.msa-feed-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 40px);
  font-family: Roboto, system-ui, -apple-system, Helvetica, Arial, sans-serif !important;
  font-weight: 800;
  color: var(--msa-ink, #0f172a);
  text-align: center;
  width: 100%;
}

.msa-feed-all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--msa-accent, #a020f0);
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.2s ease;
  margin-top: 4px;
}
.msa-feed-all-link:hover {
  gap: 8px;
  color: var(--msa-accent, #a020f0);
}

/* --------------------------------------------------------------------------
   Grid: groß links (3fr) + kleine rechts (2fr)
   Höhe wird durch die kleinen Cards bestimmt, große Card streckt sich
   -------------------------------------------------------------------------- */
.msa-feed-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: stretch;
}

/* Kleiner Stack: bestimmt die Row-Höhe durch feste Thumbnail-Verhältnisse */
.msa-feed-small-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.msa-feed-card--small .msa-feed-card__thumb {
  aspect-ratio: 16 / 7;
}

/* Große Card: streckt sich auf die Höhe des Stacks */
.msa-feed-card--big {
  display: flex;
  flex-direction: column;
}

.msa-feed-card--big .msa-feed-card__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Thumbnail der großen Card füllt den verfügbaren Raum */
.msa-feed-card--big .msa-feed-card__thumb {
  flex: 1;
  min-height: 120px;
  aspect-ratio: unset;
}

/* --------------------------------------------------------------------------
   Basis-Card
   -------------------------------------------------------------------------- */
.msa-feed-card {
  border-radius: 16px;
  border: 2px solid var(--msa-primary, #ff9933);
  background: linear-gradient(180deg, #ffffff 0%, #f8f4ff 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.msa-feed-card:hover {
  border-color: var(--msa-accent, #a020f0);
  box-shadow: 0 10px 28px rgba(160, 32, 240, 0.13);
}

.msa-feed-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* --------------------------------------------------------------------------
   Thumbnail
   -------------------------------------------------------------------------- */
.msa-feed-card__thumb {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.msa-feed-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.msa-feed-card:hover .msa-feed-card__thumb img {
  transform: scale(1.04);
}

.msa-feed-card__thumb-fallback {
  width: 100%;
  height: 100%;
  background: var(--msa-surface, #f5f0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--msa-ink-2, #334155);
  min-height: 160px;
}

/* --------------------------------------------------------------------------
   Kategorie-Label (overlay oben links)
   -------------------------------------------------------------------------- */
.msa-feed-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--msa-accent, #a020f0);
  text-transform: uppercase;
  z-index: 2;
}

/* Kategorie-spezifische Farben */
.msa-feed-cat--podcast              { background: #7c3aed; }
.msa-feed-cat--auffuehrungen-events { background: var(--msa-primary, #ff9933); color: #fff; }
.msa-feed-cat--behind-the-scenes    { background: #0ea5e9; }
.msa-feed-cat--workshop             { background: #10b981; }
.msa-feed-cat--wissen               { background: var(--msa-ink-2, #334155); }
.msa-feed-cat--profitipps           { background: #f59e0b; color: #0f172a; }

/* --------------------------------------------------------------------------
   Event-Datum-Badge (overlay oben rechts)
   -------------------------------------------------------------------------- */
.msa-feed-event-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: var(--msa-primary, #ff9933);
  border: 1.5px solid var(--msa-primary, #ff9933);
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Body / Text
   -------------------------------------------------------------------------- */
.msa-feed-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msa-feed-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--msa-ink, #0f172a);
  line-height: 1.35;
}

.msa-feed-card--big .msa-feed-card__title {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

.msa-feed-card__excerpt {
  margin: 0;
  font-size: 0.875rem;
  color: var(--msa-ink-2, #334155);
  line-height: 1.5;
  flex: 1;
}

.msa-feed-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--msa-accent, #a020f0);
  margin-top: 4px;
  transition: gap 0.2s ease;
}

.msa-feed-card:hover .msa-feed-card__cta {
  gap: 7px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet: gleiche Breiten, aber kleiner */
@media (max-width: 900px) {
  .msa-feed-grid {
    grid-template-columns: 1fr 1fr;
  }
  .msa-feed-card--big .msa-feed-card__title {
    font-size: 1rem;
  }
}

/* Mobile: alles gestapelt */
@media (max-width: 640px) {
  .msa-feed-grid {
    grid-template-columns: 1fr;
  }
  .msa-feed-card--small .msa-feed-card__thumb {
    aspect-ratio: 16 / 9;
  }
  .msa-feed-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
  }
}
