/* ═══════════════════════════════════════════════════
   MADAAR MEDIA — Visual Identity System
   هویت بصری مدار مدیا — مدار = Orbit
═══════════════════════════════════════════════════ */

/* ─── HERO — The Broadcast Center ────────────────── */
.mm-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 20px) 0 60px;
  background: var(--bg);
}

/* Gradient mesh background */
.mm-hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,195,0,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(255,130,0,0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(255,195,0,0.03) 0%, transparent 40%);
  pointer-events: none;
}

/* Scan lines */
.mm-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(255,255,255,0.008) 2px,
    rgba(255,255,255,0.008) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Orbital rings */
.mm-hero-orbits {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 1;
}
.orbit-svg {
  width: 100%;
  height: 100%;
}
.orbit-ring {
  fill: none;
  stroke: rgba(255,195,0,0.08);
  stroke-width: 1;
  stroke-dasharray: 8 12;
}
.orbit-1 { animation: orbitSpin 30s linear infinite; transform-origin: 400px 400px; }
.orbit-2 { animation: orbitSpin 45s linear infinite reverse; transform-origin: 400px 400px; stroke-dasharray: 4 16; }
.orbit-3 { animation: orbitSpin 60s linear infinite; transform-origin: 400px 400px; stroke-dasharray: 2 20; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.orbit-dot { opacity: 0.8; }
.dot-1 { animation: orbitSpin 30s linear infinite; transform-origin: 400px 400px; }
.dot-2 { animation: orbitSpin 45s linear infinite reverse; transform-origin: 400px 400px; }
.dot-3 { animation: orbitSpin 60s linear infinite; transform-origin: 400px 400px; }

.signal-wave {
  fill: none;
  stroke: rgba(255,195,0,0.12);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.w1 { animation: waveMove 3s ease-in-out infinite; }
.w2 { animation: waveMove 3s ease-in-out infinite 0.3s; opacity: 0.7; }
.w3 { animation: waveMove 3s ease-in-out infinite 0.6s; opacity: 0.4; }
@keyframes waveMove {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* Hero layout */
.mm-hero-inner {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Hero content */
.mm-hero-content {
  animation: heroContentIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes heroContentIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Broadcast badge */
.mm-broadcast-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,195,0,0.08);
  border: 1px solid rgba(255,195,0,0.2);
  border-radius: 99px;
  padding: 6px 18px;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.mm-broadcast-badge.is-live {
  background: rgba(255,68,68,0.1);
  border-color: rgba(255,68,68,0.3);
  color: #ff4444;
  animation: liveBadgePulse 2s ease-in-out infinite;
}
@keyframes liveBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,68,68,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255,68,68,0); }
}
.mm-broadcast-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(255,195,0,0.6);
  animation: dotPulse 2s ease-in-out infinite;
}
.mm-broadcast-badge.is-live .mm-broadcast-dot {
  background: #ff4444;
  box-shadow: 0 0 10px rgba(255,68,68,0.6);
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* Hero title */
.mm-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(170deg, #ffffff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mm-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 450px;
}

/* Hero actions */
.mm-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Buttons */
.mm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #FFC300, #e6b000);
  color: #080808;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(255,195,0,0.3);
  position: relative;
  overflow: hidden;
}
.mm-btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s;
}
.mm-btn-primary:hover::after { left: 120%; }
.mm-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(255,195,0,0.45);
}
.mm-btn-primary.live-active {
  background: linear-gradient(135deg, #ff4444, #cc3333);
  box-shadow: 0 4px 20px rgba(255,68,68,0.3);
}
.mm-btn-primary.live-active:hover {
  box-shadow: 0 8px 36px rgba(255,68,68,0.45);
}
.mm-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  transition: all 0.3s;
}
.mm-btn-outline:hover {
  border-color: rgba(255,195,0,0.4);
  background: rgba(255,195,0,0.06);
  color: var(--gold);
  box-shadow: 0 4px 16px rgba(255,195,0,0.1);
  transform: translateY(-1px);
}

