/* Plan Morocco Trip — main stylesheet */
:root {
  --terra: #c8631e;
  --terra-dark: #a04a14;
  --sand: #fdf6ea;
  --sand-2: #f5e9d4;
  --ink: #2b1f15;
  --ink-soft: #6b5840;
  --saffron: #e89344;
  --max: 1240px;
  --shadow-1: 0 1px 3px rgba(43,31,21,0.08), 0 1px 2px rgba(43,31,21,0.04);
  --shadow-2: 0 4px 12px rgba(43,31,21,0.08), 0 2px 4px rgba(43,31,21,0.04);
  --shadow-3: 0 12px 28px rgba(43,31,21,0.12);
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
}
body[dir="rtl"] { font-family: 'Amiri', 'Manrope', serif; }
html[lang="zh"] body, body[lang="zh"] { font-family: 'Noto Sans SC', 'Manrope', sans-serif; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-dark); }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3, body[dir="rtl"] h4 { font-family: 'Amiri', serif; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 0 0 1rem; font-weight: 600; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.1rem); margin: 2.5rem 0 1rem; font-weight: 600; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); margin: 1.5rem 0 0.7rem; font-weight: 600; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.5rem; margin: 0 0 1rem; }
body[dir="rtl"] ul, body[dir="rtl"] ol { padding-left: 0; padding-right: 1.5rem; }
li { margin-bottom: 0.4rem; }


/* ============================================================
   NAV — simple, reliable. Two parts:
   1) .nav-bar  — always visible row: logo + toggle (mobile) / logo + links (desktop)
   2) .nav-menu — dropdown panel below the bar, shown when toggled OR always on desktop
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sand);
  border-bottom: 1px solid rgba(43,31,21,0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}

.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 42px; width: auto; }

/* Toggle button (visible on mobile only) */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(43,31,21,0.12);
  background: white;
  border-radius: var(--radius-m);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover { background: var(--sand-2); border-color: var(--terra); }
.nav-toggle:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.nav-toggle svg { width: 22px; height: 22px; pointer-events: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] {
  background: var(--terra);
  border-color: var(--terra);
  color: white;
}

/* Menu panel — mobile: full-width dropdown below the bar */
.nav-menu {
  background: white;
  border-top: 1px solid rgba(43,31,21,0.06);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 1.25rem;
}
.nav-menu[hidden] { display: none; }

.menu-links {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0;
}
.menu-link {
  display: block;
  padding: 0.95rem 0.5rem;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--sand-2);
  transition: color 0.15s, padding-inline-start 0.15s;
}
.menu-link:last-of-type { border-bottom: none; }
.menu-link:hover { color: var(--terra); padding-inline-start: 0.85rem; }
.menu-link.active { color: var(--terra); font-weight: 600; }
.menu-link.active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terra);
  margin-inline-end: 0.6rem;
  vertical-align: middle;
}

.menu-divider {
  height: 1px;
  background: var(--sand-2);
  margin: 0.75rem 0;
}

.menu-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  padding: 0 0.5rem;
}

