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

/* Reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.8;
}

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

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

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

/* =====================================================
   HERO + NAVIGATION
===================================================== */

.hero {
  position: relative;
  width: 100%;
  height: 680px;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: var(--deep);
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.035);
  transition: opacity 1.1s ease, transform 6s ease;
}

.hero-slide:nth-child(1) { background-image: url("img/IMG_9299.JPG"); }
.hero-slide:nth-child(2) { background-image: url("img/IMG_4758.jpeg"); }
.hero-slide:nth-child(3) { background-image: url("img/IMG_5261.JPG"); }
.hero-slide:nth-child(4) { background-image: url("img/IMG_4099.JPG"); }

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}


.navbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 88px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.navbar::before,
.navbar::after {
  display: none;
  content: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  font-size: 34px;
  transform: rotate(45deg);
}

.brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand small { font-size: 12px; }
.brand strong { font-size: 22px; font-weight: 500; }
.brand em { font-size: 9px; font-style: normal; opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 21px;
  margin-inline: auto;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.nav-links a {
  position: relative;
  padding: 31px 0;
  transition: color 0.3s ease;
}

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

.nav-links a:hover { color: var(--gold-2); }
.nav-links a:hover::after { width: 100%; }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
}

.nav-tools button,
.menu-btn {
  border: 0;
  background: none;
  color: var(--gold-2);
  font-size: 24px;
}

.lang {
  padding: 3px 9px;
  border: 1px solid rgba(218, 174, 113, 0.5);
}

.menu-btn {
  display: none;
  cursor: pointer;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 54px;
  min-height: calc(680px - 88px);
  padding-top: 20px;
  padding-bottom: 70px;
}

.slide-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 34px;
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  direction: ltr;
  font-size: 11px;
  user-select: none;
}

.slide-index b {
  color: var(--gold-2);
  font-size: 13px;
}

.slide-index span {
  width: 1px;
  height: 42px;
  margin: 0;
  background: rgba(217, 173, 114, 0.72);
  border: 0;
}

.slide-index small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.hero-copy {
  max-width: 610px;
  padding: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: #f3eee7;
  font-size: 21px;
  font-weight: 400;
}

.hero h1 {
  margin: 0;
  color: var(--gold-2);
  font-size: clamp(58px, 5vw, 82px);
  font-weight: 500;
  line-height: 1.15;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.location {
  margin: 2px 0 8px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 17px;
}

.hero h2 {
  margin: 0;
  color: var(--gold-2);
  font: 500 21px Georgia, "Times New Roman", serif;
  letter-spacing: 0.4px;
}

.hero-copy > small {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.86);
  font: 11px Georgia, "Times New Roman", serif;
  letter-spacing: 0.8px;
}

.lead {
  max-width: 540px;
  margin: 25px 0 0;
  padding-top: 19px;
  color: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 15px;
  line-height: 2.1;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 8px 18px;
  border-radius: 3px;
}

.button.gold,
.gold {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  margin-top: 22px;
  padding: 11px 22px;
  color: #161a1d;
  background: linear-gradient(135deg, #dfba84, #b4854c);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.button.gold:hover,
.gold:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.dark {
  background: #111719;
  color: var(--gold-2);
}

.scroll {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  transform: translateX(-50%);
}

.scroll span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--gold-2);
  border: 1px solid var(--gold);
  border-radius: 50%;
}

@media (max-width: 980px) {
  .nav-links,
  .nav-tools {
    display: none;
  }

  .menu-btn {
    display: block;
    margin-right: auto;
  }

  .hero {
    height: 640px;
    min-height: 640px;
  }

  .hero-content {
    min-height: calc(640px - 78px);
    gap: 32px;
  }

  .hero h1 {
    font-size: 60px;
  }

  .hero-copy {
    max-width: 520px;
  }

  .nav-links.is-open {
    position: absolute;
    top: 74px;
    right: 0;
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: rgba(5, 12, 17, 0.98);
  }
}
.slide-index b,
.slide-index small {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.slide-index b.active,
.slide-index small.active {
  color: var(--gold-2);
  transform: scale(1.12);
}

@media (max-width: 620px) {
  .navbar {
    height: 74px;
  }

  .brand {
    min-width: auto;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 43px;
    height: 43px;
  }

  .hero {
    height: 650px;
    min-height: 650px;
  }

  .hero-slide {
    background-position: 62% center;
  }

  .hero-content {
    align-items: flex-end;
    min-height: calc(650px - 74px);
    padding-top: 90px;
    padding-bottom: 72px;
  }

  .slide-index {
    display: none;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
    padding-top: 0;
  }

  .eyebrow {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero h2 {
    font-size: 16px;
  }

  .lead {
    font-size: 13px;
  }
}

/* Quick Links */
.quick-links {
  border-bottom: 1px solid var(--line);
  background: #f8f5f0;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 20px 0;
}

.quick-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 104px;
  padding: 14px 18px;
  border-inline-end: 1px solid var(--line);
  font-size: 14px;
  text-align: center;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.quick-grid a:last-child {
  border-inline-end: 0;
}

.quick-grid a:hover,
.quick-grid a:focus-visible {
  color: var(--gold);
  background: rgba(184, 138, 76, 0.08);
}

.quick-grid a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.quick-grid i {
  color: var(--gold);
  font-size: 34px;
  font-style: normal;
  line-height: 1;
  transition: transform 0.25s ease;
}

.quick-grid a:hover i,
.quick-grid a:focus-visible i {
  transform: translateY(-3px);
}

@media (max-width: 760px) {
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px 0;
  }

  .quick-grid a {
    border-bottom: 1px solid var(--line);
  }

  .quick-grid a:nth-child(even) {
    border-inline-end: 0;
  }

  .quick-grid a:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
    border-inline-end: 0;
  }
}

