/* ============================================================
   Bassim — shared site styles
   1. Base fixes & a11y
   2. Mobile nav (hamburger + dropdown)
   3. Responsive overrides (pages use inline styles by design,
      so this layer intentionally uses !important)
   ============================================================ */

/* ---------- 1. Base fixes & a11y ---------- */
html, body { overflow-x: clip; }

/* `hidden` must always win over inline display:flex/grid */
[hidden] { display: none !important; }

/* never let an image force horizontal scroll */
img { max-width: 100%; height: auto; }

/* dynamic viewport units: avoid iOS URL-bar jump */
@supports (min-height: 100svh) {
  [style*="min-height:100vh"] { min-height: 100svh !important; }
}

a:focus-visible, button:focus-visible, [data-go]:focus-visible, input:focus-visible {
  outline: 2px solid #A8FF00;
  outline-offset: 3px;
  border-radius: 6px;
}

/* reveal helper */
[data-reveal].bs-pre-reveal { opacity: 0; transform: translateY(28px); }

/* no hover-tilt artifacts on touch devices (JS also skips binding) */
@media (hover: none) {
  [data-tilt] { transform: none !important; }
}

/* ---------- 2. Mobile nav ---------- */
.bs-burger {
  all: unset;
  display: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  align-items: center;
  justify-content: center;
  flex: none;
  margin-inline-start: auto;
}
.bs-burger svg { display: block; }

