:root {
  --navy: #0b2a4a;
  --navy-deep: #071b31;
  --red: #c8102e;
  --red-dark: #9d0c24;
  --gold: #f0b429;
  --bg: #eef1f5;
  --card: #ffffff;
  --line: #d9dee6;
  --text: #17202e;
  --muted: #5b6676;
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.8; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3 { margin: 0; line-height: 1.6; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.wrap { width: min(1180px, 94%); margin-inline: auto; }

/* top bar */
.topbar { background: var(--navy-deep); color: #b9c6d8; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: .3rem; flex-wrap: wrap; }
.top-links { display: flex; gap: 1.2rem; }
.top-links a:hover { color: #fff; }
.top-links a { display: inline-flex; align-items: center; gap: .4rem; }

.dot { display: inline-block; width: .55rem; height: .55rem; background: var(--red); border-radius: 50%; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,16,46,.7); } 100% { box-shadow: 0 0 0 .6rem rgba(200,16,46,0); } }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(11,42,74,.06); }
.masthead { display: flex; align-items: center; gap: 1.5rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand:hover { color: inherit; }
.logo-slot { display: grid; place-items: center; width: 4.5rem; height: 3rem; border: 2px dashed #9aa8bb; color: var(--muted); font-size: .72rem; font-weight: 500; border-radius: 4px; background: var(--bg); text-align: center; line-height: 1.3; }
.brand img { height: 3rem; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.brand-text small { font-size: .72rem; color: var(--muted); letter-spacing: .08em; direction: ltr; text-align: right; }
.tagline { margin: 0; color: var(--muted); font-size: .92rem; padding-inline-start: 1.5rem; border-inline-start: 2px solid var(--line); }
.live-btn { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .5rem; background: var(--red); color: #fff; font-weight: 700; font-size: .9rem; padding: .35rem 1rem; border-radius: 4px; transition: background .2s; }
.live-btn:hover { background: var(--red-dark); color: #fff; }
.live-btn .dot { background: #fff; animation-name: pulse-w; }
@keyframes pulse-w { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 100% { box-shadow: 0 0 0 .6rem rgba(255,255,255,0); } }

.catnav { background: var(--navy); }
.catnav .wrap { display: flex; overflow-x: auto; scrollbar-width: none; }
.catnav a { color: #fff; white-space: nowrap; padding: .55rem 1rem; font-size: .95rem; font-weight: 500; border-bottom: 3px solid transparent; transition: background .2s, border-color .2s; }
.catnav a:hover, .catnav a.active { background: var(--navy-deep); border-color: var(--red); color: #fff; }

/* breaking news */
.breaking { background: #fff; border-bottom: 1px solid var(--line); }
.breaking .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .45rem; }
.breaking-label { flex: none; background: var(--red); color: #fff; font-weight: 700; font-size: .85rem; padding: .05rem .9rem; border-radius: 3px; }
.breaking-items { position: relative; flex: 1; height: 1.8rem; overflow: hidden; }
.breaking-items li { position: absolute; inset: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; animation: ticker 16s infinite; }
.breaking-items li:nth-child(2) { animation-delay: 4s; }
.breaking-items li:nth-child(3) { animation-delay: 8s; }
.breaking-items li:nth-child(4) { animation-delay: 12s; }
@keyframes ticker {
  0% { opacity: 0; transform: translateY(10px); }
  3%, 22% { opacity: 1; transform: translateY(0); }
  25%, 100% { opacity: 0; transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .dot, .bars i { animation: none; }
  .bars i { height: 60%; }
  .breaking-items li { animation: none; }
  .breaking-items li:first-child { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* photo placeholders */
.photo { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #dde3ec, #dde3ec 12px, #e8ecf2 12px, #e8ecf2 24px); color: var(--muted); font-size: .85rem; border-radius: 4px; border: 2px dashed #b3bfce; }
.ph-lg { aspect-ratio: 16 / 9; }
.ph-md { aspect-ratio: 4 / 3; }
.ph-sm { aspect-ratio: 16 / 10; }

/* front page */
.front { padding: 1.5rem 0 1rem; }
.front-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.lead-story { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 4px; overflow: hidden; }
.lead-story .photo { border-radius: 0; }
.lead-text { padding: 1.2rem 1.4rem 1.4rem; }
.kicker { display: inline-block; color: var(--red); font-weight: 700; font-size: .85rem; }
.lead-text h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; color: var(--navy); margin: .1rem 0 .5rem; line-height: 1.7; }
.lead-text p { margin: 0 0 .8rem; color: #364154; }
.meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); }
.meta span { color: var(--red); font-weight: 700; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: .7rem .7rem 1rem; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 8px 20px rgba(11,42,74,.12); transform: translateY(-3px); }
.card .kicker { margin-top: .5rem; }
.card h3 { font-size: 1.02rem; font-weight: 700; color: var(--navy); }
.card time { font-size: .78rem; color: var(--muted); }

/* sidebar */
.front-side { display: grid; gap: 1.2rem; }
@media (min-width: 961px) {
  .front-side .player { position: sticky; top: 8.5rem; z-index: 5; }
}
.player { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; border-radius: 4px; padding: 1.2rem; border-top: 4px solid var(--red); }
.player-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.player h2 { font-size: 1.1rem; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--red); font-weight: 700; font-size: .78rem; padding: 0 .7rem; border-radius: 999px; }
.badge .dot { background: #fff; animation-name: pulse-w; width: .5rem; height: .5rem; }
.badge.soon { background: #5b6b82; }
.bars.idle i { animation: none; height: 20%; opacity: .5; }
.now { color: var(--gold); font-size: .9rem; margin: .4rem 0 .8rem; }
.player audio { width: 100%; }
.note { font-size: .78rem; color: #9fb0c8; margin: .7rem 0 0; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 34px; }
.bars i { width: 6px; background: var(--gold); border-radius: 3px; animation: eq 1.2s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: .2s; } .bars i:nth-child(3) { animation-delay: .4s; }
.bars i:nth-child(4) { animation-delay: .1s; } .bars i:nth-child(5) { animation-delay: .5s; }
.bars i:nth-child(6) { animation-delay: .3s; } .bars i:nth-child(7) { animation-delay: .6s; } .bars i:nth-child(8) { animation-delay: .15s; }
@keyframes eq { 0%,100% { height: 20%; } 50% { height: 100%; } }

.box { background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.box-title { font-size: 1rem; font-weight: 700; color: #fff; background: var(--navy); padding: .35rem 1rem; border-radius: 3px 3px 0 0; border-bottom: 3px solid var(--red); }
.timeline li { display: flex; gap: .8rem; padding: .6rem 1rem; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { flex: none; color: var(--red); font-weight: 700; font-size: .82rem; }
.ranked { counter-reset: n; }
.ranked li { counter-increment: n; display: flex; gap: .8rem; align-items: flex-start; padding: .6rem 1rem; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.ranked li:last-child { border-bottom: 0; }
.ranked li::before { content: counter(n, persian); flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; background: var(--bg); color: var(--navy); font-weight: 800; border-radius: 50%; font-size: .85rem; }
.ranked li:nth-child(-n+3)::before { background: var(--red); color: #fff; }

/* categories */
.categories { padding: 1rem 0 2rem; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1rem; }
.cat-title { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 2px solid var(--line); position: relative; }
.cat-title::before { content: ""; width: 6px; height: 1.3rem; background: var(--red); }
.cat-title::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -2px; width: 4rem; height: 2px; background: var(--red); }
.cat-lead h3 { font-size: 1.02rem; font-weight: 700; color: var(--navy); margin: .6rem 0 .5rem; }
.headlines li { padding: .45rem 0; border-top: 1px dashed var(--line); font-size: .93rem; display: flex; gap: .5rem; }
.headlines li::before { content: ""; flex: none; width: .4rem; height: .4rem; margin-top: .7rem; background: var(--red); border-radius: 50%; }

/* schedule */
.schedule { background: var(--navy); color: #fff; padding: 2.5rem 0; }
.band-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .6rem; }
.band-title::before { content: ""; width: 6px; height: 1.3rem; background: var(--gold); }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.slot { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; padding: .9rem 1rem; display: grid; gap: .1rem; }
.slot time { color: var(--gold); font-weight: 700; font-size: .85rem; }
.slot span { color: #b9c6d8; font-size: .88rem; }

/* about + contact */
.about, .contact { padding: 2.5rem 0; }
.about .wrap { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1.5rem; }
.about p { margin: 0; max-width: 46em; color: #364154; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: start; }
form { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 4px; padding: 1.4rem; display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .93rem; }
input, select, textarea { font: inherit; padding: .55rem .8rem; border: 1px solid #bcc5d2; border-radius: 4px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--navy); }
button { font: inherit; font-weight: 700; background: var(--red); color: #fff; border: 0; border-radius: 4px; padding: .7rem 1.4rem; cursor: pointer; transition: background .2s; }
button:hover { background: var(--red-dark); }

/* footer */
footer { background: var(--navy-deep); color: #b9c6d8; padding: 2rem 0 1rem; border-top: 4px solid var(--red); }
.foot { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; }
.foot strong { color: #fff; font-size: 1.3rem; }
.foot p { margin: 0; font-size: .9rem; }
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .92rem; }
.foot-links a:hover { color: #fff; }
.copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: .8rem; font-size: .82rem; }

@media (max-width: 960px) {
  .front-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .tagline { display: none; }
  .live-btn { font-size: .82rem; padding-inline: .7rem; }
  .brand-text strong { font-size: 1.4rem; }
  .trio, .cat-grid, .contact-grid, .foot { grid-template-columns: 1fr; }
  .top-links a:nth-child(3) { display: none; }
  html { scroll-padding-top: 6.5rem; }
}