@media (max-width: 420px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid a,
  .quick-grid a:nth-child(even),
  .quick-grid a:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-grid a:last-child {
    border-bottom: 0;
  }
}

/* Featured Collection */
.featured {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(360px, 1.55fr) minmax(230px, 0.9fr);
  min-height: 380px;
  margin-top: 42px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 4px;
  background: #101416;
  color: #eee;
}

.featured > div {
  padding: clamp(28px, 3.5vw, 46px);
}

.featured-copy {
  border-left: 1px solid rgba(184, 138, 76, 0.55);
}

.featured-copy small {
  color: var(--gold);
  letter-spacing: 1px;
}

.featured h2 {
  margin: 8px 0;
  color: var(--gold-2);
  font-size: 30px;
}

.featured p {
  color: #c5c4c0;
  font-size: 14px;
}

.featured img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: center;
}

.outline-btn {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  font-size: 12px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.outline-btn:hover,
.outline-btn:focus-visible {
  color: #111719;
  background: var(--gold-2);
}

.slider-arrows {
  margin-top: 20px;
  color: var(--gold);
}

.featured-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-detail h3 {
  color: var(--gold-2);
  font-size: 20px;
}

.featured-detail hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #373b3e;
}

.featured-detail a {
  margin-top: 14px;
  color: var(--gold-2);
}

@media (max-width: 960px) {
  .featured {
    grid-template-columns: 1fr 1.25fr;
  }

  .featured-copy {
    border-left: 0;
    border-bottom: 1px solid rgba(184, 138, 76, 0.55);
  }

  .featured > img {
    grid-row: span 2;
  }
}

@media (max-width: 700px) {
  .featured {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .featured > img {
    grid-row: auto;
    height: auto;
    min-height: 0;
    max-height: 460px;
    aspect-ratio: 4 / 3;
  }

  .featured-copy,
  .featured-detail {
    border: 0;
  }

  .slider-arrows {
    display: none;
  }
}

/* Information Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #faf8f5;
}

.info-grid article {
  min-height: 300px;
  padding: 18px;
  border-left: 1px solid var(--line);
}

.info-grid article:last-child {
  border-left: 0;
}

.info-grid h3 {
  margin: 0 0 10px;
  text-align: center;
  font-weight: 500;
}

.info-card img {
  height: 145px;
  border-radius: 2px;
}

.info-card p {
  margin: 8px 0 0;
  text-align: center;
}

.info-card small,
.info-card strong {
  display: block;
  text-align: center;
}

.info-card strong {
  font-size: 25px;
}

.info-card a,
.news-card > a {
  display: block;
  margin-top: 10px;
  color: #805d32;
  font-size: 12px;
}

.news-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-card li {
  display: grid;
  grid-template-columns: 1fr 76px;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #e0d8cd;
  font-size: 12px;
}

.news-card time {
  color: var(--muted);
  font-size: 10px;
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 14px;
  overflow: hidden;
  background: #101416;
}

.service-card {
  display: block;
  min-width: 0;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.service-card article {
  position: relative;
  min-height: 250px;
  height: 100%;
  padding: 18px;
  overflow: hidden;
  color: #fff;
  border-left: 1px solid rgba(184, 138, 76, 0.4);
  isolation: isolate;
}

.service-card:last-child article {
  border-left: 0;
}

.service-card article::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(
      #0b0f11 0%,
      rgba(8, 12, 14, 0.78) 43%,
      rgba(8, 12, 14, 0.12)
    ),
    var(--bg) center bottom / cover no-repeat;
  transition:
    transform 0.55s ease,
    filter 0.4s ease;
}

.service-card article::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: rgba(7, 16, 24, 0);
  transition: background-color 0.35s ease;
}

.service-card span {
  display: inline-block;
  color: var(--gold-2);
  font-size: 28px;
  transition: transform 0.35s ease;
}

.service-card h3 {
  margin: 14px 0 8px;
  color: var(--gold-2);
  font-size: 15px;
  font-weight: 500;
}

.service-card p {
  margin: 0;
  color: #ddd;
  font-size: 11px;
  line-height: 1.9;
}

.service-card:hover article::before,
.service-card:focus-visible article::before {
  transform: scale(1.08);
  filter: brightness(1.12);
}

.service-card:hover article::after,
.service-card:focus-visible article::after {
  background: rgba(7, 16, 24, 0.15);
}

.service-card:hover span,
.service-card:focus-visible span {
  transform: translateY(-3px);
}

.service-card:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: -2px;
}


/* عناصر داخلی قبل از انیمیشن */
.gallery-header,
.gallery-slide,
.gallery-footer {
  opacity: 0;
  transform: translateY(30px);
}

/* نمایش انیمیشنی عناصر */
.museu
/* =====================================================
   HORIZONTAL PHOTO GALLERY
===================================================== */

.museum-gallery {
  margin-top: 14px;
  padding: 48px 0;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* =====================================================
   GALLERY HEADER
===================================================== */

.gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.gallery-header small {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 2px;
  direction: ltr;
}

.gallery-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.5;
}

.gallery-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* =====================================================
   GALLERY CONTROLS
===================================================== */

.gallery-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  direction: ltr;
}

.gallery-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  font-family: inherit;
  font-size: 20px;
  cursor: pointer;
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease,
    opacity 0.3s ease;
}

.gallery-button:hover:not(:disabled) {
  color: #fff;
  background: var(--gold);
}

.gallery-button:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
}

.gallery-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

/* =====================================================
   GALLERY SLIDER
===================================================== */

