/* =====================================================================
   Eltayar Voyages — stylesheet
   1. Tokens      2. Reset/base    3. Layout helpers
   4. Header      5. Hero          6. About     7. Services
   8. Contact/Map 9. Footer       10. Responsive
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #0b1f2a;
  --ink-deep: #071720;
  --cloud: #f5efe6;
  --sand: #e3a857;
  --sage: #7fa895;
  --ember: #e8814a;
  --hairline: rgba(127, 168, 149, 0.25);

  --font: "Montserrat", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Montserrat", sans-serif;

  --header-h: 78px;
  --edge: clamp(18px, 5vw, 64px);
  --radius: 18px;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cloud);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir="rtl"] body { font-family: var(--font-ar); }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* ---------- 3. Layout helpers ---------- */
.shell {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.section { padding-block: clamp(56px, 8vw, 112px); }

.display { font-weight: 700; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-light { background: var(--cloud); color: var(--ink); }
.btn-light:hover { background: var(--ember); color: var(--cloud); }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--hairline);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 31, 42, 0.88);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: 0.12em; }
.brand-text small { font-size: 10.5px; color: var(--sage); letter-spacing: 0.06em; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; align-items: center; gap: 28px; }
.nav-list a {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  padding-bottom: 3px;
}
.nav-list a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--sand);
  transition: width .25s ease;
}
.nav-list a:hover { color: var(--sand); }
.nav-list a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(127, 168, 149, 0.4);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
  transition: border-color .2s ease;
}
.lang-toggle:hover { border-color: var(--cloud); }
.lang-toggle .sep { opacity: .5; }
.lang-toggle [data-lang-chip].is-active { color: var(--sand); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
}
.menu-toggle span {
  display: block;
  height: 1.5px;
  width: 22px;
  background: var(--cloud);
  transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  background-image: linear-gradient(
  rgba(11, 31, 42, 0.88) 0%,
  #000 90%,
  transparent 100%
), url("bg.jpg");
background-repeat: no-repeat;
background-size: cover;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: clamp(24px, 5vw, 64px);
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: 0;
  position: relative;
  z-index: 2;
}

.hero-copy { flex: 1 1 260px; min-width: 0; padding-bottom: clamp(40px, 7vw, 88px); }
.hero-media { flex: 1 1 280px; min-width: 0; align-self: flex-end; }

.hero-copy h1 { font-size: clamp(30px, 5.4vw, 58px); }
.hero-text {
  margin-top: 18px;
  max-width: 46ch;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--sage);
  line-height: 1.3 ;
}

.btn-arrow {
  margin-top: clamp(16px, 4vw, 30px);
  padding: clamp(10px, 2.2vw, 13px) clamp(16px, 4vw, 26px);
  font-size: clamp(12px, 1.6vw, 14px);
  background: var(--sand);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(227, 168, 87, 0.22);
}
.btn-arrow:hover { background: var(--ember); color: var(--cloud); }
.btn-arrow .arrow { width: 20px; height: 20px; transition: transform .25s ease; }
.btn-arrow:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .btn-arrow .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn-arrow:hover .arrow { transform: scaleX(-1) translateX(4px); }

.hero-media { margin: 0; display: flex; justify-content: flex-end; position: relative; }
.hero-media img {
  width: min(100%, 620px);
  display: block;
  position: relative;
  margin-bottom: clamp(-32px, -4vw, -16px); /* feet tuck behind the ember strip */
}

.hero-rule { height: 50px; background: var(--ember); position: relative; z-index: 3; }


/* ---------- 6. About ---------- */
.about { text-align: center; display: flex; flex-direction: column; align-items: center; }
.about h2 { margin-top: 14px; font-size: clamp(28px, 4vw, 50px); }
.about-body {
  margin-top: 18px;
  max-width: 700px;
  color: var(--sage);
  font-size: clamp(14.5px, 1.5vw, 17px);
  line-height: 1.85;
}

.flag-mask {
  width: 100%;
  margin-top: 44px;
  overflow: hidden;
  direction: ltr; /* keep the marquee's start edge on the left regardless of page language */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.flag-track {
  display: flex;
  direction: ltr;
  width: max-content;
  gap: 20px;
  animation: flag-marquee 60s linear infinite;
}
.flag-track img { width: clamp(64px, 8vw, 96px); border-radius: 8px; }

@keyframes flag-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 7. Services ---------- */
.services {
  background: var(--cloud);
  color: var(--ink);
  padding-block: clamp(56px, 8vw, 112px);
}
.services-head h2 { margin-top: 14px; font-size: clamp(28px, 4vw, 52px); }

.services-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr 0.88fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: 26px;
  border: 1px solid rgba(11, 31, 42, 0.12);
  border-radius: var(--radius);
  background: #fff;
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 35px rgba(11, 31, 42, .18); }

