/* SBT Holidays – Full responsive (all screen sizes) */

/* ===== Base fluid layout ===== */
.container {
  width: min(1200px, 100%);
  padding-inline: clamp(0.85rem, 4vw, 1.5rem);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Large tablet / small laptop (≤1200px) ===== */
@media (max-width: 1200px) {
  .main-nav > ul > li > a {
    padding: 0.5rem 0.55rem;
    font-size: 0.82rem;
  }
  .logo img {
    height: 52px;
  }
  .package-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ===== Tablet (≤992px) ===== */
@media (max-width: 992px) {
  :root {
    --header-h: 68px;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: calc(var(--topbar-h) + var(--header-h));
    right: 0;
    width: min(340px, 90vw);
    height: calc(100dvh - var(--topbar-h) - var(--header-h));
    max-height: calc(100dvh - var(--topbar-h) - var(--header-h));
    background: #fff;
    box-shadow: -12px 0 40px rgba(10, 22, 40, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1001;
  }
  .main-nav.open {
    transform: translateX(0);
  }
  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0;
  }
  .main-nav > ul > li > a {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #eef2f7;
    border-radius: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .main-nav > ul > li > a::after {
    display: none;
  }
  .main-nav .btn-header {
    display: block;
    text-align: center;
    margin: 0.5rem 0 0;
    padding: 0.85rem 1rem !important;
    min-height: 48px;
  }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0.5rem 1rem;
    display: none;
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
    margin-bottom: 0.25rem;
  }
  .has-dropdown.open .dropdown {
    display: block;
  }

  .side-quote-tab {
    display: none;
  }

  .float-stack .float-quote {
    display: flex !important;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    width: 52px;
    height: 52px;
  }
  .float-stack .float-quote span {
    display: none;
  }
  .float-stack .float-quote i {
    margin: 0;
    font-size: 1.1rem;
  }

  .intro-grid,
  .quote-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .intro-img {
    order: -1;
  }

  .intro-img img {
    height: min(320px, 50vw);
  }

  .footer-bbh-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dest-bbh-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-bbh-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .b-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .b-form .btn-search {
    grid-column: 1 / -1;
  }

  .popup-modal {
    width: min(920px, 96vw);
  }
}

/* ===== Mobile nav overlay ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

/* ===== Mobile (≤768px) ===== */
@media (max-width: 768px) {
  :root {
    --topbar-h: 44px;
    --header-h: 60px;
  }

  /* Top bar */
  .top-bar {
    font-size: 0.72rem;
  }
  .top-bar-inner {
    gap: 0.5rem;
  }
  .top-bar-left {
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
  }
  .top-bar-left a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .top-bar-email {
    display: none;
  }
  .top-bar-right {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .top-quote-btn {
    font-size: 0.68rem !important;
    padding: 0.4rem 0.7rem !important;
  }
  .top-quote-btn::after {
    content: none;
  }

  /* Header */
  .logo img {
    height: 46px;
  }
  .main-header.is-scrolled {
    height: 56px;
  }
  .main-header.is-scrolled .logo img {
    height: 42px;
  }
  .nav-toggle {
    z-index: 1002;
  }
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
  .nav-toggle span {
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .dropdown a {
    padding: 0.65rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Hero */
  .hero-bbh {
    height: auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 0;
    margin-top: calc(var(--topbar-h) + var(--header-h));
  }
  .hero-bbh::before {
    height: 80px;
  }
  .hero-slider {
    height: clamp(260px, 42vh, 380px);
  }
  .slide {
    background-size: cover !important;
    background-position: center center !important;
  }
  .slide.active {
    animation: none !important;
  }
  .slide::after {
    background: linear-gradient(
      180deg,
      rgba(10, 22, 40, 0.75) 0%,
      rgba(10, 22, 40, 0.35) 55%,
      rgba(10, 22, 40, 0.2) 100%
    ) !important;
  }
  .slide-caption {
    top: auto;
    bottom: 3.5rem;
    left: 4%;
    right: 4%;
    max-width: none;
    text-align: left;
  }
  .slide-caption h2 {
    font-size: clamp(1.15rem, 5vw, 1.45rem) !important;
    line-height: 1.3;
  }
  .slide-caption p {
    font-size: 0.8rem !important;
    line-height: 1.45;
  }
  .slide-badge {
    font-size: 0.65rem;
    padding: 0.28rem 0.65rem;
    margin-bottom: 0.5rem;
  }
  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  .slider-btn.prev {
    left: 0.5rem;
  }
  .slider-btn.next {
    right: 0.5rem;
  }
  .slider-dots {
    top: auto !important;
    bottom: 0.85rem !important;
    left: 50%;
    transform: translateX(-50%);
    gap: 0.35rem;
  }
  .slider-dots button {
    width: 24px;
    height: 6px;
  }
  .slider-dots button.active {
    width: 32px;
  }

  /* Booking box */
  .booking-section {
    margin-top: -1.5rem;
    padding-bottom: 1.5rem;
  }
  .booking-box {
    border-radius: 16px;
  }
  .booking-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    padding: 0.35rem 0.35rem 0;
  }
  .booking-tabs::-webkit-scrollbar {
    display: none;
  }
  .b-tab {
    flex: 0 0 auto;
    min-width: 76px;
    padding: 0.65rem 0.5rem;
    font-size: 0.72rem;
    margin: 0 2px;
  }
  .b-tab i {
    font-size: 1.1rem;
  }
  .booking-panels {
    padding: 1rem;
  }
  .panel-title {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.45;
  }
  .b-form {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .b-field input,
  .b-field select {
    font-size: 16px; /* prevents iOS zoom on focus */
    min-height: 46px;
  }
  .btn-search {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
  }

  /* Trust ribbon */
  .trust-ribbon {
    padding: 0.65rem 0;
  }
  .trust-ribbon-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
  }
  .trust-ribbon span {
    font-size: 0.72rem;
    justify-content: center;
  }

  /* Sections */
  .offers-section,
  .intro-section,
  .category-section,
  .packages-section,
  .dest-section,
  .why-bbh,
  .quote-section {
    padding: 2.5rem 0;
  }
  .section-head {
    margin-bottom: 1.75rem;
  }
  .section-desc {
    font-size: 0.88rem;
    padding-inline: 0.25rem;
  }
  .offers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .offer-card {
    min-height: 110px;
    padding: 1rem;
  }
  .offer-card h4 {
    font-size: 0.85rem;
  }
  .offer-card p {
    font-size: 0.68rem;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .cat-img {
    height: 120px;
  }
  .package-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .pkg-img {
    height: 200px;
  }
  .dest-bbh-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .dest-bbh-card img {
    height: 130px;
  }
  .why-bbh-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .why-bbh-card {
    padding: 1.5rem 1.25rem;
  }

  /* Trust stats */
  .trust-section {
    padding: 2rem 0;
  }
  .trust-item h3 {
    font-size: 1.6rem;
  }

  /* Partners */
  .marquee-track img {
    height: 34px;
    max-width: 90px;
    padding: 4px 10px;
  }

  /* Quote form */
  .quote-info h2 {
    font-size: 1.25rem;
  }
  .quote-form {
    padding: 1.25rem;
  }
  .qf-row {
    grid-template-columns: 1fr;
  }
  .qf-field input,
  .qf-field select {
    font-size: 16px;
    min-height: 46px;
  }

  /* Footer */
  .footer-bbh {
    padding-top: 2.5rem;
  }
  .footer-bbh-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }
  .brand-col img {
    margin-inline: auto;
  }
  .footer-social {
    justify-content: center;
  }
  .footer-col > a:hover {
    padding-left: 0;
  }
  .footer-bbh-bottom p {
    font-size: 0.78rem;
    line-height: 1.5;
    padding-inline: 0.5rem;
  }

  /* Popup */
  .popup-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .popup-modal {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .popup-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .popup-promo-slider {
    height: 140px;
  }
  .popup-slide-content h3 {
    font-size: 1rem;
  }
  .popup-trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .popup-right {
    padding: 1.25rem 1rem 1.5rem;
  }
  .popup-right h2 {
    font-size: 1rem;
  }
  .popup-field-row {
    grid-template-columns: 1fr;
  }
  .popup-field input,
  .popup-field select {
    font-size: 16px;
    min-height: 46px;
  }
  .popup-submit {
    min-height: 48px;
    width: 100%;
  }
  .popup-badges {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }
  .popup-close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }

  /* Float buttons */
  .float-stack {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    gap: 10px;
  }
  .float-stack .float-quote {
    display: flex !important;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .float-stack .float-quote span {
    display: none;
  }
  .float-stack .float-quote i {
    margin: 0;
    font-size: 1.15rem;
  }
  .float-stack .float-wa,
  .float-stack .float-quote,
  .float-stack .back-top {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
  }
  /* Plane cursor off on touch */
  .plane-cursor {
    display: none !important;
  }
}

/* ===== Small mobile (≤576px) ===== */
@media (max-width: 576px) {
  :root {
    --topbar-h: 40px;
    --header-h: 56px;
  }

  .top-bar-left a:first-child {
    font-size: 0.68rem;
  }
  .top-bar-left a:first-child i {
    margin-right: 0.2rem;
  }
  .top-bar-left a:nth-child(2) {
    display: none;
  }
  .top-quote-btn {
    font-size: 0 !important;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
  }
  .top-quote-btn::before {
    content: '\f0e0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
  }

  .logo img {
    height: 40px;
  }

  .hero-slider {
    height: clamp(240px, 38vh, 320px);
  }
  .slide-caption {
    bottom: 3rem;
  }
  .slide-caption h2 {
    font-size: 1.1rem !important;
  }

  .offers-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .dest-bbh-grid {
    grid-template-columns: 1fr;
  }

  .intro-img::after {
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .trust-item h3 {
    font-size: 1.4rem;
  }

  .popup-trust-grid {
    grid-template-columns: 1fr;
  }

  /* CMS pages */
  .cms-hero {
    min-height: 240px;
  }
  .cms-hero-inner {
    padding: 1.4rem 0 1.1rem;
  }
  .cms-hero-inner h1 {
    font-size: 1.3rem;
  }
  .cms-content-section {
    padding: 1.5rem 0 2.2rem;
  }
  .cms-content {
    padding: 1rem 0.9rem;
    border-radius: 12px;
  }
  .cms-cta-card {
    padding: 1rem;
  }
  .cms-pkg-img {
    height: 150px;
  }
  .cms-pkg-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .cms-pkg-actions a {
    width: 100%;
    text-align: center;
  }

  /* Package detail page */
  .package-top-wrap {
    padding: 0.8rem 0 1rem;
  }
  .package-summary-card {
    padding: 0.85rem;
    border-radius: 10px;
  }
  .package-summary-left h1 {
    font-size: 1.2rem;
    line-height: 1.35;
  }
  .package-meta-row {
    gap: 0.45rem 0.75rem;
  }
  .package-meta-row span {
    font-size: 0.8rem;
  }
  .package-summary-right {
    padding: 0.6rem;
  }
  .package-quote-btn {
    min-height: 44px;
    font-size: 0.9rem;
  }
  .package-banner-card img {
    height: 190px;
  }
  .package-includes-row {
    gap: 0.65rem;
    padding: 0.75rem;
  }
  .package-includes-row span {
    width: 100%;
    font-size: 0.84rem;
  }
  .package-content-box {
    padding: 0.9rem;
  }
  .package-content-box h2 {
    font-size: 1.1rem;
  }
  .package-content-box p,
  .package-content-box li {
    font-size: 0.88rem;
  }
  .package-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .package-enquiry-modal {
    padding: 0.45rem;
    align-items: flex-end;
  }
  .package-enquiry-dialog {
    width: 100%;
    border-radius: 14px 14px 0 0;
    max-height: 90dvh;
    overflow-y: auto;
    padding: 0.95rem;
  }
  .package-enquiry-field input,
  .package-enquiry-field textarea {
    font-size: 16px;
  }

  /* Contact page */
  .contact-info-head,
  .contact-info-list,
  .contact-hours,
  .contact-quick-actions {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .contact-map-wrap iframe {
    height: 220px;
  }
  .contact-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .contact-quick-actions a {
    justify-content: center;
  }
}

/* ===== Extra small (≤400px) ===== */
@media (max-width: 400px) {
  .container {
    padding-inline: 0.75rem;
  }

  .top-bar-right a:not(.top-quote-btn) {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .b-tab {
    min-width: 68px;
    font-size: 0.68rem;
  }
  .b-tab span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .float-stack {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}

/* ===== Large screens (≥1400px) ===== */
@media (min-width: 1400px) {
  .container {
    width: min(1320px, 92%);
  }
  .hero-bbh {
    min-height: 480px;
  }
}

/* ===== Landscape phone ===== */
@media (max-width: 896px) and (orientation: landscape) {
  .hero-slider {
    height: min(220px, 55vh);
  }
  .slide-caption {
    bottom: 2rem;
  }
  .slide-caption h2 {
    font-size: 1.1rem !important;
  }
  .booking-section {
    margin-top: -1rem;
  }
}

/* ===== Touch / reduced motion ===== */
@media (hover: none), (pointer: coarse) {
  .offer-card:hover,
  .cat-card:hover,
  .pkg-card:hover,
  .dest-bbh-card:hover {
    transform: none;
  }
  .btn-search:hover,
  .btn-primary:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide.active {
    animation: none !important;
  }
  .marquee-track {
    animation-duration: 60s;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