.menu-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.5rem;
}
.lang-pill {
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--sand-2);
  color: var(--ink-soft);
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.lang-pill:hover { background: #ecdcc0; color: var(--ink); }
.lang-pill.active { background: var(--terra); color: white; }

.menu-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
}
.menu-cta a {
  padding: 0.85rem 1rem;
  text-align: center;
  border-radius: var(--radius-m);
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  text-decoration: none;
  transition: background 0.15s;
}
.menu-cta-primary { background: var(--terra); }
.menu-cta-primary:hover { background: var(--terra-dark); color: white; }
.menu-cta-wa { background: #25d366; }
.menu-cta-wa:hover { background: #1ea951; color: white; }


/* ============================================================
   DESKTOP NAV (900px+) — inline horizontal layout
   ============================================================ */
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-bar {
    /* still the top bar but now also holds the menu inline */
    padding: 0.85rem 1.5rem;
  }
  .nav-menu {
    /* display inline; reset all mobile styling */
    display: flex !important;
    align-items: center;
    gap: 1.25rem;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
    flex: 1;
    justify-content: flex-end;
  }
  .nav-menu[hidden] { display: flex !important; }
  .menu-links {
    flex-direction: row;
    gap: 0.25rem;
    padding: 0;
  }
  .menu-link {
    padding: 0.4rem 0.6rem;
    border-bottom: none;
    font-size: 0.95rem;
    border-radius: var(--radius-s);
  }
  .menu-link:hover {
    background: var(--sand-2);
    color: var(--terra);
    padding-inline-start: 0.6rem;
  }
  .menu-link.active { background: rgba(200,99,30,0.08); }
  .menu-link.active::before { display: none; }
  .menu-divider, .menu-section-label { display: none; }
  .menu-langs {
    margin: 0;
    padding: 0;
    gap: 0.2rem;
    border-left: 1px solid rgba(43,31,21,0.12);
    padding-left: 0.8rem;
  }
  body[dir="rtl"] .menu-langs {
    border-left: none;
    border-right: 1px solid rgba(43,31,21,0.12);
    padding-left: 0;
    padding-right: 0.8rem;
  }
  .lang-pill {
    padding: 0.3rem 0.45rem;
    font-size: 0.72rem;
    background: transparent;
  }
  .lang-pill:hover { background: var(--sand-2); }
  .menu-cta {
    flex-direction: row;
    margin-top: 0;
    padding: 0;
    gap: 0.5rem;
  }
  .menu-cta a {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* Hide WhatsApp CTA in desktop nav on smaller desktops to avoid overflow; show on wider */
@media (min-width: 900px) and (max-width: 1099px) {
  .menu-cta .menu-cta-wa { display: none; }
}


/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-hero {
  background: linear-gradient(180deg, var(--sand-2) 0%, var(--sand) 100%);
  padding: 2rem 1.25rem 2.5rem;
}
.page-hero-content { max-width: var(--max); margin: 0 auto; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--terra); }
.breadcrumb span { margin: 0 0.5rem; opacity: 0.5; }
.page-lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); max-width: 720px; line-height: 1.6; }

.hero-image-wrap { max-width: var(--max); margin: 0 auto 2rem; padding: 0 1.25rem; }
.hero-image-wrap img { width: 100%; border-radius: var(--radius-l); aspect-ratio: 3/2; object-fit: cover; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-m);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 44px;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-primary { background: var(--terra); color: white; }
.btn-primary:hover { background: var(--terra-dark); color: white; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: white; }
.btn-arrow { transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }
body[dir="rtl"] .btn:hover .btn-arrow { transform: translateX(-3px); }

.tour-content, .prose-content, .blog-post { max-width: 820px; margin: 2rem auto; padding: 0 1.25rem; }
.tour-content section, .prose-section, .blog-post-body { margin-bottom: 2.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.contact-direct { background: var(--sand-2); padding: 1rem 1.25rem; border-radius: var(--radius-m); font-size: 0.95rem; }
.map-embed-placeholder { background: var(--sand-2); border-radius: var(--radius-m); padding: 3rem 1rem; text-align: center; color: var(--ink-soft); }

.section { max-width: var(--max); margin: 2rem auto; padding: 0 1.25rem; }
.tours-grid, .blog-grid, .exp-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.tour-card, .blog-card, .exp-card { background: white; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-1); transition: transform 0.2s, box-shadow 0.2s; }
.tour-card:hover, .blog-card:hover, .exp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.tour-card a, .blog-card a { color: inherit; display: block; text-decoration: none; }
.tour-visual, .blog-card-image, .exp-card-image { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.tour-visual img, .blog-card-image img, .exp-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tour-card:hover .tour-visual img, .blog-card:hover .blog-card-image img, .exp-card:hover .exp-card-image img { transform: scale(1.05); }
.tour-body, .blog-card-body, .exp-card-body { padding: 1.25rem; }
.tour-duration, .blog-card-meta { font-size: 0.8rem; font-weight: 600; color: var(--terra); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.tour-title, .blog-card-title, .exp-card-title { font-size: 1.15rem; margin: 0.5rem 0; font-weight: 600; }
.tour-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: 0.9rem; }
.tour-price { font-size: 1.4rem; font-weight: 700; color: var(--terra); font-family: 'Fraunces', serif; }
.tour-price small { display: block; font-size: 0.7rem; font-weight: 400; color: var(--ink-soft); }
.tour-link, .blog-card-link, .exp-card-link { color: var(--terra); font-weight: 600; font-size: 0.9rem; }
.exp-card-icon { position: absolute; top: 1rem; left: 1rem; background: white; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: var(--shadow-2); }
body[dir="rtl"] .exp-card-icon { left: auto; right: 1rem; }
.exp-card-desc, .blog-card-excerpt { color: var(--ink-soft); font-size: 0.93rem; line-height: 1.55; }

.related-tours { background: var(--sand-2); padding: 3rem 1.25rem; margin-top: 4rem; }
.related-tours .tours-grid { max-width: var(--max); margin: 1.5rem auto 0; }

.blog-post-hero { max-width: 820px; margin: 2rem auto 1rem; padding: 0 1.25rem; }
.blog-post-meta { color: var(--ink-soft); font-size: 0.9rem; }
.blog-post-image { max-width: 1100px; margin: 2rem auto; padding: 0 1.25rem; }
.blog-post-image img { width: 100%; border-radius: var(--radius-l); aspect-ratio: 16/9; object-fit: cover; }
.blog-post-body { max-width: 720px; margin: 0 auto; padding: 0 1.25rem; font-size: 1.05rem; line-height: 1.75; }
.blog-post-lede { font-size: 1.2rem; color: var(--ink-soft); font-style: italic; margin-bottom: 2rem; }

.cta-band { background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dark) 100%); color: white; padding: 3rem 1.25rem; text-align: center; margin-top: 4rem; }
.cta-band-inner { max-width: var(--max); margin: 0 auto; }
.cta-band h2 { color: white; margin-top: 0; }
.cta-band p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }
.cta-band .btn-primary { background: white; color: var(--terra); border: none; }
.cta-band .btn-primary:hover { background: var(--sand); color: var(--terra-dark); }

