:root {
  --ink: #17282c;
  --muted: #617174;
  --line: #e6e0d8;
  --paper: #fffaf4;
  --white: #ffffff;
  --sand: #f4eadf;
  --terracotta: #c94f2c;
  --terracotta-dark: #9f3822;
  --saffron: #d99a22;
  --teal: #16494f;
  --teal-soft: #dcefed;
  --green: #1f7a62;
  --shadow: 0 18px 45px rgba(23, 40, 44, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  overflow-x: hidden;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  direction: ltr;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-name {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.brand-tagline {
  display: block;
  color: var(--terracotta);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 1.5rem;
}

@media (min-width: 1041px) {
  .nav-toggle {
    display: none;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-menu a {
  padding: 0.45rem 0;
  white-space: nowrap;
}

.nav-menu .button {
  padding-inline: 0.8rem;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--terracotta);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  direction: ltr;
}

.language-switcher label {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.language-switcher select {
  min-height: 40px;
  max-width: 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 800;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .hero-inner,
html[dir="rtl"] .page-hero .container,
html[dir="rtl"] .section-head,
html[dir="rtl"] .split,
html[dir="rtl"] .card-body,
html[dir="rtl"] .contact-form,
html[dir="rtl"] .footer {
  text-align: right;
}

html[dir="rtl"] .brand,
html[dir="rtl"] .nav-menu,
html[dir="rtl"] .language-switcher {
  direction: ltr;
}

html[dir="rtl"] .hero::after {
  background: linear-gradient(270deg, rgba(9, 21, 24, 0.86), rgba(9, 21, 24, 0.48) 44%, rgba(9, 21, 24, 0.12));
}

html[dir="rtl"] .feature,
html[dir="rtl"] .trust-point {
  direction: rtl;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.78rem 1.05rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover,
button.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--terracotta);
  color: var(--white);
}

.button-primary:hover {
  background: var(--terracotta-dark);
}

.button-dark {
  background: var(--teal);
  color: var(--white);
}

.button-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.42);
  color: var(--white);
}

.button-light {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 610px;
  isolation: isolate;
  background: var(--ink);
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../images/hero-morocco.jpg") center/cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 21, 24, 0.86), rgba(9, 21, 24, 0.48) 44%, rgba(9, 21, 24, 0.12));
}

.hero-inner {
  padding: 5rem 0 2.8rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--saffron);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.06;
}

h1 {
  max-width: 660px;
  font-size: clamp(2.75rem, 7vw, 5.8rem);
}

.hero-copy {
  max-width: 480px;
  margin: 1.1rem 0 1.55rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.trust-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 620px;
  margin-top: 1.5rem;
}

.trust-point {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.trust-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(217, 154, 34, 0.65);
  border-radius: 50%;
  color: var(--saffron);
  font-weight: 900;
}

.planner {
  margin-top: 2.4rem;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 1fr) auto;
  gap: 0;
  overflow: hidden;
}

.planner-intro {
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg, #fffaf4, #ffffff);
  border-right: 1px solid var(--line);
}

.planner-intro strong {
  display: block;
  font-size: 1.1rem;
}

.planner-intro span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
  padding: 1rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.field label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 750;
  outline: 0;
  text-overflow: ellipsis;
}

.planner .button {
  align-self: stretch;
  margin: 0.9rem;
  min-width: 150px;
}

.section {
  padding: 4.7rem 0;
}

