:root {
  --ink: #101417;
  --deep: #071018;
  --gold: #b88a4c;
  --gold-2: #d9ad72;
  --paper: #f4f0e9;
  --paper-2: #faf7f1;
  --line: #d9cfc1;
  --muted: #7d776f;
}

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

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif;
  line-height: 1.8;
}

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

button {
  font: inherit;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.container {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 150px;
  align-items: center;
  min-height: 82px;
  padding: 0 24px;
  background: rgba(7, 16, 24, 0.96);
  border-bottom: 1px solid rgba(217, 173, 114, 0.15);
  backdrop-filter: blur(14px);
}

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

.brand-logo {
  width: 175px;
  max-height: 62px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.4vw, 24px);
  color: #eee;
  font-size: 12px;
  white-space: nowrap;
}

.desktop-nav a {
  position: relative;
  padding: 31px 0 26px;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 19px;
  width: 0;
  height: 1px;
  content: "";
  background: var(--gold);
  transition: width 0.3s ease;
}

.desktop-nav a:hover, .desktop-nav a.active {
  color: var(--gold-2);
}

.desktop-nav a:hover::after, .desktop-nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  direction: ltr;
}

.language {
  color: #fff;
  font-size: 11px;
  opacity: 0.65;
}

.language.active {
  color: var(--gold-2);
  opacity: 1;
}

.menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  padding: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: var(--gold-2);
}

.mobile-menu {
  position: fixed;
  top: 76px;
  right: 0;
  left: 0;
  z-index: 45;
  display: grid;
  gap: 14px;
  padding: 22px 28px;
  background: rgba(7, 16, 24, 0.98);
  border-bottom: 1px solid rgba(217, 173, 114, 0.25);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hero */
.page-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: url("assets/news-hero.jpg") center / cover no-repeat;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient( 90deg, rgba(5, 13, 19, 0.28), rgba(5, 13, 19, 0.88) ), linear-gradient( 0deg, rgba(5, 13, 19, 0.48), transparent );
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 82px;
  text-align: center;
  color: #fff;
}

.page-hero-content p, .section-heading small {
  margin: 0;
  color: var(--gold-2);
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  direction: ltr;
}

.page-hero-content h1 {
  margin: 12px 0 8px;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
}

.page-hero-content span {
  color: #ddd;
  font-size: 14px;
}

.page-hero-content i {
  display: block;
  width: 95px;
  height: 1px;
  margin: 25px auto 0;
  background: var(--gold);
}

/* Page */
.news-page {
  padding: 42px 0 70px;
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.filter-bar button {
  padding: 8px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.filter-bar button:hover, .filter-bar button.active {
  background: var(--deep);
  color: var(--gold-2);
}

/* Featured news */
.featured-news {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  background: var(--deep);
  color: #fff;
}

.featured-news-image img {
  height: 100%;
  min-height: 430px;
}

.featured-news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px;
}

.news-label, .news-card-content > span {
  color: var(--gold-2);
  font-size: 11px;
}

.featured-news-content h2 {
  margin: 10px 0;
  color: var(--gold-2);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.6;
}

.featured-news-content p {
  color: #c7c7c7;
  font-size: 13px;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(217, 173, 114, 0.22);
  color: #aaa;
  font-size: 11px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 20px;
  margin-top: 22px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #d5ac74, #97703d);
  color: #172026;
}

/* Heading */
.section-heading {
  margin: 62px auto 27px;
  text-align: center;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: 32px;
  font-weight: 500;
}

/* News cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 34px rgba(7, 16, 24, 0.12);
}

.news-card-image {
  height: 220px;
  overflow: hidden;
}

.news-card-image img {
  height: 100%;
  transition: transform 0.6s ease;
}

.news-card:hover img {
  transform: scale(1.06);
}

.news-card-content {
  padding: 20px;
}

.news-card h3 {
  min-height: 62px;
  margin: 8px 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.75;
}

.news-card p {
  min-height: 72px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.news-card .news-meta {
  border-top-color: var(--line);
  color: #86623a;
}

.news-card a {
  display: inline-block;
  margin-top: 13px;
  color: #805d32;
  font-size: 12px;
}

.news-card.is-hidden {
  display: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 35px;
  direction: ltr;
}

.pagination button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.pagination button:hover, .pagination button.active {
  background: var(--deep);
  color: var(--gold-2);
}

/* =====================================================
   FOOTER
===================================================== */
footer#contact {
  margin:0;
  padding:0;
  background:#071018;
  color:#ddd;
  border-top:3px solid var(--gold)
}

