/* ════════════════════════════════════════════════════════════════════
   RadyoSever — Ana Sayfa Profesyonelleştirme Katmanı  (v1.15.0)
   --------------------------------------------------------------------
   Bu dosya EN SON yüklenir ve yalnızca görsel/düzen iyileştirmeleri yapar.
   PHP, query, CPT, ACF, stream ve player mantığına DOKUNMAZ.
   Amaç: ferah, sade, modern, hızlı ve mobil öncelikli bir deneyim.
   Bölümler:
     1. Renk paleti dengeleme (neon yumuşatma + sıcak ton)
     2. Hero sadeleştirme
     3. Bölüm (section) ritmi & başlık hiyerarşisi
     4. Radyo kartları
     5. Kategori kartları
     6. Haber kartları
     7. Mobil uyum & dokunmatik hedefler
     8. prefers-reduced-motion
═══════════════════════════════════════════════════════════════════════ */

/* ====================================================================
   1. RENK PALETİ — Profesyonel, sıcak, daha az neon
   Yapısal değişkenler (bg, radius) korunur; yalnızca göz yoran
   neon tonları yumuşatılır ve sıcak bir vurgu eklenir.
==================================================================== */
:root {
  /* Yumuşatılmış neon → modern, okunabilir degrade tonları */
  --rs-neon-blue:   #38bdf8;
  --rs-neon-purple: #a78bfa;
  --rs-neon-pink:   #f472b6;

  /* Sıcak vurgu (Radyosever marka sıcaklığı) */
  --rs-warm:        #fb923c;
  --rs-warm-soft:   rgba(251, 146, 60, 0.14);

  /* Daha yumuşak gölge & glow — abartısız derinlik */
  --rs-shadow:      0 6px 24px rgba(0, 0, 0, 0.32);
  --rs-shadow-lg:   0 14px 44px rgba(0, 0, 0, 0.42);
  --rs-glow:        0 8px 26px rgba(124, 58, 237, 0.18);
  --rs-glow-cyan:   0 8px 26px rgba(6, 182, 212, 0.16);

  /* Tutarlı kenar yumuşaklığı */
  --rs-radius:      14px;
  --rs-radius-lg:   22px;
  --rs-radius-sm:   10px;

  /* Bölümler arası nefes payı */
  --rs-section-gap: 56px;
}

[data-theme="light"] {
  --rs-shadow:    0 6px 22px rgba(15, 23, 42, 0.08);
  --rs-shadow-lg: 0 14px 40px rgba(15, 23, 42, 0.12);
  --rs-glow:      0 8px 24px rgba(124, 58, 237, 0.12);
  --rs-warm-soft: rgba(251, 146, 60, 0.10);
}

