/* ==============================================================================
   PRATAP SINHA REAL ESTATE & INFRASTRUCTURE - RESPONSIVE STYLESHEET
   Mobile-First & Adaptive Breakpoints for All Devices & Screen Orientations
   ============================================================================== */

/* -----------------------------------------------------------------------------
   1. LAPTOP & SMALL DESKTOP (992px to 1199px)
   ----------------------------------------------------------------------------- */
@media screen and (max-width: 1199px) {
  :root {
    --container-max: 960px;
  }

  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }
  
  .hero-title { font-size: 2.6rem; }
  
  .property-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
  }

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

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

  .property-details-layout {
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
  }
}

/* -----------------------------------------------------------------------------
   2. TABLET DEVICES & SMALL LAPTOPS (768px to 991px)
   ----------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  :root {
    --container-max: 720px;
    --header-height: 70px;
  }

  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }

  .section-padding { padding: 3.5rem 0; }
  .section-padding-sm { padding: 2.25rem 0; }

  /* Navigation Drawer for Tablet/Mobile */
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.75rem 2rem 1.75rem;
    gap: 0.5rem;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
  }

  .nav-link:hover, .nav-link.active {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .nav-link::after {
    display: none;
  }

  .nav-item-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
    background: #F8FAFC;
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
  }

  .nav-item-dropdown.active .dropdown-menu {
    display: block;
  }

  .header-actions .btn, .header-actions .btn-header-cta {
    display: none;
  }

  .hero-section {
    padding: 3rem 0 4.5rem 0;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-desc {
    font-size: 1.05rem;
  }

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

  .property-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

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

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

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

  .sticky-sidebar {
    position: static;
  }

  .details-header-row {
    flex-direction: column;
    gap: 1rem;
  }

  .details-price-box {
    text-align: left;
  }

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

/* -----------------------------------------------------------------------------
   3. MOBILE PHONES (< 768px)
   ----------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
  :root {
    --container-max: 100%;
    --header-height: 64px;
  }

  /* Prevent iOS zoom on input focus */
  input, select, textarea, button {
    font-size: 16px !important;
  }

  .container {
    padding: 0 1rem;
  }

  .topbar {
    display: none; /* Streamline mobile viewport */
  }

  .main-header {
    height: 64px;
  }

  .brand-logo {
    height: 40px;
  }

  h1 { font-size: 1.85rem; line-height: 1.25; }
  h2 { font-size: 1.5rem; line-height: 1.3; }
  h3 { font-size: 1.25rem; }

  .section-padding { padding: 2.75rem 0; }
  .section-padding-sm { padding: 1.75rem 0; }

  .section-header {
    margin-bottom: 2rem;
  }

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

  .section-subtitle {
    font-size: 0.95rem;
  }

  /* Hero Section */
  .hero-section {
    padding: 2.25rem 0 3.5rem 0;
    min-height: auto;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-desc {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }

  /* Search Engine Box */
  .search-box-wrapper {
    padding: 1.25rem 1rem;
    margin-top: -1.25rem;
    border-radius: var(--radius-md);
  }

  .search-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .search-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .search-tab-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* Property Cards & Catalog */
  .property-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .property-card {
    border-radius: var(--radius-md);
  }

  .card-image-wrap {
    height: 200px;
  }

  .card-body {
    padding: 1.25rem;
  }

  .card-price {
    font-size: 1.4rem;
  }

  .card-specs-row {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

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

  .card-actions .btn {
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
  }

  /* Category Grid */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .category-card {
    padding: 1.25rem 0.75rem;
  }

  .category-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .category-card h3 {
    font-size: 1rem;
  }

  .category-card p {
    font-size: 0.8rem;
    display: none; /* Compact display on mobile */
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-card {
    padding: 1.5rem 1.25rem;
  }

  /* Property Details Single Page */
  .gallery-main {
    height: 260px;
    border-radius: var(--radius-md);
  }

  .gallery-thumbnails {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 4px;
    margin-top: 0.5rem;
  }

  .gallery-thumb {
    flex: 0 0 75px;
    height: 60px;
    border-radius: var(--radius-sm);
  }

  .specs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .spec-item {
    padding: 0.75rem;
  }

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

  .amenities-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .amenity-pill {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Calculators */
  .calc-breakdown-row {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    text-align: center;
  }

  .calc-emi-val {
    font-size: 2.2rem;
  }

  /* Modals */
  .modal-card {
    width: 95%;
    max-width: 95%;
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-md);
    max-height: 90vh;
    overflow-y: auto;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1.25rem 0;
  }

  /* ---------------------------------------------------------------------------
     STICKY MOBILE BOTTOM ACTION BAR (Property Details Page)
     --------------------------------------------------------------------------- */
  .mobile-sticky-action-bar {
    display: grid;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.18);
    padding: 0.65rem 0.75rem;
    z-index: 998;
    border-top: 1px solid var(--border);
    grid-template-columns: 1fr 1.3fr 1.3fr;
    gap: 0.5rem;
  }

  .mobile-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
  }

  .mobile-bar-call {
    background: #F1F5F9;
    color: var(--primary);
    border: 1px solid #CBD5E1;
  }

  .mobile-bar-whatsapp {
    background: #25D366;
    color: #ffffff;
  }

  .mobile-bar-enquire {
    background: var(--primary);
    color: var(--accent);
    border: none;
  }

  /* Body offset when mobile bottom bar is active */
  body.has-mobile-bottom-bar {
    padding-bottom: 70px;
  }

  /* Mobile Backdrop Overlay */
  .mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 35, 64, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
  }

  .mobile-backdrop.active {
    display: block;
  }
}

/* -----------------------------------------------------------------------------
   4. SMALL MOBILE SCREENS (< 480px)
   ----------------------------------------------------------------------------- */
@media screen and (max-width: 480px) {
  .brand-logo {
    height: 36px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

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

  .category-card p {
    display: block;
  }

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

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

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

  .mobile-bar-btn span {
    font-size: 0.8rem;
  }
}