.gallery-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-track {
  display: flex;
  gap: 14px;
  direction: ltr;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gallery-slide {
  position: relative;
  flex: 0 0 calc((100% - 42px) / 4);
  height: 300px;
  margin: 0;
  overflow: hidden;
  background: #101416;
  direction: rtl;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.7s ease,
    box-shadow 0.35s ease;
}

.gallery-slide::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(
      0deg,
      rgba(6, 11, 14, 0.82) 0%,
      rgba(6, 11, 14, 0.25) 38%,
      transparent 62%
    );
  pointer-events: none;
}

.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.6s ease,
    filter 0.4s ease;
}

.gallery-slide:hover img {
  transform: scale(1.07);
}

.gallery-slide.is-active {
  box-shadow: inset 0 0 0 1px rgba(184, 138, 76, 0.45);
}

.gallery-slide figcaption {
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  line-height: 1.8;
}

/* =====================================================
   GALLERY FOOTER
===================================================== */

.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.7s ease 0.6s,
    transform 0.7s ease 0.6s;
}

.gallery-counter {
  color: var(--muted);
  direction: ltr;
  font-size: 13px;
}

.gallery-counter strong {
  color: var(--gold);
  font-size: 18px;
  font-weight: 500;
}

.gallery-all-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #805d32;
  font-size: 12px;
  transition:
    color 0.3s ease,
    gap 0.3s ease;
}

.gallery-all-link:hover {
  gap: 17px;
  color: var(--gold);
}

/* =====================================================
   GALLERY REVEAL ANIMATION
===================================================== */

.museum-gallery.is-visible .gallery-header,
.museum-gallery.is-visible .gallery-slide,
.museum-gallery.is-visible .gallery-footer {
  opacity: 1;
  transform: translateY(0);
}