footer#contact .footer-grid {
  display:grid;
  grid-template-columns:320px repeat(4,1fr);
  gap:0;
  padding:35px 0 25px;
  align-items:start
}

footer#contact .footer-grid>div {
  padding:0 16px;
  margin:0;
  min-height:auto
}

footer#contact .footer-grid>div:not(:last-child) {
  border-left:1px solid rgba(255,255,255,.08)
}

.footer-brand {
  display:flex;
  align-items:flex-start;
  justify-content:center
}

.footer-logo {
  width:280px;
  max-width:100%;
  height:auto
}

footer#contact h4 {
  margin:0 0 10px;
  padding:0;
  color:var(--gold-2);
  font-size:15px
}

footer#contact a {
  display:block;
  margin:2px 0;
  color:#d8d8d8;
  font-size:12px;
  line-height:1.7
}

footer#contact p {
  margin:2px 0;
  font-size:12px;
  line-height:1.7
}

footer#contact .social {
  margin-top:8px;
  color:var(--gold-2);
  font-size:20px;
  letter-spacing:6px
}

footer#contact .copyright {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  margin:0;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:11px
}

@media(max-width:1100px) {
  footer#contact .footer-grid {
    grid-template-columns:repeat(3,1fr)
  }

  .footer-brand {
    grid-column:1/-1
  }

}

@media(max-width:768px) {
  footer#contact .footer-grid {
    grid-template-columns:repeat(2,1fr);
    padding:24px 0 16px
  }

  footer#contact .copyright {
    flex-direction:column;
    gap:4px;
    text-align:center
  }

}

@media(max-width:520px) {
  footer#contact .footer-grid {
    grid-template-columns:1fr
  }

  footer#contact .footer-grid>div {
    padding:12px 0;
    border-left:0;
    border-bottom:1px solid rgba(255,255,255,.08);
    text-align:center
  }

  footer#contact .footer-grid>div:last-child {
    border-bottom:0
  }

  .footer-brand {
    justify-content:center
  }

  .footer-logo {
    width:220px
  }

}