/* Degrade metinleri daha sakin bir geçişe bağla */
.rs-gradient-text,
.rs-stat-num {
  background: linear-gradient(135deg, var(--rs-neon-blue), var(--rs-primary), var(--rs-neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ====================================================================
   2. HERO — Ekranı kaplamayan, ferah ve odaklı
==================================================================== */
.rs-hero {
  min-height: auto;                 /* 100vh kaldırıldı — boğmasın */
  padding: clamp(48px, 8vw, 84px) 24px clamp(40px, 6vw, 64px);
}

/* Arka plan: yumuşak gradient + hafif sıcak glow, göz yormaz */
.rs-hero-bg {
  background:
    radial-gradient(ellipse at 28% 30%, rgba(124, 58, 237, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse at 76% 40%, rgba(6, 182, 212, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse at 50% 110%, var(--rs-warm-soft) 0%, transparent 55%),
    var(--rs-bg);
}

/* Dalga animasyonu: daha ince, daha yavaş, daha az dikkat dağıtıcı */
.rs-hero-waves { opacity: 0.55; }
.rs-wave {
  border-color: rgba(124, 58, 237, 0.10);
  animation-duration: 7s;
}

/* Ekolayzer barları: sönük ve sakin (dekoratif) */
.rs-hero-eq {
  height: 60px;
  opacity: 0.08;
}
.rs-eq-bar { animation-duration: 1.6s; }

/* Rozet */
.rs-hero-badge {
  margin-bottom: 18px;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.26);
}

/* Başlık & alt metin — net hiyerarşi, dengeli boşluk */
.rs-hero-title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.rs-hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  margin-bottom: 22px;
  color: var(--rs-text-2);
}

/* Arama kutusu — hero'nun ana eylemi, belirgin ve şık */
.rs-hero-search { margin-top: 22px; max-width: 580px; }
.rs-hero-search-inner {
  padding: 7px 7px 7px 18px;
  border-radius: 16px;                /* hap yerine yumuşak köşe — daha modern */
  box-shadow: var(--rs-shadow);
}
.rs-hero-search-inner:focus-within {
  border-color: var(--rs-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16), var(--rs-shadow-lg);
}
.rs-hero-search-inner .rs-btn { border-radius: 12px; }

/* "Bana Radyo Öner" — ikincil, sakin görünüm */
.rs-hero-random-wrap { margin-top: 14px; }

/* İstatistik bandı — sade ve hizalı */
.rs-hero-stats {
  gap: 26px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rs-border);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.rs-stat-num { font-size: 1.55rem; }
.rs-stat-label { font-size: 11.5px; }

/* ====================================================================
   3. BÖLÜMLER — Tutarlı ritim, ferah boşluk, net başlıklar
==================================================================== */
.rs-section { padding: var(--rs-section-gap) 0; }

/* Alternatif zemin: sert geçiş yerine yumuşak tek ton */
.rs-section-alt {
  background: var(--rs-bg-2);
  border-block: 1px solid var(--rs-border);
}
.rs-section-news { background: var(--rs-bg-2); }

.rs-section-header { margin-bottom: 26px; }

.rs-section-title {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  letter-spacing: -0.01em;
}
.rs-section-icon { font-size: 1.25rem; }

/* "Tümü →" bağlantısı — sade, dengeli */
.rs-see-all {
  font-size: 13px;
  color: var(--rs-text-2);
  border-color: var(--rs-border-2);
  background: var(--rs-surface);
}
.rs-see-all:hover {
  color: var(--rs-text);
  border-color: var(--rs-primary);
  background: rgba(124, 58, 237, 0.10);
}

/* Canlı rozeti (başlık içi) sakinleştir */
.rs-badge-live-inline {
  font-size: 10px;
  opacity: 0.92;
}

/* ====================================================================
   4. RADYO KARTLARI — Net, hizalı, dengeli yükseklik, belirgin play
==================================================================== */
.rs-radio-card {
  background: var(--rs-card-bg);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rs-radio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.34);
  box-shadow: var(--rs-shadow-lg);
}

/* Logo alanı — sabit oran, taşma yok */
.rs-radio-card-logo {
  aspect-ratio: 1 / 1;
  background: var(--rs-bg-3);
}
.rs-radio-card-logo img {
  object-fit: cover;
  transition: transform 0.4s ease;
}
.rs-radio-card:hover .rs-radio-card-logo img { transform: scale(1.04); }

/* Bilgi alanı — esnesin ki kartlar eşit yükseklikte hizalansın */
.rs-radio-card-info {
  padding: 12px 14px 6px;
  flex: 1 1 auto;
}
.rs-radio-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;            /* uzun isimler kartı bozmasın */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rs-radio-card-city { font-size: 11.5px; }

/* Aksiyon satırı — play solda belirgin, alt çizgiyle ayrık, dipte sabit */
.rs-radio-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--rs-border);
  margin-top: auto;
}

/* PLAY butonu — kullanıcının ilk fark edeceği eleman */
.rs-play-btn,
.rs-play-radio {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--rs-primary), var(--rs-accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rs-play-btn:hover,
.rs-play-radio:not(:disabled):hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.42);
}
.rs-play-radio:not(:disabled):active { transform: scale(0.96); }

/* Dinlenme sayısı ortada, ikincil */
.rs-radio-card-actions .rs-listen-count {
  flex: 1;
  justify-content: center;
  font-size: 11px;
  color: var(--rs-text-3);
}

/* Favori & detay — sade, dokunulabilir */
.rs-favorite-btn,
.rs-card-detail-link {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

/* AKTİF ÇALAN KART — net ama abartısız vurgu */
.rs-radio-card.is-playing {
  border-color: var(--rs-accent) !important;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.22), var(--rs-shadow-lg) !important;
}