.section-muted {
  background: var(--paper);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.section-head p {
  max-width: 640px;
  margin: 0.45rem 0 0;
  color: var(--muted);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
  font-size: 1.35rem;
}

.review-strip {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

.review-panel {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #fffaf5, #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rating {
  display: grid;
  gap: 0.15rem;
  border-left: 1px solid var(--line);
  padding-left: 1.1rem;
}

.stars {
  color: #e2a10f;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.small {
  color: var(--muted);
  font-size: 0.88rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.cards.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(23, 40, 44, 0.06);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sand);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.card:hover .card-media img {
  transform: scale(1.035);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  background: var(--teal);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 850;
}

.card-media .pill {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
}

.card-body {
  padding: 1rem;
}

.card-body p {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.meta span {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2.2rem;
  align-items: center;
}

.image-stack {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 0.9rem;
}

.image-stack img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
}

.image-stack img:last-child {
  height: 280px;
  margin-top: 3rem;
}

.feature-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.3rem;
}

.feature {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.feature b {
  display: block;
}

.feature span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 900;
}

.page-hero {
  background: linear-gradient(135deg, rgba(22, 73, 79, 0.95), rgba(23, 40, 44, 0.88)), url("../images/kasbah.jpg") center/cover;
  color: var(--white);
  padding: 5rem 0;
}

.page-hero p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.87);
  font-size: 1.12rem;
}

.filters {
  position: sticky;
  top: 86px;
  z-index: 12;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-top: -2rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}

.filters input,
.filters select,
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0.75rem;
  color: var(--ink);
  font: inherit;
}

.tours-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.tour-card[hidden] {
  display: none;
}

.tour-card .card-body {
  display: grid;
  gap: 0.8rem;
}

.tour-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.price {
  color: var(--terracotta);
  font-weight: 900;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.destination-card {
  min-height: 270px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
}

.destination-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.destination-card div {
  position: relative;
  padding: 1rem;
}

.destination-card p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.contact-form {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-form .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.notice {
  padding: 1rem;
  border-left: 4px solid var(--green);
  background: #edf8f3;
  color: #174336;
  border-radius: var(--radius);
}

.footer {
  background: var(--ink);
  color: var(--white);
  padding: 3rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 2rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.82);
}

.footer a:hover {
  color: var(--white);
}

.footer ul {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0.75rem 0 0;
  list-style: none;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    position: fixed;
    left: 16px;
    right: auto;
    top: 16px;
    z-index: 110;
  }

  .language-switcher {
    display: block;
    position: fixed;
    right: 16px;
    top: 18px;
    z-index: 110;
    margin-left: 0;
    width: 112px;
  }

  .language-switcher label {
    display: none;
  }

  .language-switcher select {
    display: block;
    width: 112px;
    max-width: 112px;
    min-height: 40px;
    border-color: var(--terracotta);
    padding: 0.35rem 0.45rem;
    font-size: 0.85rem;
  }

  /* Keep the brand clear of the fixed language select on the right. */
  .nav .brand {
    min-width: 0;
    margin-right: 136px;
    overflow: hidden;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    padding: 0.85rem;
  }

  .nav-menu .button {
    white-space: normal;
  }

  .planner,
  .filters,
  .review-panel {
    grid-template-columns: 1fr 1fr;
  }

  .planner-intro,
  .field {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cards,
  .cards.five,
  .tours-grid,
  .destination-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: calc(100% - 24px);
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-tagline {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(9, 21, 24, 0.86), rgba(9, 21, 24, 0.54));
  }

  .hero-inner {
    padding: 3rem 0 1.6rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.95rem, 8vw, 2.25rem);
  }

  .nav-toggle {
    display: inline-grid !important;
    margin-left: auto;
  }

  .language-switcher select {
    width: 96px;
    width: 96px;
    max-width: 96px;
  }

  .hero-copy {
    max-width: 92vw;
    font-size: 1rem;
  }

  .page-hero p {
    max-width: 92vw;
  }

  .hero-actions,
  .tour-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trust-points,
  .planner,
  .review-panel,
  .filters,
  .cards,
  .cards.five,
  .tours-grid,
  .destination-grid,
  .footer-grid,
  .contact-form .two {
    grid-template-columns: 1fr;
  }

  .planner {
    margin-top: 1.5rem;
  }

  .section {
    padding: 3.3rem 0;
  }

  .section-head {
    display: block;
  }

  .filters {
    position: static;
  }

  .image-stack {
    grid-template-columns: 1fr;
  }

  .image-stack img,
  .image-stack img:last-child {
    height: 260px;
    margin: 0;
  }
}