/* ===== Real news archive refinements ===== */
.page-hero{
  min-height:400px;
  background:url('img/news-real/mohit-1.jpg') center 38%/cover no-repeat;
}
.page-hero-overlay{
  background:linear-gradient(90deg,rgba(5,13,19,.36),rgba(5,13,19,.92)),linear-gradient(0deg,rgba(5,13,19,.58),transparent);
}
.featured-news-image,
.news-card-image{
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  position:relative;
  text-align:inherit;
}
.featured-news-image img{width:100%;height:100%;min-height:430px;object-fit:cover}
.news-card-image img{width:100%;height:100%;object-fit:cover}
.image-count{
  position:absolute;
  inset-inline-end:12px;
  bottom:12px;
  min-width:30px;
  height:26px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(7,16,24,.82);
  border:1px solid rgba(217,173,114,.45);
  color:#fff;
  font:600 11px/1 "Vazirmatn",Tahoma,Arial,sans-serif;
}
.story-button{
  display:inline-flex;
  margin-top:14px;
  padding:0;
  border:0;
  background:transparent;
  color:#805d32;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}
.story-button:hover{color:var(--gold)}
.news-empty{padding:60px 20px;text-align:center;color:var(--muted)}
.modal-open{overflow:hidden}
.news-modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
  place-items:center;
  padding:24px;
}
.news-modal.open{display:grid}
.news-modal-backdrop{position:absolute;inset:0;border:0;background:rgba(3,7,10,.9);cursor:pointer}
.news-modal-card{
  position:relative;
  z-index:2;
  width:min(1120px,94vw);
  max-height:92vh;
  overflow:auto;
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(320px,.88fr);
  background:#f6f1e9;
  box-shadow:0 30px 90px rgba(0,0,0,.45);
}
.news-modal-close{
  position:absolute;
  top:10px;
  inset-inline-end:10px;
  z-index:5;
  width:42px;
  height:42px;
  border:1px solid rgba(255,255,255,.3);
  background:rgba(7,16,24,.72);
  color:#fff;
  font-size:27px;
  cursor:pointer;
}
.news-modal-gallery{position:relative;min-height:520px;background:#071018;display:grid;place-items:center;overflow:hidden}
.news-modal-image{width:100%;height:100%;max-height:78vh;object-fit:contain;background:#071018}
.news-modal-prev,.news-modal-next{
  position:absolute;
  top:50%;
  width:42px;
  height:54px;
  transform:translateY(-50%);
  border:1px solid rgba(255,255,255,.3);
  background:rgba(7,16,24,.68);
  color:#fff;
  font-size:28px;
  cursor:pointer;
}
.news-modal-prev{left:14px}.news-modal-next{right:14px}
.news-modal-count{
  position:absolute;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  padding:4px 9px;
  background:rgba(7,16,24,.72);
  color:#fff;
  font:500 11px/1.5 "Vazirmatn",Tahoma,Arial,sans-serif;
}
.news-modal-copy{padding:58px 42px 42px;align-self:center}
.news-modal-category{color:var(--gold);font-size:11px;letter-spacing:.05em}
.news-modal-title{margin:10px 0 6px;color:var(--deep);font-size:clamp(25px,3vw,38px);line-height:1.55;font-weight:600}
.news-modal-date{display:block;margin:0 0 20px;color:#8c7457;font-size:12px}
.news-modal-desc{margin:0;color:#5f5952;font-size:14px;line-height:2.1}
html[dir="ltr"] .news-modal-copy,html[dir="ltr"] .news-card-content,html[dir="ltr"] .featured-news-content{text-align:left}
html[dir="rtl"] .news-modal-copy,html[dir="rtl"] .news-card-content,html[dir="rtl"] .featured-news-content{text-align:right}
@media(max-width:860px){
  .featured-news{grid-template-columns:1fr}
  .featured-news-image img{min-height:310px;max-height:430px}
  .news-grid{grid-template-columns:repeat(2,1fr)}
  .news-modal-card{grid-template-columns:1fr;width:min(760px,94vw)}
  .news-modal-gallery{min-height:340px}
  .news-modal-copy{padding:32px 26px 34px}
}
@media(max-width:620px){
  .news-grid{grid-template-columns:1fr}
  .featured-news-content{padding:28px 22px}
  .featured-news-content h2{font-size:26px}
  .news-modal{padding:10px}
  .news-modal-gallery{min-height:280px}
  .news-modal-prev,.news-modal-next{width:38px;height:48px}
}

/* ===== Adaptive news cards: size follows each source image ===== */
.news-grid{
  display:block;
  columns:3;
  column-gap:20px;
}
.news-card{
  display:inline-block;
  width:100%;
  margin:0 0 20px;
  vertical-align:top;
  break-inside:avoid;
  -webkit-column-break-inside:avoid;
  page-break-inside:avoid;
}
.news-card-image{
  display:block;
  width:100%;
  height:auto;
  overflow:hidden;
}
.news-card-image img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  object-fit:contain;
}
.news-card h3,
.news-card p{
  min-height:0;
}

/* Featured item also respects the original photograph ratio. */
.featured-news{
  align-items:stretch;
}
.featured-news-image{
  display:flex;
  align-items:center;
  width:100%;
  min-height:0;
  background:#071018;
  overflow:hidden;
}
.featured-news-image img{
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  object-fit:contain;
}

@media (max-width:1000px){
  .news-grid{columns:2;}
}
@media (max-width:650px){
  .news-grid{columns:1;}
  .news-card{margin-bottom:16px;}
}
