/* ==========================================================================
   BSR SOLUTIONS - RESPONSIVE STYLES
   Mobile & Tablet Media Queries (Zero Mobile Horizontal Overflow)
   ========================================================================== */

/* Tablet & Smaller Desktops */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.6rem;
  }

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

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

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

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

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

  .contact-card-wrap {
    grid-template-columns: 1fr;
  }
}

/* Mobile & Tablet Devices (<= 768px) */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .nav-container {
    height: 4rem;
    width: 100%;
    max-width: 100%;
  }

  .brand-logo {
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-logo-img {
    height: 2.35rem;
    flex-shrink: 0;
  }

  .brand-name {
    font-size: 1.1rem;
    white-space: nowrap;
  }

  .brand-tagline {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide extra Schedule Visit button from navbar on mobile (already inside mobile menu & hero) */
  .nav-actions .btn-primary {
    display: none;
  }

  .nav-actions .btn-whatsapp span {
    display: none;
  }

  .nav-actions .btn-whatsapp {
    padding: 0.55rem;
    border-radius: var(--radius-full);
  }

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

  .nav-links {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    gap: 1.25rem;
    display: none;
    z-index: 1000;
  }

  .nav-links.open {
    display: flex;
  }

  /* Hero Section */
  .hero-section {
    padding: 3.5rem 0 4.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .hero-pill {
    max-width: 100%;
    white-space: normal;
    text-align: left;
    display: inline-flex;
    padding: 0.45rem 0.9rem;
    box-sizing: border-box;
  }

  .hero-pill span {
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .hero-title {
    font-size: 2rem;
    word-break: break-word;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .quick-search-box {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1.25rem;
    width: 100%;
    max-width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

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

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

  /* Filter Bar & Category Pills Horizontal Scroll Wrapper */
  .filter-bar-wrapper {
    padding: 1rem 0.85rem;
    max-width: 100%;
    overflow: hidden;
  }

  .filter-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .category-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    flex-shrink: 0;
  }

  .search-input-wrap {
    min-width: 100%;
    width: 100%;
  }

  .filter-row-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-secondary-group {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }

  /* Contact & Lead Capture Form */
  .contact-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .contact-card-wrap {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .contact-info-panel,
  .contact-form-panel {
    padding: 2rem 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .direct-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .direct-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .lead-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

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

  /* Footer */
  .footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    word-break: break-word;
  }

  /* Modals */
  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: 94vh;
  }

  .modal-hero-media,
  .modal-hero-img {
    height: 200px;
  }

  .bsr-carousel-arrow {
    opacity: 0.88;
  }

  .modal-body {
    padding: 1.25rem 1rem;
  }

  .modal-specs-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .modal-feature-list {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
    width: 100%;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .lead-modal-card {
    padding: 1.5rem 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .category-card {
    cursor: pointer;
  }

  /* Toast Notification */
  .toast-notice {
    right: 1rem;
    left: 1rem;
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
    bottom: 1.5rem;
  }
}

/* Small Smartphone Devices (<= 480px, e.g. 360px - 430px) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .brand-tagline {
    display: none;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .card-actions {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .card-actions .btn {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    justify-content: center;
  }

  .card-body {
    padding: 1rem 1.15rem;
  }

  .spec-val {
    font-size: 0.82rem;
  }
}