.museum-gallery.is-visible .gallery-slide:nth-child(1) {
  transition-delay: 0.1s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(2) {
  transition-delay: 0.2s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(3) {
  transition-delay: 0.3s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(4) {
  transition-delay: 0.4s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(5) {
  transition-delay: 0.5s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(6) {
  transition-delay: 0.6s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(7) {
  transition-delay: 0.7s;
}

.museum-gallery.is-visible .gallery-slide:nth-child(8) {
  transition-delay: 0.8s;
}

/* =====================================================
   GALLERY RESPONSIVE
===================================================== */

/* سه تصویر در تبلت */
@media (max-width: 1100px) {
  .gallery-slide {
    flex-basis: calc((100% - 28px) / 3);
    height: 280px;
  }
}

/* دو تصویر در تبلت کوچک */
@media (max-width: 780px) {
  .museum-gallery {
    padding: 38px 0;
  }

  .gallery-header {
    align-items: center;
  }

  .gallery-header h2 {
    font-size: 27px;
  }

  .gallery-slide {
    flex-basis: calc((100% - 14px) / 2);
    height: 260px;
  }
}

/* یک تصویر در موبایل */
@media (max-width: 520px) {
  .gallery-header {
    align-items: flex-start;
    gap: 16px;
  }

  .gallery-header h2 {
    font-size: 23px;
  }

  .gallery-header p {
    max-width: 250px;
    font-size: 12px;
  }

  .gallery-controls {
    gap: 6px;
  }

  .gallery-button {
    width: 39px;
    height: 39px;
    font-size: 18px;
  }

  .gallery-track {
    gap: 0;
  }

  .gallery-slide {
    flex-basis: 100%;
    height: 310px;
  }

  .gallery-footer {
    margin-top: 14px;
  }
}

/* موبایل بسیار کوچک */
@media (max-width: 380px) {
  .gallery-header {
    flex-direction: column;
  }

  .gallery-header p {
    max-width: none;
  }

  .gallery-controls {
    align-self: flex-end;
  }

  .gallery-slide {
    height: 270px;
  }

  .gallery-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* کاهش حرکت برای کاربران حساس به انیمیشن */
@media (prefers-reduced-motion: reduce) {
  .gallery-track,
  .gallery-header,
  .gallery-slide,
  .gallery-slide img,
  .gallery-footer,
  .gallery-button,
  .gallery-all-link {
    transition: none;
  }
}
/* =====================================================
   PRELOADER
===================================================== */

body.is-loading {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(184, 138, 76, 0.12), transparent 28%),
    linear-gradient(145deg, #10171c 0%, #070d11 58%, #030608 100%);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1),
    visibility 0.8s linear;
}

.preloader::before,
.preloader::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.preloader::before {
  inset: 24px;
  border: 1px solid rgba(217, 173, 114, 0.18);
}

.preloader::after {
  width: min(68vw, 620px);
  height: min(68vw, 620px);
  border: 1px solid rgba(217, 173, 114, 0.08);
  transform: rotate(45deg);
  animation: loader-frame 8s linear infinite;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(420px, calc(100% - 48px));
  text-align: center;
}

.loader-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 28px;
  border: 1px solid rgba(217, 173, 114, 0.72);
  color: var(--gold-2);
  transform: rotate(45deg);
  animation: loader-emblem-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.loader-emblem::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(217, 173, 114, 0.25);
  content: "";
}

.loader-emblem span {
  font-size: 33px;
  line-height: 1;
  transform: rotate(-45deg);
  animation: loader-star 2.2s ease-in-out infinite;
}

.loader-kicker,
.loader-title,
.loader-location {
  margin: 0;
}

.loader-kicker {
  color: #e4ded5;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  opacity: 0;
  animation: loader-text-in 0.7s 0.25s ease forwards;
}

.loader-title {
  margin-top: 4px;
  color: var(--gold-2);
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  animation: loader-text-in 0.7s 0.38s ease forwards;
}

.loader-location {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.34em;
  direction: ltr;
  opacity: 0;
  animation: loader-text-in 0.7s 0.5s ease forwards;
}

.loader-progress {
  position: relative;
  width: min(280px, 74vw);
  height: 1px;
  margin-top: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.loader-progress-bar {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #866235, #d9ad72, #f0d2a4);
  box-shadow: 0 0 16px rgba(217, 173, 114, 0.58);
  transition: width 0.12s linear;
}

.loader-percent {
  min-width: 42px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  direction: rtl;
}

@keyframes loader-emblem-in {
  from {
    opacity: 0;
    transform: rotate(15deg) scale(0.65);
  }

  to {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

@keyframes loader-star {
  0%,
  100% {
    opacity: 0.55;
    transform: rotate(-45deg) scale(0.88);
  }

  50% {
    opacity: 1;
    transform: rotate(-45deg) scale(1.08);
  }
}

@keyframes loader-text-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loader-frame {
  to {
    transform: rotate(405deg);
  }
}

@media (max-width: 620px) {
  .preloader::before {
    inset: 12px;
  }

  .loader-emblem {
    width: 66px;
    height: 66px;
  }

  .loader-title {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader *,
  .preloader::after {
    animation: none !important;
  }
}

/* =========================================================
   Motion system — entrance, hover and interaction animations
========================================================= */

:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
  --motion-fast: 220ms;
  --motion-normal: 480ms;
  --motion-slow: 900ms;
}

/* Initial page reveal */
.site-header {
  animation: headerReveal 700ms var(--ease-out) both;
}

.hero-art {
  transform: scale(1.07);
  animation: heroImageReveal 1800ms var(--ease-out) 80ms both,
             heroFloat 14s ease-in-out 2s infinite alternate;
  will-change: transform;
}

.hero-overlay {
  animation: fadeIn 1100ms ease both;
}

.eyebrow-en {
  animation: heroTextReveal 850ms var(--ease-out) 180ms both;
}

.hero-content h1 {
  animation: heroTextReveal 850ms var(--ease-out) 300ms both;
}

.tagline-en {
  animation: heroTextReveal 800ms var(--ease-out) 420ms both;
}

.hero-copy {
  animation: heroTextReveal 800ms var(--ease-out) 530ms both;
}

.watch-button {
  animation: heroTextReveal 800ms var(--ease-out) 640ms both;
}

.hero-index,
.scroll-hint {
  animation: fadeUp 700ms var(--ease-out) 760ms both;
}

/* Header interactions */
.brand,
.brand-mark,
.desktop-nav a,
.language,
.menu-btn span {
  transition:
    color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) ease;
}

.brand:hover .brand-mark {
  transform: rotate(16deg) scale(1.06);
  border-color: var(--gold-2);
  background: rgba(221, 180, 119, .06);
}

.brand:hover strong {
  color: var(--gold-2);
}

.language:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.menu-btn:hover span:nth-child(1) { transform: translateX(3px); }
.menu-btn:hover span:nth-child(3) { transform: translateX(-3px); }

/* Play button */
.watch-button {
  transition: color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.watch-button:hover {
  color: #f2cf9a;
  transform: translateX(4px);
}

.play {
  position: relative;
  overflow: visible;
  transition:
    transform var(--motion-normal) var(--ease-out),
    color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-normal) ease;
}

.play::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--gold);
  border-radius: inherit;
  animation: playPulse 2.3s ease-out infinite;
  pointer-events: none;
}

.watch-button:hover .play {
  transform: scale(1.1) rotate(-4deg);
  color: #07141f;
  background: var(--gold-2);
  box-shadow: 0 0 30px rgba(221, 180, 119, .28);
}

/* Featured collection */
.featured-card,
.quick-links,
.services,
.bottom-panels {
  animation: sectionReveal 900ms var(--ease-out) both;
}

.featured-card { animation-delay: 120ms; }
.quick-links { animation-delay: 220ms; }
.services { animation-delay: 300ms; }
.bottom-panels { animation-delay: 380ms; }

.featured-card img {
  transform: scale(1.025);
  transition:
    transform 900ms var(--ease-out),
    filter 600ms ease;
  will-change: transform;
}

.featured-card:hover img {
  transform: scale(1.085);
  filter: brightness(1.08) saturate(1.08);
}

.featured-copy {
  position: relative;
  overflow: hidden;
}

.featured-copy::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -120%;
  width: 55%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(221,180,119,.09), transparent);
  transition: left 900ms var(--ease-out);
  pointer-events: none;
}

.featured-card:hover .featured-copy::after {
  left: 150%;
}

.featured-copy a,
.more,
.exhibition-card a {
  transition: color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.featured-copy a:hover,
.more:hover,
.exhibition-card a:hover {
  color: var(--gold-2);
  transform: translateX(-5px);
}

/* Quick cards */
.quick-card {
  isolation: isolate;
  transition:
    background-color var(--motion-normal) ease,
    box-shadow var(--motion-normal) ease;
}

.quick-card::before {
  transform: scale(1.015);
  transition:
    transform 750ms var(--ease-out),
    filter 500ms ease;
}

.quick-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(221,180,119,.12) 50%, transparent 75%);
  transform: translateX(-100%);
  transition: transform 800ms var(--ease-out), opacity 300ms ease;
  pointer-events: none;
}

.quick-card span,
.quick-card b {
  transition: transform var(--motion-normal) var(--ease-out), color var(--motion-fast) ease;
}

.quick-card:hover {
  box-shadow: inset 0 0 35px rgba(221,180,119,.06);
}

.quick-card:hover::before {
  transform: scale(1.10);
  filter: brightness(1.20) saturate(1.08);
}

.quick-card:hover::after {
  opacity: 1;
  transform: translateX(100%);
}

.quick-card:hover span {
  transform: translateX(-5px);
  color: #fff;
}

.quick-card:hover b {
  transform: translateX(-8px);
  color: var(--gold-2);
}

.quick-card:nth-child(1) { animation: cardReveal 700ms var(--ease-out) 100ms both; }
.quick-card:nth-child(2) { animation: cardReveal 700ms var(--ease-out) 170ms both; }
.quick-card:nth-child(3) { animation: cardReveal 700ms var(--ease-out) 240ms both; }
.quick-card:nth-child(4) { animation: cardReveal 700ms var(--ease-out) 310ms both; }
.quick-card:nth-child(5) { animation: cardReveal 700ms var(--ease-out) 380ms both; }
.quick-card:nth-child(6) { animation: cardReveal 700ms var(--ease-out) 450ms both; }

/* Services */
.services article {
  transition:
    transform var(--motion-normal) var(--ease-out),
    background-color var(--motion-normal) ease;
}

.services article:hover {
  transform: translateY(-7px);
  background: rgba(141,112,77,.045);
}

.services i {
  display: inline-block;
  transition: transform 550ms var(--ease-out), color var(--motion-fast) ease;
}

.services article:hover i {
  transform: translateY(-4px) scale(1.10) rotate(-4deg);
  color: #6e5232;
}

.services article:nth-child(1) { animation: fadeUp 650ms var(--ease-out) 100ms both; }
.services article:nth-child(2) { animation: fadeUp 650ms var(--ease-out) 180ms both; }
.services article:nth-child(3) { animation: fadeUp 650ms var(--ease-out) 260ms both; }
.services article:nth-child(4) { animation: fadeUp 650ms var(--ease-out) 340ms both; }
.services article:nth-child(5) { animation: fadeUp 650ms var(--ease-out) 420ms both; }

/* Bottom panels */
.news-list,
.exhibition-card,
.visit-content {
  animation: fadeUp 750ms var(--ease-out) 300ms both;
}

.news-list a {
  transition: background-color var(--motion-fast) ease, padding var(--motion-fast) ease;
}

.news-list a:hover {
  padding-right: 8px;
  background: rgba(221,180,119,.035);
}

.exhibition-card {
  transition: transform var(--motion-normal) var(--ease-out), box-shadow var(--motion-normal) ease;
}

.exhibition-card img {
  transition: transform 850ms var(--ease-out), filter 500ms ease;
}

.exhibition-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 35px rgba(0,0,0,.22);
}

.exhibition-card:hover img {
  transform: scale(1.075);
  filter: brightness(1.08);
}

.map-bg {
  transform: scale(1.03);
  transition: transform 1.2s var(--ease-out), filter 600ms ease;
}

.visit-panel:hover .map-bg {
  transform: scale(1.085);
  filter: brightness(1.08);
}

.visit-content button {
  transition:
    transform var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-normal) ease;
}

.visit-content button:hover {
  transform: translateY(-3px);
  background: #ad8450;
  box-shadow: 0 9px 24px rgba(0,0,0,.22);
}

/* Mobile menu */
.mobile-menu.open {
  animation: mobileMenuReveal 360ms var(--ease-out) both;
}

.mobile-menu a {
  opacity: 0;
  transform: translateX(18px);
}

.mobile-menu.open a {
  animation: mobileLinkReveal 420ms var(--ease-out) both;
}

.mobile-menu.open a:nth-child(1) { animation-delay: 40ms; }
.mobile-menu.open a:nth-child(2) { animation-delay: 80ms; }
.mobile-menu.open a:nth-child(3) { animation-delay: 120ms; }
.mobile-menu.open a:nth-child(4) { animation-delay: 160ms; }
.mobile-menu.open a:nth-child(5) { animation-delay: 200ms; }
.mobile-menu.open a:nth-child(6) { animation-delay: 240ms; }

/* Modal */
.modal.open {
  animation: modalBackdropIn 260ms ease both;
}

.modal.open .modal-card {
  animation: modalCardIn 480ms var(--ease-out) both;
}

.modal-close {
  transition: transform var(--motion-fast) var(--ease-out), color var(--motion-fast) ease;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.08);
  color: var(--gold-2);
}

