/* ==========================================================================
   RESPONSIVE MASTER STYLESHEET - NINOH WILD SAFARIS
   Complete Cross-Breakpoint Architecture & Visual Optimization
   Breakpoints: 320px, 360px, 375px, 390px, 414px, 430px, 600px, 768px, 
                820px, 1024px, 1280px, 1366px, 1440px, 1536px, 1920px+
   ========================================================================== */

/* ==========================================================================
   BEACHDAY FONT DEFINITION & GLOBAL HEADINGS
   ========================================================================== */
@font-face {
  font-family: 'Beachday';
  src: url('/static/fonts/beachday.otf') format('opentype'),
       url('/static/fonts/beachday.ttf') format('truetype'),
       url('/static/Font/beachday.otf') format('opentype'),
       url('/static/Font/beachday.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.hero-title,
.about-title,
.packages-title,
.destinations-title,
.safari-gallery-heading,
.safari-dest-title,
.safari-editorial-title,
.why-title,
.reviews-title,
.cta-title,
.blog-title,
.blog-post-title,
.lively-section-title,
.lively-tours-hero h1,
.lively-about-hero h1,
.contact-hero-title,
.safari-inquiry-title,
.safari-trust-title,
.safari-map-title,
.safari-faq-title,
.destination-image-content h3,
.lively-step-title,
.lively-bespoke-title,
.itinerary-modal-header h2,
.modal-title {
  font-family: 'Beachday', 'Poppins', sans-serif !important;
  letter-spacing: 0.6px;
}

/* --------------------------------------------------------------------------
   1. GLOBAL VIEWPORT & OVERFLOW SAFEGUARDS
   -------------------------------------------------------------------------- */
html,
body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative !important;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box !important;
}

img,
video,
iframe,
object,
embed {
  max-width: 100% !important;
  height: auto;
}

/* Remove awkward tap highlights on iOS / Android */
a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Minimum Accessible Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c9a66b !important;
  outline-offset: 3px !important;
}

/* --------------------------------------------------------------------------
   2. 90% SCREEN WIDTH SYSTEM (DESKTOP) & BALANCED MARGINS
   -------------------------------------------------------------------------- */
