:root {
  --red: #c8102e;
  --red-deep: #8b0a1e;
  --red-bright: #e5233a;
  --ink: #12090b;
  --ink-soft: #2a1519;
  --paper: #f7f1ef;
  --muted: #8a6f74;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #d4a017;
  --shadow: 0 24px 60px rgba(18, 9, 11, 0.35);
  --font-fa: "Vazirmatn", "Tahoma", sans-serif;
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --radius: 2px;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-fa);
  color: var(--paper);
  background: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button.feature__main,
.feature__side > button,
button.mosaic__item,
button.story,
button.media-tile {
  appearance: none;
  margin: 0;
  padding: 0;
  width: 100%;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  font: inherit;
}

.feature__side > button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  background: #fff;
  color: #000;
  padding: 0.5rem 0.8rem;
  z-index: 50;
}

.skip:focus {
  top: 1rem;
}

/* Atmosphere */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site {
  position: relative;
  z-index: 1;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(18, 9, 11, 0.78);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__mark {
  width: 52px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(200, 16, 46, 0.45));
  animation: crestIn 1s ease both;
}

.brand__text {
  display: grid;
  line-height: 1.1;
}

.brand__fa {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__en {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: rgba(247, 241, 239, 0.7);
}

.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 0.45rem 0.8rem;
  border: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: rgba(229, 35, 58, 0.55);
  background: rgba(200, 16, 46, 0.18);
  transform: translateY(-1px);
}

/* Hero — one composition */
.hero {
  min-height: min(92vh, 860px);
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(139, 10, 30, 0.88) 0%, rgba(18, 9, 11, 0.55) 42%, rgba(18, 9, 11, 0.82) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(229, 35, 58, 0.45), transparent 55%),
    url("../assets/hero-pattern.svg") center/cover no-repeat,
    linear-gradient(160deg, #5a0714, #12090b 60%);
  transform: scale(1.04);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(18, 9, 11, 0.95) 8%, transparent 48%),
    repeating-linear-gradient(
      -18deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.025) 14px 15px
    );
}

.hero__content {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 5.5rem 1.25rem 3.5rem;
  display: grid;
  gap: 1.4rem;
  justify-items: start;
}

.hero__crest {
  width: min(168px, 42vw);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
  animation: crestIn 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 6.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: rise 0.9s 0.15s both;
}

.hero__lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(247, 241, 239, 0.86);
  animation: rise 0.9s 0.28s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s 0.4s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid transparent;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--red-bright);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  color: rgba(247, 241, 239, 0.65);
  font-size: 0.92rem;
  animation: rise 0.9s 0.5s both;
}

.hero__meta strong {
  color: var(--gold);
  font-weight: 700;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.9rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.03em;
}

.section__head p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
  text-align: left;
}

[dir="rtl"] .section__head p {
  text-align: right;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39d98a;
  box-shadow: 0 0 0 0 rgba(57, 217, 138, 0.6);
  animation: pulse 1.8s infinite;
  display: inline-block;
  margin-inline-end: 0.4rem;
}

/* Featured media composition */
.feature {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1rem;
  min-height: 520px;
}

.feature__main,
.feature__side article,
.mosaic__item,
.story,
.topic,
.media-tile {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1519, #1a0d10);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.feature__main:hover,
.feature__side article:hover,
.mosaic__item:hover,
.story:hover,
.media-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 35, 58, 0.45);
  box-shadow: var(--shadow);
}

.feature__main {
  min-height: 520px;
  display: grid;
  align-items: end;
}

.feature__side {
  display: grid;
  gap: 1rem;
}

.feature__side article {
  min-height: 160px;
  display: grid;
  align-items: end;
  padding: 1.1rem;
}

.cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 0.7s ease;
  z-index: 0;
}

.feature__main:hover .cover,
.feature__side article:hover .cover,
.mosaic__item:hover .cover,
.story:hover .cover,
.media-tile:hover .cover {
  transform: scale(1.1);
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 5, 7, 0.95) 10%, rgba(12, 5, 7, 0.25) 55%, rgba(12, 5, 7, 0.15));
}

.feature__main .body,
.story .body,
.media-tile .body {
  position: relative;
  z-index: 1;
  padding: 1.4rem;
}

.kicker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.feature__main h3,
.feature__side h3,
.story h3,
.media-tile h3,
.topic h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.feature__side h3 {
  font-size: 1.05rem;
}

.excerpt {
  margin: 0;
  color: rgba(247, 241, 239, 0.78);
  font-size: 0.95rem;
}

/* Mosaic of pictures / media */
.mosaic {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 0.85rem;
}

.mosaic__item:first-child {
  grid-row: 1 / span 2;
}