/* Hero stats */
.mm-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}
.mm-hero-stat { text-align: center; }
.mm-hero-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font);
  line-height: 1;
}
.mm-hero-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 4px;
}
.mm-hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Hero TV frame */
.mm-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heroVisualIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}
@keyframes heroVisualIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.mm-tv-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-2);
  border: 2px solid var(--border-2);
  box-shadow:
    0 0 0 1px rgba(255,195,0,0.05),
    0 24px 60px rgba(0,0,0,0.5),
    0 0 100px rgba(255,195,0,0.05);
}
.mm-tv-screen {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0a0a0a, #111);
  overflow: hidden;
}
.mm-tv-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s;
}
.mm-tv-screen img.loaded { opacity: 1; }
.mm-tv-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,195,0,0.03), transparent 50%);
  pointer-events: none;
}
.mm-tv-noise {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}
.mm-tv-base {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.mm-tv-base::before {
  content: 'MADAAR TV';
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  color: var(--text-3);
}
.mm-tv-base::after {
  content: '';
  margin-right: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255,195,0,0.5);
  animation: dotPulse 2s infinite;
}

/* Frequency bar */
.mm-freq-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 3;
  overflow: hidden;
}
.mm-freq-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold), transparent);
  opacity: 0.3;
  position: relative;
}
.mm-freq-line::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 60px; height: 5px;
  background: var(--gold);
  border-radius: 99px;
  box-shadow: 0 0 12px var(--gold);
  animation: freqScan 4s linear infinite;
}
@keyframes freqScan {
  from { left: -60px; }
  to { left: 100%; }
}

/* ─── Category Cards ─────────────────────────────── */
.mm-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.mm-cat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.mm-cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,195,0,0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.mm-cat-card:hover::before { opacity: 1; }
.mm-cat-card:hover {
  border-color: rgba(255,195,0,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,195,0,0.08);
}
.mm-cat-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gold-dim);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
  transition: all 0.3s;
}
.mm-cat-card:hover .mm-cat-card-icon {
  background: rgba(255,195,0,0.2);
  box-shadow: 0 0 20px rgba(255,195,0,0.15);
}
.mm-cat-card-icon svg { width: 22px; height: 22px; }
.mm-cat-card-info { flex: 1; min-width: 0; }
.mm-cat-card-name { font-weight: 700; font-size: 0.95rem; }
.mm-cat-card-count { font-family: var(--mono); font-size: 0.6875rem; color: var(--text-3); margin-top: 2px; }
.mm-cat-card-arrow { color: var(--text-3); transition: all 0.3s; flex-shrink: 0; }
.mm-cat-card:hover .mm-cat-card-arrow { color: var(--gold); transform: translateX(-4px); }

/* ─── About Strip ────────────────────────────────── */
.mm-about-strip {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.mm-about-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,195,0,0.03), transparent 30%, transparent 70%, rgba(255,195,0,0.03));
  pointer-events: none;
}
.mm-about-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.mm-about-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--gold-dim);
  border: 1px solid rgba(255,195,0,0.15);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
}
.mm-about-title {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.mm-about-text p {
  color: var(--text-2);
  font-size: 0.9rem;
  margin: 0;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .mm-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mm-hero-content { order: 2; }
  .mm-hero-visual { order: 1; }
  .mm-hero-actions { justify-content: center; }
  .mm-hero-stats { justify-content: center; }
  .mm-hero-subtitle { margin-left: auto; margin-right: auto; }
  .mm-hero-orbits { left: -30%; width: 500px; height: 500px; }
  .mm-tv-frame { max-width: 360px; }
  .mm-about-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .mm-hero { min-height: auto; padding-top: calc(var(--header-h) + 40px); padding-bottom: 40px; }
  .mm-hero-orbits { display: none; }
  .mm-cat-grid { grid-template-columns: 1fr; }
  .mm-hero-stats { flex-direction: column; gap: 12px; }
  .mm-hero-stat-divider { width: 40px; height: 1px; }
}

/* ─── Light Theme ────────────────────────────────── */
[data-theme="light"] .mm-hero-mesh {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,195,0,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(255,130,0,0.05) 0%, transparent 40%);
}
[data-theme="light"] .mm-hero-title {
  background: linear-gradient(170deg, #111 30%, #8B6914 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .mm-tv-frame {
  box-shadow: 0 24px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
}
[data-theme="light"] .mm-scanlines { display: none; }
[data-theme="light"] .orbit-ring { stroke: rgba(255,195,0,0.12); }
