/**
 * Bhanumati Homestay - Responsive Breakpoints & Mobile Optimization
 */

/* Tablets & Small Laptops (<= 1120px) */
@media (max-width: 1120px) {
  :root {
    --header-height: 72px;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
    z-index: 999;
  }

  .main-nav.nav-open {
    transform: translateX(0);
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--color-mist-border);
    padding-bottom: 0.5rem;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    font-size: 1.05rem;
    padding: 0.75rem 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .has-dropdown.dropdown-open .dropdown-menu {
    max-height: 350px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .room-popup-container {
    grid-template-columns: 1fr;
    max-height: 85vh;
  }

  .room-slider-wrapper {
    height: 240px;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-grid-2, .form-grid-3, .popup-form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-main-title {
    font-size: 2.15rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero-indicators {
    bottom: 1rem;
    right: 1.5rem;
  }

  /* Floating Widgets on Mobile */
  .floating-left-container {
    left: 1rem;
    bottom: 1rem;
    gap: 0.75rem;
  }

  .float-wa-btn {
    width: 48px;
    height: 48px;
  }

  .float-book-btn {
    padding: 0.6rem 0.95rem;
    font-size: 0.8rem;
  }

  .chatbot-widget {
    right: 1rem;
    bottom: 1rem;
  }

  .chatbot-trigger-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .updates-widget {
    right: 1rem;
    bottom: 4.5rem;
  }

  .updates-trigger-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
  }

  .chatbot-window {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 4rem;
    height: 460px;
  }

  .updates-drawer {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 7.5rem;
  }

  .booking-box {
    padding: 1.5rem;
  }

  .booking-summary-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-popup-right {
    padding: 1.5rem 1.25rem;
  }

  .video-dual-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .room-popup-grid-layout {
    grid-template-columns: 1fr;
  }

  .diwali-popup-modal {
    max-width: 95vw;
  }
}

/* ==================================================
   DESKTOP & LAPTOP ONLY (screens > 1024px)
   STRICT REQUIREMENT: CALL BUTTON MUST BE HIDDEN
   ================================================== */
@media (min-width: 1025px) {
  .mobile-call-sticky-wrap,
  .mobile-direct-call-btn,
  .mobile-alt-call-btn {
    display: none !important;
  }
}

/* ==================================================
   MOBILE & TABLET ONLY (screens <= 1024px)
   STRICT REQUIREMENT: CALL BUTTON MUST BE PROMINENTLY VISIBLE
   ================================================== */
@media (max-width: 1024px) {
  .mobile-call-sticky-wrap {
    display: flex !important;
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 996;
    gap: 0.5rem;
    align-items: center;
  }

  .mobile-direct-call-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #143d2b 0%, #1e543b 100%);
    color: #ffffff !important;
    padding: 0.65rem 1.15rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(20, 61, 43, 0.45);
    border: 2px solid #ffffff;
    animation: subtlePulse 2.6s ease-in-out infinite;
  }

  .mobile-direct-call-btn:hover {
    background: #0e2e20;
    color: var(--color-sun-light) !important;
  }

  .mobile-alt-call-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    background: #0284c7;
    color: #ffffff !important;
    padding: 0.65rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    border: 2px solid #ffffff;
  }

  .video-dual-grid {
    grid-template-columns: 1fr;
  }
}

/* Touch Targets Compliance (>= 44px) */
@media (pointer: coarse) {
  button, .btn, .nav-link, .dropdown-link, input, select {
    min-height: 44px;
  }
}