.mosaic__item {
  display: grid;
  align-items: end;
  min-height: 180px;
}

.mosaic__item .body {
  position: relative;
  z-index: 1;
  padding: 1rem;
}

/* Story ribbon — editorial, not bland columns */
.ribbon {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x mandatory;
}

.ribbon::-webkit-scrollbar {
  height: 6px;
}

.ribbon::-webkit-scrollbar-thumb {
  background: rgba(229, 35, 58, 0.55);
}

.story {
  scroll-snap-align: start;
  min-height: 340px;
  display: grid;
  align-items: end;
}

/* Dense editorial grid for remaining week news */
.week-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}

.week-grid .story:nth-child(1) {
  grid-column: span 7;
  min-height: 380px;
}

.week-grid .story:nth-child(2),
.week-grid .story:nth-child(3) {
  grid-column: span 5;
  min-height: 180px;
}

.week-grid .story:nth-child(n + 4) {
  grid-column: span 4;
  min-height: 250px;
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.media-tile {
  min-height: 210px;
  display: grid;
  align-items: end;
}

.placeholder-cover {
  background:
    linear-gradient(145deg, rgba(200, 16, 46, 0.75), rgba(18, 9, 11, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.04) 12px 13px);
}

.status {
  color: var(--muted);
  font-size: 0.92rem;
}

.status--error {
  color: #ff9aa8;
}

/* Forum */
.forum-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
}

.panel {
  background: linear-gradient(180deg, rgba(42, 21, 25, 0.9), rgba(18, 9, 11, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem;
}

.panel h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.form {
  display: grid;
  gap: 0.75rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: rgba(247, 241, 239, 0.8);
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 0.7rem 0.8rem;
  outline: none;
}

.form input:focus,
.form textarea:focus {
  border-color: rgba(229, 35, 58, 0.7);
}

.topics {
  display: grid;
  gap: 0.75rem;
}

.topic {
  padding: 1rem 1.1rem;
}

.topic__meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.topic p {
  margin: 0;
  color: rgba(247, 241, 239, 0.82);
}

/* Footer */
.footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, transparent, rgba(200, 16, 46, 0.12)),
    #0c0507;
  padding: 2.4rem 1.25rem 2rem;
}

.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
}

.footer__brand img {
  width: 36px;
  height: 42px;
  object-fit: contain;
}

.footer__credit {
  color: rgba(247, 241, 239, 0.72);
}

.footer__credit a {
  color: #fff;
  border-bottom: 1px solid rgba(229, 35, 58, 0.8);
}

.footer__credit a:hover {
  color: var(--red-bright);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #221014 25%, #32181d 37%, #221014 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

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

@keyframes crestIn {
  from { opacity: 0; transform: translateY(12px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(57, 217, 138, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(57, 217, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(57, 217, 138, 0); }
}

@media (max-width: 960px) {
  .feature,
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .feature__main {
    min-height: 420px;
  }

  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .mosaic__item:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
    min-height: 260px;
  }

  .week-grid .story:nth-child(1),
  .week-grid .story:nth-child(2),
  .week-grid .story:nth-child(3),
  .week-grid .story:nth-child(n + 4) {
    grid-column: span 6;
  }

  .media-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .section__head {
    flex-direction: column;
    align-items: start;
  }

  .week-grid .story:nth-child(1),
  .week-grid .story:nth-child(2),
  .week-grid .story:nth-child(3),
  .week-grid .story:nth-child(n + 4) {
    grid-column: span 12;
  }

  .media-strip {
    grid-template-columns: 1fr;
  }

  .hero__content {
    padding-top: 4.5rem;
  }
}

/* On-site news reader (no outbound source links) */
.reader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(8, 3, 5, 0.72);
  backdrop-filter: blur(8px);
}

.reader[hidden] {
  display: none;
}

body.reader-open {
  overflow: hidden;
}

.reader__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 1.25rem 1.25rem 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, #2a1519, #14090b 60%, #1a0d10);
  box-shadow: var(--shadow);
  color: var(--text, #f7f1ef);
}

.reader__close {
  position: absolute;
  inset-inline-end: 0.7rem;
  top: 0.55rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  cursor: pointer;
  line-height: 1;
  font-size: 1.35rem;
}

.reader__cover {
  position: relative;
  height: 220px;
  margin: 0 0 1rem;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reader__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 5, 7, 0.55), transparent 55%);
}

#news-reader-body h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.35;
}

#news-reader-body p {
  margin: 0;
  color: rgba(247, 241, 239, 0.82);
  line-height: 1.75;
}

#news-reader-body .reader__loading {
  color: rgba(247, 241, 239, 0.55);
  font-style: normal;
}