/* Kart üstü rozetler — okunabilir, üst üste binmeyen */
.rs-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rs-badge-live-sm,
.rs-badge-hd,
.rs-badge-new {
  font-size: 9px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

/* ====================================================================
   5. KATEGORİLER — Sade, dikkat çekici, mobilde yatay kaydırmalı
==================================================================== */
.rs-category-cards {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.rs-cat-card {
  background: var(--rs-card-bg);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  padding: 18px 12px 14px;
  gap: 6px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.rs-cat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.34);
  box-shadow: var(--rs-shadow);
}
.rs-cat-card-icon {
  font-size: 24px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--rs-surface);
  margin-bottom: 2px;
}
.rs-cat-card-name { font-size: 13px; }
.rs-cat-card-count { font-size: 11px; }

/* ====================================================================
   6. HABER KARTLARI — Görseller düzgün kırpık, sade tipografi
==================================================================== */
.rs-news-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.rs-news-card {
  background: var(--rs-card-bg);
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius);
  overflow: hidden;
}
.rs-news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.28);
  box-shadow: var(--rs-shadow-lg);
}
.rs-news-card-thumb { aspect-ratio: 16 / 9; }
.rs-news-card-thumb img { object-fit: cover; }
.rs-news-card-title {
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rs-news-card-excerpt {
  color: var(--rs-text-2);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Haber kategori sekmeleri — sade chip görünümü */
.rs-news-tabs { gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.rs-news-tab {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--rs-border-2);
  background: var(--rs-surface);
  color: var(--rs-text-2);
  transition: var(--transition);
}
.rs-news-tab:hover { color: var(--rs-text); border-color: var(--rs-primary); }
.rs-news-tab.active {
  background: rgba(124, 58, 237, 0.14);
  border-color: var(--rs-primary);
  color: var(--rs-text);
}

/* ====================================================================
   6.b HERO HIZLI ERİŞİM — net yönlendirme CTA'ları (sade, ferah)
   Kullanıcı siteye girince "ne yapacağını" hemen görsün diye
   arama kutusunun altına yerleştirilen hafif pill bağlantılar.
==================================================================== */
.rs-hero-quicklinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.rs-hero-quicklink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rs-text);
  background: var(--rs-surface);
  border: 1px solid var(--rs-border-2);
  transition: transform 0.2s ease, border-color 0.2s ease,
              background 0.2s ease, color 0.2s ease;
}
.rs-hero-quicklink span { font-size: 15px; line-height: 1; }
.rs-hero-quicklink:hover {
  transform: translateY(-2px);
  color: var(--rs-text);
  border-color: var(--rs-primary);
  background: rgba(124, 58, 237, 0.12);
}
[data-theme="light"] .rs-hero-quicklink {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Hero CTA'larının atladığı bölümler sabit header'ın altında kalmasın */
#rsPopuler,
#rsKategoriler,
#rsSonHaberler {
  scroll-margin-top: calc(var(--rs-header-h, 64px) + 16px);
}

/* ====================================================================
   6.c AKTİF ÇALAN KART — gerçek durum (.playing) üzerinden vurgu
   Not: Oynatıcı JS'i play butonuna `.playing` sınıfı ekliyor; kartın
   kendisine sınıf eklenmiyordu. Modern :has() ile kartı net işaretliyoruz
   (PHP/JS'e dokunmadan). `.is-playing` kuralı da geriye dönük korunur.
==================================================================== */
.rs-radio-card:has(.rs-play-btn.playing),
.rs-radio-card:has(.rs-play-radio.playing),
.rs-radio-card.is-playing {
  border-color: var(--rs-accent) !important;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.22), var(--rs-shadow-lg) !important;
}
/* Çalan kartta "ŞU AN ÇALIYOR" etiketini öne çıkar (markup'ta mevcut) */
.rs-radio-card:has(.rs-play-btn.playing) .rs-card-now-playing,
.rs-radio-card:has(.rs-play-radio.playing) .rs-card-now-playing {
  opacity: 1;
}

