:root {
  --sand: #d8b77b;
  --sand-soft: #f2e7d1;
  --gold: #f2b705;
  --charcoal: #161513;
  --ink: #27231d;
  --off: #fffaf0;
  --green: #173f35;
  --muted: #756b5c;
  --line: rgba(22, 21, 19, 0.14);
  --shadow: 0 24px 80px rgba(18, 17, 15, 0.18);
  --radius: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--off);
  color: var(--ink);
}
body[dir="ltr"] { font-family: Inter, "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  color: white;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header.scrolled {
  background: rgba(22, 21, 19, 0.92);
  box-shadow: 0 16px 50px rgba(0,0,0,.2);
  padding-block: 12px;
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0; }
.brand-name { font-size: 1.18rem; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid rgba(242,183,5,.55); border-radius: 50%;
  background: radial-gradient(circle, rgba(242,183,5,.35), rgba(242,183,5,.05));
}
.brand-mark span {
  width: 22px; height: 22px; display: block;
  background: conic-gradient(from 0deg, var(--gold), #fff2a9, var(--gold), #a87400, var(--gold));
  clip-path: polygon(50% 0,58% 32%,85% 15%,68% 42%,100% 50%,68% 58%,85% 85%,58% 68%,50% 100%,42% 68%,15% 85%,32% 58%,0 50%,32% 42%,15% 15%,42% 32%);
}
.desktop-nav { display: flex; gap: clamp(14px, 2vw, 28px); align-items: center; }
.desktop-nav a, .site-footer nav a {
  position: relative; font-weight: 650; font-size: .95rem;
}
.desktop-nav a::after, .site-footer nav a::after {
  content: ""; position: absolute; inset: auto 0 -7px; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s ease;
}
.desktop-nav a:hover::after, .desktop-nav a.active::after, .site-footer nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.icon-button {
  width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px;
  background: rgba(255,255,255,.08); color: currentColor; display: grid; place-items: center;
  cursor: pointer; backdrop-filter: blur(8px);
}
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.language-switch {
  display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px; padding: 6px 10px; background: rgba(255,255,255,.08);
}
.language-switch button { border: 0; background: transparent; color: currentColor; cursor: pointer; font-weight: 800; opacity: .55; }
.language-switch button.active { color: var(--gold); opacity: 1; }
.menu-button { display: none; }
.mobile-panel, .search-panel {
  position: fixed; z-index: 60; color: white; background: rgba(22,21,19,.96);
  backdrop-filter: blur(16px); display: none; box-shadow: var(--shadow);
}
.mobile-panel.open { display: grid; gap: 18px; inset: 74px 18px auto; padding: 24px; border-radius: var(--radius); }
.search-panel.open { display: block; inset: 86px clamp(16px, 12vw, 180px) auto; padding: 18px; border-radius: var(--radius); }
.search-panel > div { display: flex; gap: 12px; }
.search-panel input, .places-tools input {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 16px; background: white; color: var(--ink);
}
.search-panel p { margin: 10px 4px 0; color: rgba(255,255,255,.65); }

.hero { min-height: 100svh; position: relative; display: grid; align-items: center; overflow: hidden; }
body[data-route="home"] main > .page-section:not(#home) { display: none; }
body[data-route="explore"] main > .page-section:not(#explore),
body[data-route="history"] main > .page-section:not(#history),
body[data-route="places"] main > .page-section:not(#places),
body[data-route="about"] main > .page-section:not(#about) { display: none; }
body:not([data-route="home"]) #home,
body:not([data-route="home"]) .home-only { display: none; }
body:not([data-route="home"]) main > .page-section { min-height: calc(100svh - 74px); }
.hero-media, .rounded-photo, .panorama {
  background-image: var(--image); background-size: cover; background-position: center;
}
.hero-media { position: absolute; inset: -5%; transform: translateY(calc(var(--scroll, 0) * .08px)) scale(1.04); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.68), rgba(0,0,0,.23), rgba(0,0,0,.7)); }
.hero-content {
  position: relative; z-index: 2; width: min(900px, calc(100% - 36px)); margin-inline: auto;
  color: white; padding-top: 90px;
}
.eyebrow {
  margin: 0 0 12px; color: var(--gold); font-weight: 900; text-transform: uppercase;
  font-size: .78rem; letter-spacing: .12em;
}
.hero h1 { margin: 0; font-size: clamp(3.5rem, 11vw, 8.5rem); line-height: .95; letter-spacing: 0; }
.hero p:not(.eyebrow) { max-width: 680px; font-size: clamp(1.1rem, 2vw, 1.45rem); color: rgba(255,255,255,.86); }
.hero-actions, .filter-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0 22px; font-weight: 850; border: 1px solid transparent; cursor: pointer;
}
.button.primary { background: var(--gold); color: #1f1802; }
.button.ghost { border-color: rgba(255,255,255,.4); color: white; background: rgba(255,255,255,.08); }

.band { padding: clamp(70px, 9vw, 128px) clamp(18px, 4vw, 56px); }
.warm { background: #f7edda; }
.charcoal { background: var(--charcoal); color: var(--off); }
.intro, .about-grid, .history-hero, .map-panel {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 70px); align-items: center;
}
.section-copy, .section-head { max-width: 760px; }
.section-head { margin: 0 auto 34px; text-align: center; }
h2 { margin: 0 0 14px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.06; letter-spacing: 0; }
h3 { margin: 0 0 12px; font-size: clamp(1.35rem, 2.2vw, 2rem); }
p { line-height: 1.8; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat-grid article, .citadel-cards article, .story-list article {
  background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 16px 40px rgba(40,32,20,.08);
}
.stat-grid strong { display: block; font-size: clamp(2rem, 5vw, 4rem); color: var(--green); line-height: 1; }
.stat-grid span { color: var(--muted); font-weight: 700; }

.featured-grid, .destination-grid, .place-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.image-card, .destination-card, .place-card {
  position: relative; overflow: hidden; border-radius: var(--radius); min-height: 330px;
  box-shadow: var(--shadow); transform: translateY(0); transition: transform .25s ease, box-shadow .25s ease;
  background: #222;
}
.image-card:hover, .destination-card:hover, .place-card:hover { transform: translateY(-6px); box-shadow: 0 28px 80px rgba(20,17,11,.25); }
.card-image { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s ease; }
.image-card:hover .card-image, .destination-card:hover .card-image, .place-card:hover .card-image { transform: scale(1.06); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.82)); }
.card-content { position: absolute; inset: auto 0 0; color: white; padding: 22px; }
.chip {
  display: inline-flex; min-height: 30px; align-items: center; border-radius: 999px; padding: 0 11px;
  background: rgba(242,183,5,.95); color: #211900; font-weight: 850; font-size: .76rem;
}
.destination-card, .place-card { min-height: 410px; }
.destination-card .card-content p, .place-card .card-content p { color: rgba(255,255,255,.78); margin: 9px 0; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; color: rgba(255,255,255,.72); font-size: .9rem; }
.rating { color: var(--gold); font-weight: 900; }
.filter-row { justify-content: center; margin-bottom: 26px; }
.filter-row button {
  min-height: 40px; border-radius: 999px; padding: 0 15px; border: 1px solid currentColor;
  background: transparent; color: inherit; cursor: pointer; opacity: .76;
}
.filter-row button.active { background: var(--gold); color: #1d1600; border-color: var(--gold); opacity: 1; }
.map-panel { margin-top: 34px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: clamp(18px, 4vw, 34px); }
.map-visual {
  min-height: 360px; position: relative; overflow: hidden; border-radius: var(--radius);
  background:
    linear-gradient(35deg, transparent 48%, rgba(242,183,5,.22) 49%, rgba(242,183,5,.22) 51%, transparent 52%),
    linear-gradient(145deg, transparent 45%, rgba(255,255,255,.1) 46%, rgba(255,255,255,.1) 48%, transparent 49%),
    radial-gradient(circle at 50% 42%, rgba(242,183,5,.36), transparent 22%),
    #24231f;
}
.map-visual span {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  background: var(--gold); color: #1f1802; padding: 7px 11px; border-radius: 999px; font-weight: 900;
}
.map-panel li { margin: 10px 0; }

.history-hero { margin-bottom: 60px; }
.rounded-photo { min-height: 520px; border-radius: var(--radius); box-shadow: var(--shadow); }
.timeline { max-width: 960px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; inset: 0 50% 0 auto; width: 2px; background: var(--line); }
body[dir="ltr"] .timeline::before { inset: 0 auto 0 50%; }
.timeline-item { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin: 0 0 26px; align-items: center; }
.timeline-item:nth-child(even) .timeline-card { grid-column: 2; }
.timeline-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 14px 44px rgba(30,23,13,.08); }
.timeline-year { color: var(--gold); font-weight: 950; }
.citadel-feature { margin-top: 62px; }
.panorama { min-height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); }
.citadel-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: -58px; padding-inline: clamp(16px, 5vw, 70px); position: relative; }
.citadel-cards strong { display: block; font-size: 1.8rem; color: var(--green); }

.places-tools { max-width: 1080px; margin: 0 auto 28px; display: grid; gap: 16px; }
.place-card button, .destination-card button { margin-top: 12px; border: 0; }
.about { background: linear-gradient(180deg, #fffaf0, #efe1c7); }
.story-list { display: grid; gap: 12px; margin-top: 24px; }
.contact-card {
  background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); display: grid; gap: 14px;
}
.contact-card input, .contact-card textarea {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; background: white;
}
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--charcoal); color: white; font-weight: 900;
}
.site-footer {
  background: var(--charcoal); color: var(--off); padding: 46px clamp(18px, 4vw, 56px);
  display: grid; gap: 18px; place-items: center; text-align: center;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.site-footer p { margin: 0; color: rgba(255,255,255,.72); }
.site-footer .credits { font-size: .78rem; color: rgba(255,255,255,.48); }

dialog {
  width: min(980px, calc(100% - 28px)); border: 0; border-radius: var(--radius); padding: 0;
  box-shadow: var(--shadow); background: var(--off); color: var(--ink);
}
dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(3px); }
.modal-close {
  position: absolute; z-index: 3; inset: 14px 14px auto auto; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: white; font-size: 1.6rem; cursor: pointer;
}
body[dir="rtl"] .modal-close { inset: 14px auto auto 14px; }
.modal-hero { min-height: 360px; background-size: cover; background-position: center; }
.modal-body { padding: clamp(20px, 4vw, 34px); }
.modal-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.modal-facts article { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.modal-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.modal-gallery span { min-height: 120px; border-radius: var(--radius); background-size: cover; background-position: center; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .menu-button { display: grid; }
  .intro, .about-grid, .history-hero, .map-panel { grid-template-columns: 1fr; }
  .featured-grid, .destination-grid, .place-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline::before { display: none; }
  .timeline-item, .timeline-item:nth-child(even) .timeline-card { display: block; }
  .citadel-cards { grid-template-columns: 1fr; margin-top: 14px; padding: 0; }
}

@media (max-width: 640px) {
  .site-header { padding-inline: 14px; }
  .brand-name { font-size: 1rem; }
  .language-switch { padding: 5px 8px; }
  .icon-button { width: 38px; height: 38px; }
  .hero-content { width: calc(100% - 28px); }
  .hero h1 { font-size: clamp(3rem, 18vw, 5rem); }
  .band { padding-inline: 14px; }
  .featured-grid, .destination-grid, .place-grid, .stat-grid, .modal-facts, .modal-gallery { grid-template-columns: 1fr; }
  .image-card, .destination-card, .place-card { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
