/**
 * HARMUNICHS Moments Styles
 * CSS3 + Modern Design - Überarbeitete Filter-Sektion
 */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9fafb;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.moments-header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.025em;
}

.logo-text p {
  font-size: 0.875rem;
  font-weight: 500;
  color: #884f83;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: #6b7280;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #884f83;
}

.cta-button {
  background: #884f83;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cta-button:hover {
  background: #7c3aed;
}

/* Moments Hero Section */
.moments-hero-section {
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
  color: white;
  text-align: center;
}

.moments-hero-section .hero-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ed7631 0%, #b70d7d 50%, #884f83 100%);
}

.moments-hero-section .hero-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
}

.moments-hero-section .hero-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.moments-hero-section .decoration {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: float 6s ease-in-out infinite;
}

.moments-hero-section .decoration-1 {
  top: 2.5rem;
  left: 25%;
  width: 5rem;
  height: 5rem;
  background: rgba(205, 191, 227, 0.4);
}

.moments-hero-section .decoration-2 {
  bottom: 2.5rem;
  right: 33.333333%;
  width: 8rem;
  height: 8rem;
  background: rgba(118, 29, 75, 0.3);
  animation-delay: -3s;
}

.moments-hero-section .hero-content {
  position: relative;
  z-index: 10;
  max-width: 64rem;
  margin: 0 auto;
}

.moments-hero-section .hero-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.moments-hero-section .sparkles {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.moments-hero-section .badge-text {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.875rem;
  font-weight: 500;
}

.moments-hero-section .hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.moments-hero-section .gradient-text {
  display: block;
  background: linear-gradient(135deg, #fbbf24 0%, white 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.moments-hero-section .hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.moments-hero-section .hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.moments-hero-section .search-container {
  position: relative;
}

.moments-hero-section .search-input {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  color: white;
  width: 300px;
}

.moments-hero-section .search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.moments-hero-section .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  width: 1rem;
  height: 1rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Filter Section - Überarbeitet für separate Zeilen */
.filter-section {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 2rem 0;
}

/* Zeile 1: Überschrift und Anzahl */
.filter-header {
  margin-bottom: 1.5rem;
}

.filter-info {
  text-align: left;
}

.filter-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.5rem;
}

.filter-info p {
  color: #6b7280;
  margin-bottom: 0;
}

/* Zeile 2: Aktive Filter (separate Zeile) */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  min-height: 50px; /* Feste Höhe für Layout-Stabilität */
}

.active-filters:not(.has-filters) {
  border-bottom: none;
  padding: 0;
  min-height: 0;
  margin-bottom: 0;
}

.filter-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tag {
  background: #f3f4f6;
  color: #374151;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.filter-tag:hover {
  background: #e5e7eb;
}

.filter-tag .remove-filter {
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
}

.clear-filters {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.clear-filters:hover {
  color: #374151;
  background: #f9fafb;
  text-decoration: none;
}

/* Zeile 3: Filter Buttons (separate Zeile) */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
  min-width: 120px;
  justify-content: center;
}

.filter-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-btn.active {
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.filter-btn .icon,
.filter-btn svg {
  width: 1rem;
  height: 1rem;
  line-height: 1;
}

/* Spezifische Breiten für längere Texte */
.filter-btn[data-category="alle"] {
  min-width: 100px;
}

.filter-btn[data-category="meet-the-harmunichs"] {
  min-width: 180px;
}

.filter-btn[data-category="song-des-monats"] {
  min-width: 160px;
}

.filter-btn[data-category="zuschauerstimmen"] {
  min-width: 170px;
}

.filter-btn[data-category="fun-facts"] {
  min-width: 130px;
}

.filter-more {
  min-width: 140px;
  border-color: #d1d5db;
  color: #6b7280;
}

.filter-more:hover {
  background: #f3f4f6;
}

/* Loading & No Results */
.loading-indicator,
.no-results {
  padding: 4rem 0;
  text-align: center;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #884f83;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-results-content {
  max-width: 24rem;
  margin: 0 auto;
}

.no-results-icon {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
  margin: 0 auto 1rem;
}

.no-results h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.5rem;
}

.no-results p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Moments Grid */
.moments-section {
  padding: 4rem 0;
  background: #f9fafb;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-moments {
  margin-bottom: 4rem;
}

.featured-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.moments-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .moments-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .moments-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .moments-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Moment Cards */
.moment-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  cursor: pointer;
}

.moment-card:hover {
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.moment-card.featured {
  grid-column: span 1;
}

.card-image {
  position: relative;
  overflow: hidden;
}

.card-image.featured {
  aspect-ratio: 16 / 9;
}

.card-image.regular {
  aspect-ratio: 1;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.moment-card:hover .card-image img {
  transform: scale(1.05);
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.play-button.small {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
}

.category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-content {
  padding: 1.5rem;
}

.card-content.compact {
  padding: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.card-title.small {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.moment-card:hover .card-title {
  color: #884f83;
}

.card-text {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-text.small {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.card-meta.small {
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meta-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

.card-cta {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.card-cta.small {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

.card-cta:hover {
  opacity: 0.9;
}

.share-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.share-btn:hover {
  color: #374151;
}

/* Load More */
.load-more-container {
  text-align: center;
  margin-top: 3rem;
}

/* Community CTA */
.community-cta {
  background: #cdbfe3;
  padding: 5rem 0;
  text-align: center;
}

.cta-content {
  max-width: 48rem;
  margin: 0 auto;
}

.cta-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cta-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111;
}

.cta-header .icon {
  width: 2rem;
  height: 2rem;
  color: #884f83;
}

.cta-description {
  font-size: 1.25rem;
  color: #374151;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .moments-hero-section .hero-actions {
    flex-direction: row;
  }

  .moments-hero-section .hero-title {
    font-size: 4rem;
  }
}

.example-posts {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.example-title {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.example-content {
  font-size: 0.875rem;
  color: #6b7280;
}

.example-content p {
  margin-bottom: 0.25rem;
}

/* Responsive Anpassungen */
@media (max-width: 1023px) {
  .main-nav {
    display: none;
  }

  .moments-hero-section .hero-title {
    font-size: 2.5rem;
  }

  .filter-buttons {
    justify-content: center;
  }

  .cta-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 0.75rem;
  }

  .moments-hero-section {
    padding: 2rem 0;
  }

  .moments-hero-section .hero-title {
    font-size: 2rem;
  }

  .moments-hero-section .hero-description {
    font-size: 1rem;
  }

  .moments-hero-section .search-input {
    width: 250px;
  }

  .filter-section {
    padding: 1.5rem 0;
  }

  .active-filters {
    min-height: 40px;
  }

  .moments-section {
    padding: 2rem 0;
  }

  .community-cta {
    padding: 3rem 0;
  }

  .cta-header h2 {
    font-size: 1.75rem;
  }

  .cta-description {
    font-size: 1rem;
  }

  .filter-btn {
    min-width: 100px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .filter-btn[data-category="meet-the-harmunichs"] {
    min-width: 140px;
  }

  .filter-btn[data-category="song-des-monats"] {
    min-width: 130px;
  }

  .filter-btn[data-category="zuschauerstimmen"] {
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .filter-buttons {
    justify-content: center;
  }

  .filter-btn {
    min-width: 90px;
    font-size: 0.75rem;
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