.video-placeholder span {
  display: inline-block;
  animation: videoPulse 2s ease-in-out infinite;
}

/* Keyframes */
@keyframes headerReveal {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroImageReveal {
  from { opacity: 0; transform: scale(1.18); filter: blur(8px) saturate(.65); }
  to { opacity: 1; transform: scale(1.07); filter: blur(0) saturate(.86) contrast(1.08); }
}

@keyframes heroFloat {
  from { transform: scale(1.07) translate3d(0, 0, 0); }
  to { transform: scale(1.11) translate3d(-1.2%, -.5%, 0); }
}

@keyframes heroTextReveal {
  from { opacity: 0; transform: translate3d(-48px, 18px, 0); filter: blur(5px); }
  to { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

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

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes playPulse {
  0% { opacity: .8; transform: scale(1); }
  75%, 100% { opacity: 0; transform: scale(1.55); }
}

@keyframes videoPulse {
  0%, 100% { transform: scale(1); opacity: .82; }
  50% { transform: scale(1.10); opacity: 1; }
}

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

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

@keyframes modalBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalCardIn {
  from { opacity: 0; transform: translateY(25px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* =====================================================
   FINAL FOOTER — merged and synchronized
===================================================== */

footer#contact {
  margin-top: 14px;
  padding: 0;
  color: #d4d4d4;
  background:
    linear-gradient(
      120deg,
      #11181d 0%,
      #0b1115 52%,
      #071018 100%
    );
  border-top: 3px solid var(--gold);
}

footer#contact .footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.65fr) repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 46px;
}

footer#contact .footer-grid > div {
  min-width: 0;
  min-height: 150px;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

footer#contact .footer-grid > div:first-child {
  padding-right: 0;
}

footer#contact .footer-grid > div:last-child {
  padding-left: 0;
  border-left: 0;
}

footer#contact .footer-brand {
  display: flex;
  align-items: flex-start;
}

footer#contact .footer-brand .brand {
  display: block;
  width: 100%;
  min-width: 0;
}