/* Desktop (>= 1200px) */
@media (min-width: 1200px) {
  .container,
  .site-container,
  .packages-section .container,
  .destinations-section .container,
  .gallery-section .container,
  .why-section .container,
  .reviews-section .container,
  .about-section .container,
  .site-footer .container {
    width: 90% !important;
    max-width: 1560px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

/* Ultrawide & High-Resolution Displays (>= 1600px) */
@media (min-width: 1600px) {
  .container,
  .site-container,
  .packages-section .container,
  .destinations-section .container,
  .gallery-section .container,
  .why-section .container,
  .reviews-section .container,
  .about-section .container,
  .site-footer .container {
    width: 88% !important;
    max-width: 1720px !important;
  }
}

/* Laptop & Tablet Landscape (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .container,
  .site-container {
    width: 92% !important;
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Tablet Portrait (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container,
  .site-container {
    width: 94% !important;
    max-width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* Mobile Screens (<= 767px down to 320px) */
@media (max-width: 767px) {
  .container,
  .site-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: clamp(14px, 4vw, 22px) !important;
    padding-right: clamp(14px, 4vw, 22px) !important;
  }
}

/* --------------------------------------------------------------------------
   3. HERO SECTIONS - MULTI-DEVICE HARMONY
   -------------------------------------------------------------------------- */
.hero-section,
.tours-hero,
.about-hero,
.contact-page-hero,
.safari-page-hero {
  position: relative;
  overflow: hidden;
}

/* Ensure navbar clearance */
.tours-hero,
.about-hero,
.contact-page-hero {
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 60px;
}

@media (max-width: 768px) {
  .tours-hero,
  .about-hero,
  .contact-page-hero {
    min-height: 380px;
    padding-top: 95px;
    padding-bottom: 45px;
  }

  .tours-title,
  .about-tiitle,
  .about-heading,
  .contact-hero-title {
    font-size: clamp(26px, 7vw, 36px) !important;
    line-height: 1.25 !important;
  }

  .tours-subtitle,
  .contact-hero-subtitle {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    max-width: 94% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 480px) {
  .tours-hero,
  .about-hero,
  .contact-page-hero {
    min-height: 340px;
    padding-top: 90px;
    padding-bottom: 35px;
  }

  .hero-title {
    font-size: clamp(24px, 7.5vw, 32px) !important;
    letter-spacing: 0.5px !important;
  }

  .hero-subtitle {
    font-size: 13.5px !important;
  }
}

/* --------------------------------------------------------------------------
   4. HOMEPAGE ABOUT & WHY-US SECTIONS FIXES
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .about-images {
    padding-right: 0 !important;
    margin-bottom: 35px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about-main-img {
    width: 100% !important;
    max-width: 520px !important;
    height: auto !important;
    aspect-ratio: 16/10;
    object-fit: cover !important;
    border-radius: 16px !important;
    border: 6px solid #ffffff !important;
  }

  .about-small-img {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    width: 70% !important;
    max-width: 320px !important;
    height: auto !important;
    aspect-ratio: 4/3;
    margin-top: -50px !important;
    border-radius: 14px !important;
    border: 5px solid #ffffff !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
  }

  .about-content {
    padding-left: 0 !important;
    text-align: center;
  }

  .about-title {
    font-size: clamp(26px, 6vw, 34px) !important;
  }

  .about-text {
    font-size: 14.5px !important;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .about-small-img {
    margin-top: -35px !important;
    width: 75% !important;
  }
}

/* Why Us Video Fix */
.why-video-wrapper {
  position: relative;
  width: 100%;
}

.why-video {
  width: 100% !important;
  height: auto !important;
  min-height: 260px !important;
  max-height: 480px !important;
  aspect-ratio: 16/10;
  object-fit: cover !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25) !important;
  display: block !important;
}

@media (max-width: 768px) {
  .why-video {
    width: 100% !important;
    height: auto !important;
    min-height: 220px !important;
    margin-bottom: 25px !important;
  }

  .why-content {
    padding-left: 0 !important;
    width: 100% !important;
  }

  .why-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    margin-bottom: 22px !important;
    text-align: left !important;
  }

  .why-item-icon {
    flex-shrink: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   5. REVIEWS & TESTIMONIALS SECTION
   -------------------------------------------------------------------------- */
.review-card {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

@media (max-width: 768px) {
  .reviews-title {
    font-size: clamp(26px, 6vw, 34px) !important;
  }

  .reviews-subtitle {
    font-size: 14px !important;
    margin-bottom: 40px !important;
  }

  .review-card {
    padding: 24px 20px !important;
    margin-bottom: 20px !important;
  }
}

/* --------------------------------------------------------------------------
   6. COMPLETE FOOTER RESPONSIVE ARCHITECTURE (320px - 1920px)
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100% !important;
  overflow: hidden !important;
}

/* Tablet (769px to 991px) */
@media (min-width: 769px) and (max-width: 991px) {
  .footer-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 40px !important;
  }
}

/* Mobile Screens (<= 768px down to 320px) */
@media (max-width: 768px) {
  .footer-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px 20px !important;
  }
}

/* Small Phones (<= 576px down to 320px) */
@media (max-width: 576px) {
  .site-footer {
    padding: 60px 0 0 0 !important;
  }

  .footer-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 32px !important;
    text-align: center !important;
  }

  .footer-col {
    width: 100% !important;
    max-width: 380px !important;
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .footer-logo {
    width: 210px !important;
    max-width: 80% !important;
    height: auto !important;
    margin: 0 auto 15px auto !important;
    display: block !important;
  }

  .footer-logo-adjust {
    padding-left: 0 !important;
    text-align: center !important;
  }

  .footer-about {
    text-align: center !important;
    margin: 0 auto !important;
    max-width: 300px !important;
    font-size: 13.5px !important;
    line-height: 1.65 !important;
  }

  .footer-title {
    margin-bottom: 14px !important;
    font-size: 16px !important;
  }

  .footer-links,
  .footer-contact {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .footer-links li a,
  .footer-contact li a {
    font-size: 14px !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .social-icons {
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 6px !important;
  }

  .social-icons a {
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
  }

  .footer-bottom {
    padding: 24px 15px !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
    text-align: center !important;
  }
}

/* --------------------------------------------------------------------------
   7. TOURS & ITINERARIES PAGE ARCHITECTURE
   -------------------------------------------------------------------------- */
/* Filter Pills Bar */
.tours-filter-container {
  width: 100%;
  margin: 30px auto 40px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tours-search-wrapper {
  position: relative;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.tours-search-input {
  width: 100%;
  height: 52px;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(201, 166, 107, 0.45);
  border-radius: 9999px;
  padding: 0 48px 0 52px;
  font-size: 15px;
  color: #123825;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  outline: none;
  transition: all 0.3s ease;
}

.tours-search-input:focus {
  border-color: #c9a66b;
  box-shadow: 0 10px 30px rgba(201, 166, 107, 0.35);
  background: #ffffff;
}

.tours-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #c9a66b;
  font-size: 18px;
  pointer-events: none;
}

.tours-search-clear {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  display: none;
}

.tours-search-clear.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Category Pills Wrapper */
.tours-categories-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px;
}

.tours-category-pill {
  appearance: none;
  border: 1px solid rgba(201, 166, 107, 0.35);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #06150d;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  min-height: 44px;
}

.tours-category-pill i {
  color: #c9a66b;
  font-size: 15px;
  transition: color 0.3s ease;
}

.tours-category-pill:hover {
  background: #ffffff;
  border-color: #c9a66b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201, 166, 107, 0.25);
}

.tours-category-pill.active {
  background: linear-gradient(135deg, #123825, #082116);
  color: #f4f7f5;
  border-color: #c9a66b;
  box-shadow: 0 6px 20px rgba(18, 56, 37, 0.4);
}

.tours-category-pill.active i {
  color: #dfb87a;
}

/* Mobile Category Pills: Swipeable horizontal track on small screens */
@media (max-width: 768px) {
  .tours-categories-wrapper {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding: 8px 12px 14px 12px !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
  }

  .tours-categories-wrapper::-webkit-scrollbar {
    display: none;
  }

  .tours-category-pill {
    flex-shrink: 0 !important;
    scroll-snap-align: start;
    font-size: 13px !important;
    padding: 8px 16px !important;
  }
}

/* Cards Grid Balance - Luxury Dark Emerald Safari Cards */
.destination-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(11, 36, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 166, 107, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.destination-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/static/images/patterns/coral-leaf-pattern.svg');
  background-repeat: repeat;
  background-position: center;
  background-size: 200px 200px;
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 1;
}

.destination-card:hover {
  transform: translateY(-8px);
  background: rgba(18, 56, 36, 0.95);
  border-color: rgba(201, 166, 107, 0.65);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.65), 0 0 24px rgba(201, 166, 107, 0.25);
}

.destination-card:hover::before {
  opacity: 0.95;
  transform: scale(1.06) rotate(-2deg);
}

.destination-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/11;
  width: 100%;
  z-index: 2;
}

.destination-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.destination-card:hover .destination-image img {
  transform: scale(1.08);
}

.destination-content {
  padding: 24px;
  display: flex;
  position: relative;
  z-index: 2;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.book-whatsapp-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: 9999px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Empty State */
.tours-empty-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px dashed #c9a66b;
  margin: 30px auto;
  max-width: 600px;
}

.tours-empty-state.show {
  display: block;
}

.tours-empty-icon {
  font-size: 48px;
  color: #c9a66b;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   8. ITINERARY MODALS - ACCESSIBLE ON EVERY PHONE (320px - 430px)
   -------------------------------------------------------------------------- */
.safari-itinerary-modal .modal-dialog {
  max-width: 860px;
  margin: 30px auto;
}

@media (max-width: 991px) {
  .safari-itinerary-modal .modal-dialog {
    max-width: 92% !important;
    margin: 20px auto !important;
  }
}

@media (max-width: 576px) {
  .safari-itinerary-modal .modal-dialog {
    max-width: calc(100% - 16px) !important;
    margin: 10px auto !important;
  }

  .safari-itinerary-modal .itinerary-modal-header {
    padding: 28px 18px 22px !important;
  }

  .safari-itinerary-modal .itinerary-modal-header h2 {
    font-size: 20px !important;
    margin-right: 32px !important;
  }

  .safari-itinerary-modal .itinerary-close {
    top: 14px !important;
    right: 14px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  .safari-itinerary-modal .itinerary-modal-body {
    padding: 24px 16px 30px !important;
  }

  .safari-itinerary-modal .safari-day {
    grid-template-columns: 38px 1fr !important;
    gap: 12px !important;
    padding-bottom: 24px !important;
  }

  .safari-itinerary-modal .day-number {
    width: 38px !important;
    height: 38px !important;
    font-size: 10.5px !important;
  }

  .safari-itinerary-modal .safari-day:not(:last-child)::before {
    left: 18px !important;
    top: 38px !important;
  }

  .safari-itinerary-modal .day-content h4 {
    font-size: 14px !important;
  }

  .safari-itinerary-modal .day-content p {
    font-size: 12px !important;
  }

  .safari-itinerary-modal .modal-booking-box {
    padding: 20px 16px !important;
  }

  .safari-itinerary-modal .modal-whatsapp-btn {
    min-height: 48px !important;
    font-size: 14px !important;
  }
}

/* Extra tight mobile screen (320px to 360px) */
@media (max-width: 360px) {
  .safari-itinerary-modal .modal-dialog {
    max-width: calc(100% - 10px) !important;
    margin: 6px auto !important;
  }

  .safari-itinerary-modal .itinerary-modal-header {
    padding: 22px 14px 18px !important;
  }

  .safari-itinerary-modal .itinerary-modal-header h2 {
    font-size: 18px !important;
  }

  .safari-itinerary-modal .safari-day {
    grid-template-columns: 32px 1fr !important;
    gap: 8px !important;
  }

  .safari-itinerary-modal .day-number {
    width: 32px !important;
    height: 32px !important;
    font-size: 9.5px !important;
  }

  .safari-itinerary-modal .safari-day:not(:last-child)::before {
    left: 15px !important;
  }
}

/* --------------------------------------------------------------------------
   9. WHATSAPP FLOATING BUTTON (NON-INTRUSIVE ON MOBILE)
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 58px;
  height: 58px;
  background: #25d366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  text-decoration: none;
  z-index: 1045;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.45);
  color: #ffffff !important;
}

@media (max-width: 576px) {
  .whatsapp-float {
    bottom: 18px !important;
    right: 18px !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 26px !important;
  }
}

/* --------------------------------------------------------------------------
   10. NAVBAR MENU OVERFLOW PROTECTION
   -------------------------------------------------------------------------- */
.floating-header-wrapper {
  overflow: visible !important;
}

.hero-navbar.floating-glass-navbar {
  overflow: visible !important;
}

.nav-cta-text-full {
  display: inline !important;
}

.nav-cta-text-short {
  display: none !important;
}

.nav-actions-right {
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.nav-mobile-toggle {
  flex-shrink: 0 !important;
}

@media (max-width: 768px) {
  .nav-cta-text-full {
    display: none !important;
  }
  .nav-cta-text-short {
    display: inline !important;
  }
}

.nav-links-center {
  min-width: 0 !important;
  flex-shrink: 1 !important;
  overflow: visible !important;
}

.nav-item {
  flex-shrink: 0 !important;
}

.nav-link-item {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.mobile-glass-dropdown {
  max-height: calc(100vh - 90px) !important;
  max-height: calc(100dvh - 90px) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.mobile-glass-content {
  max-height: calc(100vh - 100px) !important;
  max-height: calc(100dvh - 100px) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Gallery Wild Moments Buttons */
.wild-moments-btn,
.wild-moments-button-wrap .safari-primary-btn {
  border-radius: 9999px !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .wild-moments-button-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }
  
  .wild-moments-btn,
  .wild-moments-button-wrap .safari-primary-btn {
    width: 100% !important;
    max-width: 330px !important;
    margin: 0 !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* --------------------------------------------------------------------------
   11. REDUCED MOTION PREFERENCES
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
