:root {
      --bg-dark:    #0c0b08;
      --bg-card:    #141209;
      --bg-section: #111008;
      --gold:       #c9a84c;
      --gold-light: #e8c56e;
      --gold-dim:   #8a6f2e;
      --cream:      #f0e6cc;
      --cream-dim:  #b8a882;
      --white:      #faf7f0;
      --border:     rgba(201,168,76,0.18);
      --navbar-h:   72px;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body { background: var(--bg-dark); color: var(--cream); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 17px; line-height: 1.7; overflow-x: hidden; }
    body.ar { font-family: 'Tajawal', sans-serif; direction: rtl; }
    ::-webkit-scrollbar { width: 4px; }
    ::-webkit-scrollbar-track { background: var(--bg-dark); }
    ::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

    /* ─── NAVBAR ─── */
    #navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--navbar-h); display: flex; align-items: center; padding: 0 40px; background: rgba(12,11,8,0.96); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--border); }
    .nav-inner { width: 100%; max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
    .nav-logo img { height: 44px; width: auto; }
    .nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
    .nav-links a { color: var(--cream-dim); text-decoration: none; font-family: 'Cormorant Garamond', serif; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; transition: color 0.2s; }
    .nav-links a:hover, .nav-links a.active { color: var(--gold-light); }
    .nav-right { display: flex; align-items: center; gap: 16px; }
    .lang-btn { background: transparent; border: 1px solid var(--border); color: var(--cream-dim); padding: 6px 14px; font-family: 'Cormorant Garamond', serif; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all 0.2s; border-radius: 2px; }
    .lang-btn:hover { border-color: var(--gold); color: var(--gold-light); }
    .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
    .hamburger span { display: block; width: 24px; height: 1.5px; background: var(--cream); transition: all 0.3s; }
    .hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    #mobile-menu { display: none; position: fixed; top: var(--navbar-h); left: 0; right: 0; background: rgba(12,11,8,0.98); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); z-index: 999; padding: 24px 40px 32px; }
    #mobile-menu.open { display: block; }
    #mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 20px; }
    #mobile-menu a { color: var(--cream-dim); text-decoration: none; font-size: 20px; transition: color 0.2s; }
    #mobile-menu a:hover { color: var(--gold-light); }

    /* ─── PAGE HERO ─── */
    .page-hero {
      height: 380px; margin-top: var(--navbar-h);
      background: linear-gradient(to bottom, rgba(12,11,8,0.5), var(--bg-dark)),
                  linear-gradient(135deg, #1a1508 0%, #0c0b08 100%);
      display: flex; align-items: flex-end;
      border-bottom: 1px solid var(--border);
    }
    .page-hero-inner { max-width: 1320px; margin: 0 auto; width: 100%; padding: 0 40px 60px; }
    .section-label { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; display: block; }
    body.ar .section-label { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }
    .page-title { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; color: var(--white); }
    body.ar .page-title { font-family: 'Tajawal', sans-serif; }

    /* ─── FEATURED NEWS ─── */
    .featured-wrap {
      max-width: 1320px; margin: 0 auto;
      padding: 60px 40px 0;
    }
    .featured-card {
      display: grid; grid-template-columns: 1fr 1fr;
      border: 1px solid var(--border);
      overflow: hidden; cursor: pointer;
      transition: border-color 0.3s;
      margin-bottom: 60px;
    }
    .featured-card:hover { border-color: var(--gold-dim); }
    .featured-img {
      width: 100%; height: 480px;
      object-fit: cover; display: block;
      transition: transform 0.6s;
    }
    .featured-card:hover .featured-img { transform: scale(1.03); }
    .featured-body {
      background: var(--bg-card);
      padding: 56px 48px;
      display: flex; flex-direction: column; justify-content: center; gap: 20px;
    }
    .featured-tag {
      font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
      color: var(--gold); display: inline-block;
    }
    body.ar .featured-tag { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }
    .featured-date { font-size: 12px; color: var(--cream-dim); letter-spacing: 1px; }
    .featured-title { font-family: 'Playfair Display', serif; font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 700; color: var(--white); margin: 10px 0 0; line-height: 1.3; }
    body.ar .featured-title { font-family: 'Tajawal', sans-serif; font-weight: 700; }
    .section-divider { width: 40px; height: 1px; background: var(--gold); }
    .featured-desc {
      font-size: 16px; color: var(--cream-dim); line-height: 1.9;
      display: -webkit-box; -webkit-line-clamp: 5;
      -webkit-box-orient: vertical; overflow: hidden;
    }
    body.ar .featured-desc { font-family: 'Tajawal', sans-serif; font-size: 15px; }
    .read-more {
      font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
      color: var(--gold); text-decoration: none;
      display: inline-flex; align-items: center; gap: 8px;
      transition: color 0.2s; width: fit-content;
    }
    .read-more:hover { color: var(--gold-light); }
    body.ar .read-more { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }

    /* ─── NEWS GRID ─── */
    .news-section {
      max-width: 1320px; margin: 0 auto;
      padding: 0 40px 80px;
    }
    .news-card-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--white); margin: 6px 0 4px; line-height: 1.3; }
    body.ar .news-card-title { font-family: 'Tajawal', sans-serif; }
    .news-grid-title {
      font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
      color: var(--gold); margin-bottom: 32px; display: block;
      padding-top: 40px; border-top: 1px solid var(--border);
    }
    body.ar .news-grid-title { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }
    .news-grid {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }
    .news-card {
      border: 1px solid var(--border); overflow: hidden;
      cursor: pointer; transition: border-color 0.3s, transform 0.3s;
    }
    .news-card:hover { border-color: var(--gold-dim); transform: translateY(-4px); }
    .news-img-wrap { overflow: hidden; height: 220px; background: var(--bg-card); }
    .news-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
    .news-card:hover .news-img { transform: scale(1.05); }
    .news-body { padding: 24px; background: var(--bg-card); }
    .news-date { font-size: 11px; letter-spacing: 1.5px; color: var(--gold); text-transform: uppercase; margin-bottom: 10px; display: block; }
    body.ar .news-date { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }
    .news-text {
      font-size: 14px; color: var(--cream-dim); line-height: 1.7;
      display: -webkit-box; -webkit-line-clamp: 3;
      -webkit-box-orient: vertical; overflow: hidden;
    }
    body.ar .news-text { font-family: 'Tajawal', sans-serif; }

    /* ─── MODAL ─── */
    .modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(12,11,8,0.92); z-index: 2000;
      backdrop-filter: blur(8px);
      align-items: center; justify-content: center;
      padding: 40px 20px;
    }
    .modal-overlay.open { display: flex; }
    .modal {
      background: var(--bg-card); border: 1px solid var(--border);
      max-width: 800px; width: 100%; max-height: 90vh;
      overflow-y: auto; position: relative;
    }
    .modal-carousel { position: relative; width: 100%; height: 360px; overflow: hidden; background: #000; direction: ltr; }
    .carousel-track { display: flex; height: 100%; transition: transform 0.4s ease; will-change: transform; }
    .carousel-slide { min-width: 100%; height: 100%; flex-shrink: 0; }
    .carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .carousel-btn {
      position: absolute; top: 50%; transform: translateY(-50%);
      width: 40px; height: 40px; background: rgba(12,11,8,0.75);
      border: 1px solid rgba(201,168,76,0.3); color: #e2c472;
      font-size: 18px; cursor: pointer; z-index: 5;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.2s;
    }
    .carousel-btn:hover { background: rgba(201,168,76,0.2); }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
    .carousel-btn.hidden { display: none; }
    .carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
    .carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.35); border: none; cursor: pointer; padding: 0; transition: background 0.2s; }
    .carousel-dot.active { background: #e2c472; }
    .carousel-counter { position: absolute; top: 10px; right: 10px; background: rgba(12,11,8,0.7); color: #e2c472; font-size: 11px; letter-spacing: 1px; padding: 3px 9px; }
    .modal-body { padding: 40px; }
    .modal-date { font-size: 11px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 12px; display: block; }
    body.ar .modal-date { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }
    .modal-title { font-family: 'Playfair Display', serif; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; color: var(--white); margin: 0 0 12px; line-height: 1.35; }
    body.ar .modal-title { font-family: 'Tajawal', sans-serif; }
    .modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
    .modal-tag { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(201,168,76,0.35); padding: 3px 10px; }
    body.ar .modal-tag { letter-spacing: 0; font-family: 'Tajawal', sans-serif; font-size: 11px; }
    .modal-text { font-size: 16px; color: var(--cream-dim); line-height: 1.9; }
    body.ar .modal-text { font-family: 'Tajawal', sans-serif; font-size: 15px; }
    .modal-divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
    .modal-body-text { font-size: 15px; color: var(--cream); line-height: 1.95; white-space: pre-wrap; }
    body.ar .modal-body-text { font-family: 'Tajawal', sans-serif; }
    .modal-views { font-size: 11px; color: var(--dim); margin-top: 24px; letter-spacing: 1px; }
    .related-section { border-top: 1px solid var(--border); padding: 32px 40px; }
    .related-label { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; display: block; }
    body.ar .related-label { letter-spacing: 0; font-family: 'Tajawal', sans-serif; }
    .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .related-card { cursor: pointer; border: 1px solid var(--border); overflow: hidden; transition: border-color 0.2s; }
    .related-card:hover { border-color: var(--gold-dim); }
    .related-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
    .related-card-body { padding: 12px; background: var(--bg-card); }
    .related-card-title { font-size: 13px; color: var(--white); font-family: 'Playfair Display', serif; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    body.ar .related-card-title { font-family: 'Tajawal', sans-serif; }
    .related-card-date { font-size: 10px; color: var(--dim); margin-top: 6px; letter-spacing: 1px; }
    @media (max-width: 600px) { .related-grid { grid-template-columns: 1fr 1fr; } }
    .modal-close {
      position: absolute; top: 16px; right: 16px;
      width: 40px; height: 40px; background: rgba(12,11,8,0.8);
      border: 1px solid var(--border); color: var(--cream);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; font-size: 16px; transition: all 0.2s; z-index: 10;
    }
    body.ar .modal-close { right: auto; left: 16px; }
    .modal-close:hover { border-color: var(--gold); color: var(--gold-light); }

    /* ─── EMPTY ─── */
    .empty-state { text-align: center; padding: 80px 20px; }
    .empty-state i { font-size: 2.5rem; color: var(--gold-dim); margin-bottom: 16px; display: block; }
    .empty-state p { color: var(--cream-dim); }

    /* ─── SKELETON ─── */
    .skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, #1e1b12 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
    @keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

    /* ─── FOOTER ─── */
    footer { background: var(--bg-section); border-top: 1px solid var(--border); padding: 40px; }
    .footer-bottom { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--cream-dim); }

    /* ─── FADE ─── */
    .fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
    .fade-in.visible { opacity: 1; transform: none; }

    /* ─── RESPONSIVE ─── */
    @media (max-width: 1024px) {
      .news-grid { grid-template-columns: repeat(2, 1fr); }
      .featured-card { grid-template-columns: 1fr; }
      .featured-img { height: 300px; }
      .featured-body { padding: 36px; }
    }
    @media (max-width: 768px) {
      :root { --navbar-h: 60px; }
      #navbar { padding: 0 20px; }
      .nav-links { display: none; }
      .hamburger { display: flex; }
      .page-hero { height: 280px; }
      .page-hero-inner { padding: 0 20px 36px; }
      .featured-wrap { padding: 40px 20px 0; }
      .news-section { padding: 0 20px 60px; }
      .news-grid { grid-template-columns: 1fr; }
      .modal { max-height: 95vh; }
      .modal-img { height: 240px; }
      .modal-body { padding: 24px; }
    }

select.lang-btn {
  width: 120px !important;
  min-width: 120px !important;
  height: 34px;
  padding: 0 12px;
  color: var(--gold);
  border: 1px solid var(--gold) !important;
  background: rgba(10, 12, 12, 0.55);
  cursor: pointer;
  text-align: center;
}

select.lang-btn option {
  color: #111;
  background: #fff;
}

select.lang-btn:focus,
select.lang-btn:hover {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 1px var(--gold) !important;
  outline: none;
}


/* Dynamic news image display settings from dashboard */
.modal-carousel {
  height: var(--news-modal-image-height-desktop, 360px) !important;
  background: var(--news-modal-image-bg, #000) !important;
}

.carousel-slide img {
  object-fit: var(--news-modal-image-fit, cover) !important;
  object-position: var(--news-modal-image-position, center center) !important;
}

@media (max-width: 768px) {
  .modal-carousel {
    height: var(--news-modal-image-height-mobile, 240px) !important;
  }
}


/* Dynamic news image width from dashboard */
.modal-carousel {
  width: var(--news-modal-image-width, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* News card thumbnails should respect uploaded poster images better */
.news-card img,
.news-img,
.news-thumb img {
  background: #000000;
}

/* If inline style provides object-fit/object-position, keep it */
.news-card img[style],
.news-img[style],
.news-thumb img[style] {
  object-fit: inherit;
  object-position: inherit;
}

/* Compact News page hero spacing */
.page-hero {
  height: 240px !important;
}

.page-hero-inner {
  padding-bottom: 38px !important;
}

@media (max-width: 768px) {
  .page-hero {
    height: 160px !important;
    min-height: 160px !important;
  }

  .page-hero-inner {
    padding: 0 24px 24px !important;
  }

  .section-label {
    margin-bottom: 6px !important;
  }
}

/* Small Spanish mobile title refinement */
@media (max-width: 768px) {
  html[lang="es"] .page-title {
    font-size: clamp(1.55rem, 8.6vw, 2.05rem) !important;
    line-height: 1.12 !important;
    max-width: 320px !important;
  }

  html[lang="es"] .section-label {
    letter-spacing: 3px !important;
    margin-bottom: 6px !important;
  }
}