footer#contact .footer-logo {
  width: 280px;
  max-width: 100%;
  height: auto;
  max-height: 130px;
  object-fit: contain;
  object-position: right top;
}

footer#contact h4 {
  position: relative;
  margin: 0 0 10px;
  padding-bottom: 8px;
  color: var(--gold-2);
  font-size: 15px;
  font-weight: 500;
}

footer#contact h4::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 1px;
  content: "";
  background: var(--gold);
}

footer#contact .footer-grid > div:not(.footer-brand) > a {
  display: block;
  width: fit-content;
  margin: 0 0 3px;
  color: #d8d8d8;
  font-size: 12px;
  line-height: 1.85;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

footer#contact .footer-grid > div:not(.footer-brand) > a:hover {
  color: var(--gold-2);
  transform: translateX(-4px);
}

footer#contact p {
  margin: 0 0 3px;
  color: #c8c8c8;
  font-size: 12px;
  line-height: 1.85;
}

footer#contact p a {
  display: inline-block;
  color: #d8d8d8;
  direction: ltr;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

footer#contact p a:hover {
  color: var(--gold-2);
  transform: translateX(-3px);
}

footer#contact .social {
  margin-top: 9px;
  color: var(--gold-2);
  font-size: 21px;
  letter-spacing: 6px;
  direction: ltr;
  user-select: none;
}

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

footer#contact .copyright span:last-child {
  direction: rtl;
}

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

  footer#contact .footer-brand {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  footer#contact .footer-grid > div {
    min-height: 130px;
  }

  footer#contact .footer-logo {
    width: 250px;
    max-height: 115px;
  }
}

@media (max-width: 720px) {
  footer#contact .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 38px;
    padding-bottom: 30px;
  }

  footer#contact .footer-brand {
    grid-column: 1 / -1;
  }

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

  footer#contact .footer-logo {
    width: 230px;
    max-height: 105px;
  }

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

@media (max-width: 480px) {
  footer#contact .footer-grid {
    grid-template-columns: 1fr;
    padding-top: 26px;
    padding-bottom: 22px;
    text-align: center;
  }

  footer#contact .footer-grid > div {
    padding: 16px 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  footer#contact .footer-brand {
    grid-column: auto;
    justify-content: center;
  }

  footer#contact .footer-logo {
    width: 205px;
    max-height: 96px;
    margin-inline: auto;
    object-position: center;
  }

  footer#contact h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  footer#contact .footer-grid > div:not(.footer-brand) > a {
    width: max-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  footer#contact .footer-grid > div:not(.footer-brand) > a:hover,
  footer#contact p a:hover {
    transform: none;
  }
}

