/* =============================================================
   Front Page — Hero & Modal
   Extracted from inline <style> and style="" attrs in front-page.php
   ============================================================= */

/* --- Hero section --- */
.bb-hero {
  position: relative;
  min-height: 100svh;
  padding-bottom: 24px;
  overflow: hidden;
  background: #0f172a;
  /*
   * touch-action: pan-y — tell the browser we handle horizontal gestures
   * ourselves (swipe left/right in home-hero.js), while native vertical
   * scroll remains unaffected. Without this the browser delays/cancels
   * touchend to resolve scroll-vs-swipe ambiguity.
   */
  touch-action: pan-y;
}

/* Background image layer — background-image set inline via PHP (dynamic first frame) */
.bb-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: opacity 0.9s ease-in-out;
}

/* Dark gradient overlay */
.bb-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.6) 100%);
}

/* Full-size content wrapper */
.bb-hero__content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
}

/* --- Container — mobile default (bottom-center) --- */
.bb-hero-container {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 20px;
  align-items: flex-end;
  justify-content: center;
}

/* --- Glassmorphism card --- */
.bb-hero__card {
  max-width: 440px;
  width: 100%;
  padding: 25px 20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px) saturate(160%);
  -webkit-backdrop-filter: blur(15px) saturate(160%);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Stardust texture — url is relative to this CSS file → ../img/stardust.png */
.bb-hero__texture {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  opacity: 0.04;
  pointer-events: none;
  background-image: url('../img/stardust.png');
  background-repeat: repeat;
}

/* --- Badge pill --- */
.bb-hero__pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.45);
  color: #0f172a;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

/* --- Title & Subtitle --- */
.bb-hero__title {
  font-size: clamp(22px, calc(19px + 0.8vw), 28px);
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}

.bb-hero__subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  line-height: 1.5;
  margin: 0 auto 15px;
  position: relative;
  z-index: 1;
}

/* --- CTA buttons row --- */
.bb-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.bb-hero__btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s;
}

.bb-hero__btn--primary {
  padding: 14px 20px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.bb-hero__btn--primary:hover {
  background: #1e293b;
  color: #fff;
}

.bb-hero__btn--wa {
  padding: 13px 20px;
  background: transparent;
  color: #0f172a;
  border: 2px solid #0f172a;
}

.bb-hero__btn--wa:hover {
  background: rgba(15, 23, 42, 0.06);
}

/* =============================================================
   Modal — booking overlay
   ============================================================= */
.bb-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bb-modal.active {
  display: flex;
}

.bb-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
}

.bb-modal-container {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.bb-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s;
}

.bb-modal-close:hover {
  background: #e2e8f0;
}

/* =============================================================
   Desktop ≥ 1024px
   ============================================================= */
@media (min-width: 1024px) {
  .bb-hero-container {
    align-items: center;
    justify-content: flex-end;
    padding-right: 60px;
    padding-top: 90px;
    padding-bottom: 0;
  }

  .bb-hero__title {
    /* font-size handled by clamp() in base rule above */
    line-height: 1.15;
    margin-bottom: 12px;
  }

  .bb-hero__subtitle {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .bb-hero__card {
    padding: 30px 25px;
  }
}

/* =============================================================
   Hero — landscape orientation on short viewports
   Targets phones rotated sideways (height 320px – 500px):
   iPhone SE landscape 568×320, iPhone 8 landscape 667×375, etc.
   Tablets in landscape (height ≥ 768px) are NOT affected.

   Strategy: remove forced 100svh, add padding-top to clear the
   sticky header, centre the card vertically, shrink padding/fonts
   so the full card fits without scrolling.
   ============================================================= */
@media (orientation: landscape) and (max-height: 500px) {

  .bb-hero {
    min-height: 0;          /* let card content drive the height */
    padding-top: 76px;      /* clear sticky header (~64px) + breathing room */
    padding-bottom: 20px;
  }

  /* Content wrapper: stop inheriting the portrait 100% height */
  .bb-hero__content {
    height: auto;
  }

  .bb-hero-container {
    height: auto;
    align-items: center;    /* centre card in available space */
    justify-content: center;
    padding: 0 32px;        /* wide side padding for landscape widescreen */
  }

  .bb-hero__card {
    max-width: 400px;
    padding: 14px 18px;
  }

  .bb-hero__pill {
    font-size: 9px;
    padding: 3px 10px;
    margin-bottom: 8px;
  }

  .bb-hero__title {
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 6px;
  }

  .bb-hero__subtitle {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .bb-hero__actions {
    gap: 7px;
  }

  .bb-hero__btn--primary {
    padding: 10px 16px;
  }

  .bb-hero__btn--wa {
    padding: 9px 16px;
  }
}

/* =============================================================
   Booking Modal — responsive padding for small screens
   ============================================================= */

/* ── Mid-small phones 375 – 430px ───────────────────────────────
   Reduce the outer gutter and inner padding so the form
   gets more horizontal breathing room on average phones.
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 430px) {
  .bb-modal {
    padding: 12px;
  }

  .bb-modal-container {
    padding: 24px 18px;
    border-radius: 22px;
  }
}

/* ── Very small phones < 375px (iPhone SE 320px, etc.) ──────────
   Bottom-sheet pattern: zero outer gutter, full viewport width,
   anchored to the bottom edge, rounded only at the top.
   Content width on 320px: 320 − 32px padding = 288px  ✓
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 374px) {
  .bb-modal {
    padding: 0;
    align-items: flex-end;  /* anchor sheet to bottom */
  }

  .bb-modal-container {
    max-width: 100%;
    max-height: 93dvh;            /* dvh = dynamic viewport height (excludes browser chrome) */
    border-radius: 24px 24px 0 0; /* rounded top, flush bottom */
    padding: 20px 16px 24px;
    /* Safe area inset for iPhones with home indicator */
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .bb-modal-close {
    top: 12px;
    right: 12px;
  }
}