.hero { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 3rem; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.hero-title { font-size: clamp(2rem, 6vw, 3.5rem); margin-bottom: 1rem; line-height: 1.1; }
.hero-lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); margin-bottom: 1.5rem; max-width: 580px; }
.hero-visual img { width: 100%; border-radius: var(--radius-l); aspect-ratio: 4/5; object-fit: cover; }

.footer { background: var(--ink); color: rgba(255,255,255,0.85); padding: 4rem 1.25rem 2rem; margin-top: 4rem; }
.footer-wrap { max-width: var(--max); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .footer-logo img { height: 50px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-about { color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 1.25rem; }
.footer-title { font-family: 'Fraunces', serif; font-size: 1.05rem; color: white; margin: 0 0 1rem; font-weight: 600; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.7rem; }
.footer-list a { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.footer-list a:hover { color: var(--saffron); }
.footer-contact-list li { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: white; transition: background 0.2s; }
.footer-social a:hover { background: var(--terra); color: white; }
.footer-bottom { padding-top: 2rem; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.footer-legal-2 { margin-top: 0.4rem; font-size: 0.8rem; opacity: 0.8; }

.whatsapp-float { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: white; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-3); z-index: 50; transition: transform 0.2s; }
.whatsapp-float:hover { transform: scale(1.1); color: white; }
body[dir="rtl"] .whatsapp-float { right: auto; left: 1.5rem; }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-weight: 500; display: flex; flex-direction: column; gap: 0.4rem; }
.contact-form input, .contact-form select, .contact-form textarea { padding: 0.8rem 1rem; border: 1.5px solid #ddd; border-radius: var(--radius-m); font-size: 16px; font-family: inherit; background: white; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: var(--terra); }
.contact-direct-wrap { background: var(--sand-2); padding: 2rem 1.25rem; border-radius: var(--radius-l); }
.contact-direct-wrap h3 { margin-top: 0; }
.contact-direct-wrap p { margin: 0.7rem 0; }

.prose-section h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); margin-bottom: 1rem; }
.prose-section p { font-size: 1.05rem; line-height: 1.75; color: var(--ink); }

@media (min-width: 700px) {
  .tours-grid, .blog-grid, .exp-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .contact-grid { grid-template-columns: 2fr 1fr; gap: 3rem; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.2fr 1fr; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; }
  .footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
  .footer-legal { display: flex; flex-direction: column; gap: 0.4rem; }
}
@media (min-width: 1100px) {
  .tours-grid, .blog-grid, .exp-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