/* Page-specific bilingual and layout rules */
:root {
      --font-en: "Inter", "Segoe UI", Arial, sans-serif;
      --font-fa: "Vazirmatn", Tahoma, Arial, sans-serif;
      --language-gold: #b9904b;
    }

    html[lang="en"] body { font-family: var(--font-en); }
    html[lang="fa"] body { font-family: var(--font-fa); }

    html[lang="en"] button, html[lang="en"] input, html[lang="en"] textarea,
    html[lang="en"] select { font-family: var(--font-en); }
    html[lang="fa"] button, html[lang="fa"] input, html[lang="fa"] textarea,
    html[lang="fa"] select { font-family: var(--font-fa); }

    html[dir="ltr"] body { direction: ltr; text-align: left; }
    html[dir="rtl"] body { direction: rtl; text-align: right; }

    html[dir="ltr"] .navbar, html[dir="ltr"] .hero-content,
    html[dir="ltr"] .featured, html[dir="ltr"] .info-grid,
    html[dir="ltr"] .gallery-header, html[dir="ltr"] .gallery-footer,
    html[dir="ltr"] .footer-grid, html[dir="ltr"] .copyright { direction: ltr; }

    html[dir="rtl"] .navbar, html[dir="rtl"] .hero-content,
    html[dir="rtl"] .featured, html[dir="rtl"] .info-grid,
    html[dir="rtl"] .gallery-header, html[dir="rtl"] .gallery-footer,
    html[dir="rtl"] .footer-grid, html[dir="rtl"] .copyright { direction: rtl; }

    html[dir="ltr"] .hero-copy, html[dir="ltr"] .featured-copy,
    html[dir="ltr"] .featured-detail, html[dir="ltr"] .info-card,
    html[dir="ltr"] .news-card, html[dir="ltr"] .service-card,
    html[dir="ltr"] .gallery-header, html[dir="ltr"] footer { text-align: left; }

    html[dir="rtl"] .hero-copy, html[dir="rtl"] .featured-copy,
    html[dir="rtl"] .featured-detail, html[dir="rtl"] .info-card,
    html[dir="rtl"] .news-card, html[dir="rtl"] .service-card,
    html[dir="rtl"] .gallery-header, html[dir="rtl"] footer { text-align: right; }

    html[dir="rtl"] .brand > span:last-child,
    html[dir="rtl"] .nav-links, html[dir="rtl"] .nav-tools { direction: rtl; }
    html[dir="ltr"] .brand > span:last-child,
    html[dir="ltr"] .nav-links, html[dir="ltr"] .nav-tools { direction: ltr; }

    html[dir="rtl"] .hero-copy .button span,
    html[dir="rtl"] .outline-btn, html[dir="rtl"] .gallery-all-link { direction: rtl; }
    html[dir="ltr"] .hero-copy .button span,
    html[dir="ltr"] .outline-btn, html[dir="ltr"] .gallery-all-link { direction: ltr; }

    .language-switcher {
      position: relative;
      z-index: 30;
      direction: ltr;
    }

    .language-trigger {
      appearance: none;
      min-width: 118px;
      min-height: 44px;
      padding: 7px 10px;
      border: 1px solid rgba(185, 144, 75, .72);
      border-radius: 4px;
      background: rgba(5, 8, 12, .78);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      cursor: pointer;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .24), inset 0 0 0 1px rgba(255,255,255,.03);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      transition: border-color .25s ease, background-color .25s ease, transform .25s ease, box-shadow .25s ease;
    }

    .language-trigger:hover,
    .language-switcher.is-open .language-trigger {
      border-color: #d3ad68;
      background: rgba(13, 16, 21, .94);
      box-shadow: 0 12px 34px rgba(0,0,0,.32), inset 0 0 0 1px rgba(211,173,104,.08);
    }

    .language-trigger:active { transform: translateY(1px); }
    .language-trigger:focus-visible,
    .language-option:focus-visible {
      outline: 2px solid #e0bf82;
      outline-offset: 3px;
    }

    .language-globe {
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      color: #d3ad68;
      font-size: 17px;
      line-height: 1;
    }

    .language-trigger-label {
      min-width: 49px;
      font-family: var(--font-en);
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .13em;
      text-transform: uppercase;
      text-align: center;
    }

    html[lang="fa"] .language-trigger-label {
      font-family: var(--font-fa);
      font-size: .82rem;
      letter-spacing: 0;
      text-transform: none;
    }

    .language-chevron {
      width: 7px;
      height: 7px;
      border-right: 1px solid currentColor;
      border-bottom: 1px solid currentColor;
      transform: rotate(45deg) translateY(-2px);
      color: rgba(255,255,255,.68);
      transition: transform .25s ease;
    }

    .language-switcher.is-open .language-chevron {
      transform: rotate(225deg) translate(-1px, -1px);
    }

    .language-menu {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      min-width: 178px;
      padding: 6px;
      border: 1px solid rgba(185, 144, 75, .58);
      border-radius: 4px;
      background: rgba(6, 9, 13, .97);
      box-shadow: 0 22px 55px rgba(0,0,0,.46);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px) scale(.98);
      transform-origin: top right;
      transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
    }

    html[dir="rtl"] .language-menu {
      right: auto;
      left: 0;
      transform-origin: top left;
    }

    .language-switcher.is-open .language-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
    }

    .language-option {
      appearance: none;
      width: 100%;
      min-height: 48px;
      padding: 8px 11px;
      border: 0;
      border-bottom: 1px solid rgba(255,255,255,.08);
      background: transparent;
      color: rgba(255,255,255,.78);
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      text-align: left;
      transition: color .2s ease, background-color .2s ease;
    }

    .language-option:last-child { border-bottom: 0; }
    .language-option:hover { color: #fff; background: rgba(185,144,75,.10); }
    .language-option.is-active { color: #d9b873; background: rgba(185,144,75,.14); }
    .language-option[data-lang="en"] { font-family: var(--font-en); }
    .language-option[data-lang="fa"] { font-family: var(--font-fa); direction: rtl; text-align: right; }

    .language-option-name {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .language-option-name strong { font-size: .86rem; font-weight: 650; }
    .language-option-name small { color: rgba(255,255,255,.42); font-size: .66rem; font-weight: 400; }
    .language-option.is-active .language-option-name small { color: rgba(217,184,115,.72); }

    .language-check {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: transparent;
      box-shadow: 0 0 0 1px rgba(255,255,255,.28);
    }

    .language-option.is-active .language-check {
      background: #d3ad68;
      box-shadow: 0 0 0 3px rgba(211,173,104,.14);
    }

    @media (max-width: 980px) {
      .nav-tools { gap: .5rem; }
      .language-trigger { min-width: 46px; width: 46px; padding-inline: 8px; }
      .language-trigger-label { display: none; }
      .language-menu { min-width: 168px; }
    }
  

    /* =====================================================
       Final bilingual layout normalization
       Keep component geometry stable and localize only the
       reading direction and visual order that must change.
    ===================================================== */
    html, body { overflow-x: hidden; }

    html[lang="en"] body,
    html[lang="en"] body *:not(.language-option[data-lang="fa"]):not(.language-option[data-lang="fa"] *) {
      font-family: var(--font-en);
    }

    html[lang="fa"] body,
    html[lang="fa"] body *:not(.language-option[data-lang="en"]):not(.language-option[data-lang="en"] *) {
      font-family: var(--font-fa);
    }

    /* Always use logical alignment instead of inherited center/right rules. */
    .hero-copy,
    .featured-copy,
    .featured-detail,
    .info-card,
    .news-card,
    .service-card article,
    .gallery-header > div:first-child,
    .footer-grid > div,
    .copyright { text-align: start !important; }

    /* Mixed Latin content must remain readable inside Persian layout. */
    .loader-location,
    .hero-copy .location,
    .hero-copy > small,
    .hero-copy h2,
    .copyright span:first-child,
    a[href^="mailto:"],
    a[href^="tel:"] {
      unicode-bidi: isolate;
    }

    html[lang="fa"] .loader-location,
    html[lang="fa"] .hero-copy .location,
    html[lang="fa"] .hero-copy > small,
    html[lang="fa"] .hero-copy h2,
    html[lang="fa"] .copyright span:first-child,
    html[lang="fa"] a[href^="mailto:"],
    html[lang="fa"] a[href^="tel:"] {
      direction: ltr;
      text-align: right;
    }

    /* Header: preserve predictable left/center/right regions. */
    .navbar {
      display: flex;
      align-items: center;
    }
    html[dir="ltr"] .navbar { flex-direction: row; }
    html[dir="rtl"] .navbar { flex-direction: row-reverse; }

    .brand {
      display: inline-flex;
      align-items: center;
      direction: inherit;
      text-align: start !important;
    }
    html[dir="rtl"] .brand { flex-direction: row-reverse; }
    html[dir="ltr"] .brand { flex-direction: row; }

    .nav-links {
      direction: inherit;
      text-align: center !important;
    }
    .nav-links a { white-space: nowrap; }

    .nav-tools {
      display: flex;
      align-items: center;
      direction: ltr !important;
    }
    html[dir="rtl"] .nav-tools { flex-direction: row-reverse; }
    html[dir="ltr"] .nav-tools { flex-direction: row; }

    /* Hero: text follows language; slide index stays numerically stable. */
    .hero-content { align-items: center; }
    html[dir="ltr"] .hero-content { direction: ltr; }
    html[dir="rtl"] .hero-content { direction: rtl; }
    .slide-index { direction: ltr !important; }
    html[dir="rtl"] .slide-index { text-align: right; }

    .hero-copy .button,
    .outline-btn,
    .gallery-all-link,
    .info-card > a,
    .news-card > a {
      display: inline-flex;
      align-items: center;
      gap: .55rem;
      direction: inherit;
    }

    /* Quick links and service cards mirror as complete groups. */
    html[dir="ltr"] .quick-grid,
    html[dir="ltr"] .services { direction: ltr; }
    html[dir="rtl"] .quick-grid,
    html[dir="rtl"] .services { direction: rtl; }

    .quick-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quick-grid a,
    .service-card article { text-align: center !important; }

    /* Featured section: mirror columns, but never reverse text internally. */
    .featured { direction: ltr !important; }
    html[dir="ltr"] .featured-copy { order: 1; }
    html[dir="ltr"] .featured > img { order: 2; }
    html[dir="ltr"] .featured-detail { order: 3; }
    html[dir="rtl"] .featured-copy { order: 3; direction: rtl; }
    html[dir="rtl"] .featured > img { order: 2; }
    html[dir="rtl"] .featured-detail { order: 1; direction: rtl; }

    /* Information cards mirror at grid level. */
    html[dir="ltr"] .info-grid { direction: ltr; }
    html[dir="rtl"] .info-grid { direction: rtl; }

    .news-card li {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 1rem;
      text-align: start;
    }
    html[dir="rtl"] .news-card li { direction: rtl; }
    html[dir="ltr"] .news-card li { direction: ltr; }
    .news-card time { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

    /* Gallery mechanics remain LTR so translateX and swipe calculations work. */
    .gallery-viewport,
    .gallery-track { direction: ltr !important; }
    .gallery-track { flex-direction: row !important; }
    .gallery-slide { direction: ltr; }

    html[dir="ltr"] .gallery-header,
    html[dir="ltr"] .gallery-footer { direction: ltr; }
    html[dir="rtl"] .gallery-header,
    html[dir="rtl"] .gallery-footer { direction: rtl; }

    .gallery-controls {
      display: flex;
      direction: ltr !important;
    }
    html[dir="rtl"] .gallery-controls { flex-direction: row-reverse; }
    html[dir="ltr"] .gallery-controls { flex-direction: row; }
    .gallery-counter { direction: ltr !important; unicode-bidi: isolate; }

    /* Footer columns mirror, while contact data keeps its natural direction. */
    html[dir="ltr"] .footer-grid { direction: ltr; }
    html[dir="rtl"] .footer-grid { direction: rtl; }
    .footer-grid a,
    .footer-grid p { text-align: start !important; }

    html[dir="ltr"] .copyright { flex-direction: row; direction: ltr; }
    html[dir="rtl"] .copyright { flex-direction: row-reverse; direction: rtl; }

    /* Language popover is always internally stable. */
    .language-switcher,
    .language-trigger,
    .language-menu { direction: ltr !important; }
    .language-option[data-lang="fa"] {
      direction: rtl !important;
      text-align: right !important;
      grid-template-columns: 1fr auto;
    }
    .language-option[data-lang="en"] {
      direction: ltr !important;
      text-align: left !important;
      grid-template-columns: 1fr auto;
    }

    @media (max-width: 980px) {
      .navbar,
      html[dir="rtl"] .navbar,
      html[dir="ltr"] .navbar { flex-direction: row; }

      html[dir="rtl"] .brand { flex-direction: row-reverse; margin-inline-end: auto; }
      html[dir="ltr"] .brand { flex-direction: row; margin-inline-end: auto; }

      .menu-btn { order: 3; }
      .nav-tools { order: 2; }
      .brand { order: 1; }

      .nav-links {
        direction: inherit;
        text-align: start !important;
      }
      html[dir="rtl"] .nav-links { inset-inline: 0; }

      .featured,
      html[dir="rtl"] .featured,
      html[dir="ltr"] .featured { direction: inherit !important; }
      .featured-copy,
      .featured > img,
      .featured-detail { order: initial !important; }
    }

    @media (max-width: 700px) {
      .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .gallery-header,
      .gallery-footer,
      .copyright {
        align-items: flex-start;
      }
      html[dir="rtl"] .gallery-controls { align-self: flex-end; }
      html[dir="ltr"] .gallery-controls { align-self: flex-start; }
      .news-card li { grid-template-columns: 1fr; gap: .35rem; }
      html[dir="rtl"] .news-card time { justify-self: start; }
      html[dir="ltr"] .news-card time { justify-self: start; }
    }