.service-card.is-featured {
  grid-row: span 2;
  background: var(--ink);
  color: var(--cloud);
  border-color: rgba(227, 168, 87, 0.3);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--sand);
  border-radius: 50%;
  color: var(--sand);
}
.service-icon svg { width: 20px; height: 20px; }
.is-featured .service-icon { background: var(--sand); color: var(--ink); }

.service-card h3 { margin-top: 22px; font-size: 20px; font-weight: 700; }
.service-card p { margin-top: 8px; max-width: 290px; font-size: 13.5px; color: rgba(11, 31, 42, .6); }
.is-featured p { color: rgba(245, 239, 230, .65); }

.service-link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sand);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 8. Contact + map ---------- */
.contact { background: var(--ink); padding-block: clamp(56px, 8vw, 112px); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.contact-info h2 { margin-top: 14px; font-size: clamp(26px, 3.6vw, 44px); }
.contact-desc { margin-top: 16px; max-width: 44ch; color: var(--sage); line-height: 1.9; }

.btn-whatsapp {
  margin-top: 28px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .25);
}
.btn-whatsapp:hover { background: #1ebe5a; }

.map-block {
  border: 1px solid rgba(127, 168, 149, 0.22);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
}
#leaflet-map { width: 100%; height: 360px; }

/* Dark tiles to match the theme (same as the original) */
#leaflet-map .leaflet-tile-pane { filter: invert(90%) hue-rotate(180deg) saturate(.75) brightness(.85); }
.leaflet-popup-content-wrapper {
  background: var(--ink) !important;
  border: 1px solid rgba(227, 168, 87, .45) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4) !important;
  color: var(--cloud) !important;
  font-family: var(--font) !important;
}
.leaflet-popup-tip { background: var(--ink) !important; }
.leaflet-popup-content { margin: 14px 18px !important; text-align: center; }
.leaflet-popup-content b { display: block; font-size: 14px; color: var(--sand); margin-bottom: 4px; }
.leaflet-popup-content span { font-size: 12.5px; color: var(--sage); }
.leaflet-control-zoom a {
  background: var(--ink) !important;
  color: var(--cloud) !important;
  border-color: rgba(127, 168, 149, .3) !important;
}
.leaflet-control-zoom a:hover { background: #123b44 !important; color: var(--sand) !important; }
.leaflet-control-attribution { display: none !important; }

/* ---------- 9. Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--hairline);
  padding-block: 40px 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-nav a { font-size: 13px; color: var(--sage); transition: color .2s ease; }
.footer-nav a:hover { color: var(--sand); }
.footer-bottom {
  width: min(100%, 1320px);
  margin: 26px auto 0;
  padding: 16px var(--edge) 0;
  border-top: 1px solid rgba(127, 168, 149, .15);
  text-align: center;
  font-size: 12px;
  color: var(--sage);
}

/* ---------- 10. Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-card.is-featured { grid-row: auto; grid-column: span 2; }
}

@media (max-width: 900px) {
  .menu-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--header-h));
    flex-direction: column;
    align-items: flex-start;
    gap: 34px;
    padding: 44px var(--edge);
    background: var(--ink);
    border-top: 1px solid var(--hairline);
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    z-index: 99;
  }
  [dir="rtl"] .main-nav { transform: translateX(-100%); }
  .main-nav.is-open { transform: translateX(0); }

  .nav-list { flex-direction: column; align-items: flex-start; gap: 24px; width: 100%; }
  .nav-list a { font-size: 20px; }
  .main-nav .btn-light { width: 100%; }

  .hero-inner { padding-bottom: 0; gap: clamp(12px, 4vw, 24px); }
  .hero-copy { padding-bottom: clamp(20px, 6vw, 40px); }
  .hero-media img { margin-bottom: clamp(-20px, -4vw, -10px); }

  .contact-inner { grid-template-columns: 1fr; text-align: center; }
  .contact-info { display: flex; flex-direction: column; align-items: center; }
  .contact-desc { margin-inline: auto; }
  #leaflet-map { height: 300px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* Below ~700px, hero-copy and hero-media were both flex 1 1 ... and fighting
   for the same row, so the photo got squeezed down to almost nothing.
   Keep the row, but stop the photo from shrinking below a real size and
   let the copy take whatever space is left. */
@media (max-width: 700px) {
  .hero-inner {
    align-items: flex-end;
    gap: clamp(10px, 3vw, 20px);
  }
  .hero-copy {
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: clamp(16px, 5vw, 28px);
  }
  .hero-copy h1 { font-size: clamp(22px, 7.4vw, 34px); }
  .hero-text { font-size: clamp(12.5px, 3.4vw, 15px); }

  .hero-media {
    flex: 0 0 auto;
    min-width: 0;
  }
  .hero-media img {
    width: clamp(140px, 44vw, 260px);
    margin-bottom: clamp(-16px, -4vw, -8px);
  }
}

@media (max-width: 620px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card.is-featured { grid-column: auto; }
  .service-card p { max-width: none; }
}

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