/* ==========================================================================
   SRINFRAA PROPERTY AGENCY - RESPONSIVE & MOBILE DESIGN SYSTEM
   ========================================================================== */

/* Mobile Hamburger Menu Drawer */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background-color: var(--dark-charcoal);
  color: var(--white);
  z-index: 1500;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 25px rgba(0,0,0,0.3);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-menu-drawer.is-open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mobile-nav-links a {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.mobile-nav-links a:hover, .mobile-nav-links a.active {
  color: var(--primary-gold);
}

.mobile-drawer-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
}

/* Mobile Fixed Bottom Action Bar for Property Pages */
.mobile-property-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--dark-charcoal);
  border-top: 2px solid var(--primary-gold);
  padding: 0.75rem 1rem;
  z-index: 1100;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
}

.mobile-bottom-bar-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.mobile-bottom-bar-inner .btn {
  padding: 0.65rem 0.2rem;
  font-size: 0.8rem;
}

/* Media Queries */
@media (max-width: 1024px) {
  .navbar-inner {
    height: 75px;
  }

  .nav-menu {
    display: none;
  }

  .header-ctas .btn-list-prop {
    display: none;
  }

  .brand-logo img {
    height: 50px;
  }

  .mobile-menu-toggle {
    display: block;
  }

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

  .search-btn-col {
    grid-column: span 2;
    padding-top: 0.5rem;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .gallery-container {
    grid-template-columns: 1fr;
  }

  .main-image-box {
    height: 340px;
  }

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

  .gallery-thumb {
    height: 90px;
  }

  .property-content-layout {
    grid-template-columns: 1fr;
  }

  .sticky-sidebar-card {
    position: static;
  }

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

@media (max-width: 767px) {
  .section-padding {
    padding: 3.5rem 0;
  }

  .hero-wrapper {
    min-height: 70vh;
    padding: 8.5rem 0 4.5rem 0;
  }

  .hero-content p.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .search-fields-grid {
    grid-template-columns: 1fr;
  }

  .search-btn-col {
    grid-column: span 1;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }

  .prop-header-top {
    flex-direction: column;
    gap: 0.8rem;
  }

  .calc-inputs-pane, .calc-results-pane {
    padding: 1.8rem;
  }

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

  .footer-bottom-inner {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .mobile-property-bottom-bar {
    display: block;
  }

  body.has-mobile-bar {
    padding-bottom: 70px;
  }

  .whatsapp-float-btn {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 42px;
    height: 42px;
  }

  body.has-mobile-bar .whatsapp-float-btn {
    bottom: 5rem;
  }

  .whatsapp-float-btn svg {
    width: 23px;
    height: 23px;
  }

  .scroll-to-top {
    bottom: 1.2rem;
    left: 1.2rem;
    width: 38px;
    height: 38px;
  }

  body.has-mobile-bar .scroll-to-top {
    bottom: 5rem;
  }

  /* Force 1-column layouts on mobile for inline grid containers */
  .contact-layout-grid,
  .about-split-grid,
  .property-detail-grid,
  .responsive-grid-2,
  .form-row-2col,
  div[style*="grid-template-columns: 1fr 1.3fr"],
  div[style*="grid-template-columns: 1.8fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  div[style*="minmax(350px"] {
    grid-template-columns: 1fr !important;
  }

  /* Contact page form container padding on mobile */
  div[style*="padding:2.5rem"], div[style*="padding: 2.5rem"] {
    padding: 1.5rem 1rem !important;
  }
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

/* Extra Small Mobile Devices (< 480px) */
@media (max-width: 480px) {
  .navbar-inner {
    padding: 0 0.5rem;
  }

  .brand-logo img {
    height: 42px;
  }

  .header-ctas {
    gap: 0.4rem;
  }

  .header-ctas .btn-sm {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
  }

  .mobile-menu-toggle {
    padding: 0.2rem;
  }

  .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
  }

  /* Forms & Cards Padding on Extra Small Screens */
  div[style*="padding:3rem"], div[style*="padding: 3rem"] {
    padding: 1.5rem 1rem !important;
  }

  .main-image-box {
    height: 240px;
  }

  .hero-wrapper {
    padding: 8.5rem 0 3.5rem 0;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }
}

/* Global Mobile & Tablet Anti-Zoom System (<= 1024px) */
@media screen and (max-width: 1024px) {
  html, body, header, footer, main, section, div, nav {
    touch-action: pan-x pan-y !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  input,
  select,
  textarea,
  .form-control,
  .form-select {
    font-size: 16px !important; /* Forces 16px minimum on iOS & mobile to strictly disable focus zoom */
    touch-action: pan-x pan-y !important;
  }
}

/* Mobile Header & Headline Spacing Enhancements */
@media (max-width: 1024px) {
  body.page-home .hero-wrapper,
  .hero-wrapper {
    padding-top: 8.5rem !important;
  }

  header + section,
  header + main section:first-of-type,
  main > section:first-of-type,
  section.bg-dark-charcoal:first-of-type {
    padding-top: 3.5rem !important;
  }
}

@media (max-width: 767px) {
  body.page-home .hero-wrapper,
  .hero-wrapper {
    padding-top: 8.5rem !important;
    padding-bottom: 4rem !important;
  }

  header + section,
  header + main section:first-of-type,
  main > section:first-of-type,
  section.bg-dark-charcoal:first-of-type {
    padding-top: 3rem !important;
  }

  .hero-content h1,
  h1.heading-xl {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .breadcrumb-nav {
    margin-bottom: 0.75rem !important;
    padding-top: 0.25rem !important;
  }
}

@media (max-width: 480px) {
  body.page-home .hero-wrapper,
  .hero-wrapper {
    padding-top: 8.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  header + section,
  header + main section:first-of-type,
  main > section:first-of-type,
  section.bg-dark-charcoal:first-of-type {
    padding-top: 2.75rem !important;
  }

  .hero-content h1,
  h1.heading-xl {
    margin-top: 0.5rem !important;
    font-size: 1.75rem !important;
  }
}