.bs-mobilemenu {
  position: fixed;
  top: 82px;
  left: 16px;
  right: 16px;
  z-index: 59;
  background: rgba(1, 37, 31, .97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px 20px 32px 32px;
  box-shadow: 0 24px 60px -16px rgba(1, 20, 16, .7);
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.bs-mobilemenu.open { display: flex; }
.bs-mobilemenu a,
.bs-mobilemenu span {
  display: block;
  padding: 13px 16px;
  font: 500 15.5px 'IBM Plex Sans Arabic', sans-serif;
  color: #ECF3EF;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.bs-mobilemenu a:hover,
.bs-mobilemenu span:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.bs-mobilemenu .bs-mm-cta {
  margin-top: 8px;
  background: #A8FF00;
  color: #01251F;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
}
.bs-mobilemenu .bs-mm-cta:hover { background: #9FE01B; color: #01251F; }
.bs-mobilemenu .bs-mm-tel {
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  text-align: center;
  direction: ltr;
}

/* ---------- 3. Responsive overrides ---------- */

/* --- tablets --- */
@media (max-width: 1080px) {
  .bs-pill { gap: 14px !important; }
  .bs-links { gap: 14px !important; }
}

@media (max-width: 1024px) {
  [style*="grid-template-columns:340px 1fr"],
  [style*="grid-template-columns:minmax(0,660px) 1fr"],
  [style*="grid-template-columns:1.3fr .7fr"],
  [style*="grid-template-columns:1.2fr .8fr"],
  [style*="grid-template-columns:1.15fr .85fr"],
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="grid-template-columns:1fr 1.1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:1.4fr 1fr 1fr 1.3fr"],
  [style*="grid-template-columns:1.4fr 1fr 1fr 1.2fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* --- nav collapse --- */
@media (max-width: 960px) {
  .bs-links { display: none !important; }
  .bs-actions a[href^="tel"],
  .bs-actions span { display: none !important; }
  .bs-burger { display: flex; }
  .bs-pill { padding: 8px 10px !important; }
}

/* --- hero text over the 3D scene needs contrast once it may overlap --- */
@media (max-width: 900px) {
  #bassim-hero-inner h1 { text-shadow: 0 2px 30px rgba(1, 37, 31, .9); }
  #bassim-hero-inner p  { text-shadow: 0 1px 18px rgba(1, 37, 31, .85); }
}

/* --- phones --- */
@media (max-width: 720px) {
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(12,1fr)"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:1.4fr 1fr 1fr 1.3fr"],
  [style*="grid-template-columns:1.4fr 1fr 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
  }

  /* hero strips + big cards */
  [style*="padding:160px 32px 150px"] { padding: 126px 20px 118px !important; }
  [style*="padding:170px 32px 96px"]  { padding: 128px 20px 70px !important; }
  [style*="padding:150px 40px 110px"] { padding: 118px 22px 80px !important; }
  [style*="padding:70px 40px 90px"]   { padding: 44px 20px 60px !important; }
  [style*="padding:64px 56px"]        { padding: 38px 26px !important; }
  [style*="padding:38px 40px"]        { padding: 28px 22px !important; }
  [style*="padding:52px 44px"]        { padding: 36px 24px !important; }
  [style*="padding:80px 32px 0"]      { padding: 56px 20px 0 !important; }
  [style*="padding:44px 32px 0"]      { padding: 36px 20px 0 !important; }
  [style*="padding:40px 48px"]        { padding: 30px 24px !important; }
  [style*="padding:40px 36px"]        { padding: 30px 24px !important; }

  /* display type: fixed sizes */
  [style*="font:700 52px"] { font-size: 36px !important; }
  [style*="font:700 46px"] { font-size: 33px !important; }
  [style*="font:700 44px"] { font-size: 32px !important; }
  [style*="font:700 42px"] { font-size: 33px !important; }
  [style*="font:700 40px"] { font-size: 30px !important; }
  [style*="font:700 38px"] { font-size: 29px !important; }
  [style*="font:700 36px"] { font-size: 28px !important; }
  [style*="font:700 34px"] { font-size: 27px !important; }
  [style*="font:700 30px"] { font-size: 25px !important; }
  [style*="font:700 28px"] { font-size: 24px !important; }

  /* display type: clamp() heroes whose minimum is desktop-sized */
  [style*="clamp(52px"] { font-size: clamp(36px, 10.5vw, 52px) !important; }
  [style*="clamp(46px"] { font-size: clamp(33px, 9.5vw, 46px) !important; }
  [style*="clamp(44px"] { font-size: clamp(32px, 9.5vw, 44px) !important; }
  [style*="clamp(40px"] { font-size: clamp(30px, 9vw, 40px) !important; }

  /* iOS zooms into inputs below 16px — bump them on touch sizes */
  input[style*="font:400 15px"],
  input[style*="font:400 14px"],
  input[style*="font:700 15px"] { font-size: 16px !important; }

  /* fixed nav blur is expensive on mobile GPUs */
  .bs-pill {
    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
  }

  /* success-card summary box */
  [style*="min-width:320px"] { min-width: 0 !important; width: 100%; box-sizing: border-box; }
}

/* --- small phones: wide auto-fit minimums would overflow --- */
@media (max-width: 480px) {
  [style*="minmax(340px"],
  [style*="minmax(300px"],
  [style*="minmax(290px"] { grid-template-columns: 1fr !important; }
  .bs-navwrap { padding: 0 12px !important; }
  .bs-mobilemenu { top: 76px; left: 10px; right: 10px; }
  [style*="font:700 52px"] { font-size: 31px !important; }
  [style*="font:700 42px"] { font-size: 29px !important; }
  [style*="font:700 40px"] { font-size: 27px !important; }
}

@media (max-width: 360px) {
  [style*="minmax(280px"],
  [style*="minmax(272px"],
  [style*="minmax(270px"],
  [style*="minmax(260px"],
  [style*="minmax(255px"] { grid-template-columns: 1fr !important; }
}

/* ============================================================
   Home page: hero (first block) + booking «حجزك أسهل من ابتسامتك»
   mobile refinements — scoped, no effect on other pages
   ============================================================ */

/* booking columns stack at 1024px — desktop gap:56px is too tall then */
@media (max-width: 1024px) {
  #bassim-booking .bk-card { gap: 34px !important; }
}

@media (max-width: 720px) {
  /* hero rhythm + readability */
  #bassim-hero-inner p { font-size: 16px !important; line-height: 1.95 !important; }
  #bassim-hero .hero-badge {
    font-size: 12.5px !important;
    padding: 8px 15px !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
  }
  #bassim-hero .hero-chips > div {
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    padding: 8px 15px !important;
    font-size: 13px !important;
  }

  /* booking section: tighter top spacing, wider card */
  #bassim-booking { margin-top: 72px !important; padding: 0 16px !important; }
  #bassim-booking .bk-card { gap: 28px !important; }
  #bassim-booking h2 { line-height: 1.35 !important; }

  /* glass form card: cheaper blur, keep contrast with darker fill */
  #bassim-booking .bk-form-card {
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    background: rgba(1, 37, 31, .45) !important;
  }
}

@media (max-width: 480px) {
  /* hero column: tighter gaps, badge wraps instead of overflowing */
  #bassim-hero-inner > div { gap: 22px !important; }
  #bassim-hero .hero-badge {
    white-space: normal !important;
    text-align: center;
    line-height: 1.7;
    border-radius: 20px !important;
  }
  /* CTAs: full-width stacked buttons = better tap targets */
  #bassim-hero .hero-ctas { flex-direction: column; align-items: stretch; }
  #bassim-hero .hero-ctas button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  /* let the headline breathe over the 3D scene */
  #bassim-canvas { opacity: .85; }

  /* booking card proportions on small phones */
  #bassim-booking .bk-card {
    border-radius: 24px 24px 44px 44px !important;
    padding: 34px 20px !important;
  }
  #bassim-booking .bk-form-card { padding: 24px 18px !important; }
  #bassim-booking .bk-form-card > div:first-child { font-size: 22px !important; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal].bs-pre-reveal { opacity: 1; transform: none; }
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