/* ====================================================================
   6.d HEADER — sade, hizalı, modern üst bar (yapı korunur)
==================================================================== */
.rs-header {
  background: var(--rs-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rs-border);
}
.rs-header-inner {
  height: var(--rs-header-h, 64px);
  gap: 14px;
}
/* Üst bar arama kutusu — yumuşak köşe, net odak */
.rs-live-search-input {
  border-radius: 12px;
  background: var(--rs-input-bg);
  border: 1px solid var(--rs-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rs-live-search-input:focus {
  outline: none;
  border-color: var(--rs-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}
/* "Canlı Dinle" üst bar butonu — sıcak ama abartısız */
.rs-header-actions .rs-btn-live {
  border-radius: 100px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.22);
}

/* ====================================================================
   6.e SADELEŞTİRME & HİZALAMA
   - Hero başlığında kelime ortadan kırılmasını engelle ("rad yoyu" sorunu)
   - Container'ı dengele: yan boşluklar azalsın, tüm bölümler aynı hizada
==================================================================== */
.rs-hero-title {
  word-break: keep-all;          /* kelimeyi ortadan bölme */
  overflow-wrap: normal;
  hyphens: none;
  -webkit-hyphens: none;
  text-wrap: balance;            /* satırları dengeli dağıt */
}
.rs-hero-subtitle { text-wrap: balance; }

/* Tüm bölümler tek container sistemiyle hizalı; masaüstünde daha ferah genişlik,
   sağda gereksiz boşluk kalmaması için. (Tüm sayfalarda tutarlı.) */
.rs-container {
  max-width: 1340px;
  width: 100%;
}
.rs-hero-content { width: 100%; }

/* ====================================================================
   7. MOBİL — Ferah, boğmayan, dokunmatik dostu
==================================================================== */
@media (max-width: 768px) {
  :root { --rs-section-gap: 36px; }

  /* Hero ekranı kaplamasın, mobilde özellikle kısa olsun */
  .rs-hero {
    min-height: auto !important;
    padding: 44px 16px 32px !important;
  }
  .rs-hero-stats {
    gap: 16px;
    margin-top: 22px;
    padding-top: 18px;
  }
  .rs-hero-search { margin-top: 18px; }

  /* Hızlı erişim CTA'ları mobilde sığsın, dokunmatik hedef yeterli olsun */
  .rs-hero-quicklinks { gap: 8px; margin-top: 14px; }
  .rs-hero-quicklink {
    font-size: 12.5px;
    padding: 9px 13px;
  }

  /* Bölümler arası boşluk dengeli */
  .rs-section { padding: 34px 0 !important; }
  .rs-section-header { margin-bottom: 18px; }

  /* Kategoriler: yatay kaydırılabilir şerit — boğmasın */
  .rs-category-cards {
    display: flex !important;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 94%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 4%, #000 94%, transparent);
  }
  .rs-category-cards::-webkit-scrollbar { display: none; }
  .rs-cat-card {
    flex: 0 0 120px;
    scroll-snap-align: start;
  }

  /* Dokunmatik hedefler ≥ 44px */
  .rs-play-btn,
  .rs-play-radio { width: 44px !important; height: 44px !important; }
  .rs-favorite-btn,
  .rs-card-detail-link { width: 38px !important; height: 38px !important; }
}

@media (max-width: 480px) {
  /* Kartlar 2 sütun ve rahat okunur kalsın */
  .rs-radio-grid,
  .rs-radio-grid-lg { gap: 10px !important; }
  .rs-radio-card-title { font-size: 13px; }
  .rs-news-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
}

/* ====================================================================
   8. ERİŞİLEBİLİRLİK — Hareket azaltma tercihi
==================================================================== */
@media (prefers-reduced-motion: reduce) {
  .rs-wave,
  .rs-eq-bar,
  .rs-hero-waves,
  .rs-hero-eq { animation: none !important; }
  .rs-hero-eq { opacity: 0.05; }
  .rs-radio-card,
  .rs-cat-card,
  .rs-news-card,
  .rs-hero-quicklink,
  .rs-radio-card:hover,
  .rs-cat-card:hover,
  .rs-news-card:hover,
  .rs-hero-quicklink:hover { transition: none !important; transform: none !important; }
}
