/* ==========================================================================
   Paradise Realty - Ultra Mobile-First Responsive Stylesheet
   Optimized for Smartphones (iOS Safari / Android Chrome) & Tablets
   ========================================================================== */

/* Global Mobile Fixes */
@media (max-width: 1024px) {
  .hero-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  
  .about-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-img-main {
    height: 380px;
  }
  
  .about-floating-card {
    right: 15px;
    bottom: -15px;
  }
  
  .quick-filter-card {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-filter-card .btn {
    grid-column: span 2;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .contact-split {
    grid-template-columns: 1fr;
  }
}

/* Tablets & Mobile Devices (Max 768px) */
@media (max-width: 768px) {
  /* Prevent iOS zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  body.menu-open {
    overflow: hidden;
  }

  /* Backdrop Overlay for mobile drawer */
  .menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
  }

  body.menu-open .menu-backdrop {
    display: block;
  }

  /* Streamlined Header */
  .topbar {
    display: none; /* Hide top utility bar on mobile to preserve viewport space */
  }

  .main-header {
    padding: 6px 0;
  }

  .nav-container {
    padding: 10px 18px;
  }

  .logo-symbol {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .logo-title {
    font-size: 1.2rem;
  }

  .logo-tagline {
    font-size: 0.65rem;
  }

  /* Slide-in Mobile Drawer Navigation */
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 70px 24px 30px;
    gap: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    overflow-y: auto;
    border-right: 1px solid var(--border-subtle);
  }

  .nav-menu.open {
    left: 0;
  }

  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

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

  .nav-link.active, .nav-link:active {
    color: var(--color-primary-light);
    font-weight: 700;
  }

  /* Mobile Nav Drawer Quick Contacts */
  .mobile-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px dashed var(--border-subtle);
  }

  .mobile-drawer-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
  }

  /* Animated Hamburger Toggle */
  .mobile-toggle {
    display: block;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-sage-tint);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    z-index: 1002;
  }

  .mobile-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--color-primary);
    margin: 2.5px 0;
    transition: var(--transition);
    border-radius: 2px;
  }

  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  /* Hero Section on Mobile Phones */
  .hero-slider-section {
    min-height: 82vh;
    min-height: 82dvh;
    padding-top: 20px;
  }

  .hero-content-wrapper {
    padding: 30px 0 60px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(1.85rem, 6.5vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 16px;
  }

  .hero-description {
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.98rem;
  }

  .hero-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 18px;
  }

  .stat-item h4 {
    font-size: 1.4rem;
  }

  .stat-item p {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* Mobile Slider Arrows */
  .slider-arrow {
    width: 42px;
    height: 42px;
    background: rgba(18, 27, 36, 0.45);
  }

  .slider-arrow.prev { left: 8px; }
  .slider-arrow.next { right: 8px; }

  .slider-dots {
    bottom: 16px;
  }

  /* Search & Filter Card */
  .quick-filter-section {
    margin-top: -25px;
    margin-bottom: 40px;
    padding: 0 16px;
  }

  .quick-filter-card {
    grid-template-columns: 1fr;
    padding: 20px 18px;
    gap: 14px;
    box-shadow: var(--shadow-md);
  }

  .quick-filter-card .btn {
    grid-column: span 1;
    width: 100%;
    margin-top: 6px;
  }

  /* Section Padding on Mobile */
  .section {
    padding: 55px 0;
  }

  .section-header {
    margin-bottom: 35px;
  }

  .section-header h2 {
    font-size: 1.65rem;
    margin-bottom: 12px;
  }

  .section-header p {
    font-size: 0.94rem;
  }

  /* Grids & Cards */
  .property-grid, .blog-grid, .testimonial-grid, .location-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .property-img-wrapper {
    height: 210px;
  }

  .property-content {
    padding: 20px 18px;
  }

  .property-title {
    font-size: 1.18rem;
  }

  .property-features {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    font-size: 0.78rem;
  }

  .property-card-actions {
    flex-direction: column;
    gap: 8px;
  }

  .property-card-actions .btn {
    width: 100%;
  }

  /* About Section on Mobile */
  .about-split {
    gap: 32px;
  }

  .about-img-main {
    height: 280px;
    border-radius: var(--radius-md);
  }

  .about-floating-card {
    position: static;
    margin-top: 16px;
    max-width: 100%;
    text-align: center;
  }

  .about-features-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .about-content > div[style*="display: flex"] {
    flex-direction: column;
    width: 100%;
  }

  .about-content > div[style*="display: flex"] .btn {
    width: 100%;
  }

  /* Contact Section */
  .contact-split {
    border-radius: var(--radius-md);
  }

  .contact-info-panel, .contact-form-panel {
    padding: 26px 18px;
  }

  .contact-info-panel h3 {
    font-size: 1.45rem;
  }

  .contact-list {
    gap: 16px;
  }

  .contact-form-panel div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .map-container {
    height: 280px;
    margin-top: 24px;
  }

  /* Inner Hero Subpages */
  .inner-hero {
    padding: 45px 0 35px;
  }

  .inner-hero h1 {
    font-size: 1.75rem;
  }

  .inner-hero p {
    font-size: 0.98rem;
  }

  .content-card {
    padding: 24px 18px !important;
  }

  /* Data Tables Mobile Swipe Cue */
  .data-table-wrapper {
    margin: 20px 0;
    box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
  }

  .data-table th, .data-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* FAQ Accordion Mobile Touch */
  .faq-question {
    padding: 15px 16px;
    font-size: 0.98rem;
    gap: 10px;
  }

  .faq-answer {
    padding: 0 16px;
    font-size: 0.9rem;
  }

  /* Footer Mobile */
  .footer {
    padding: 50px 0 90px; /* Extra bottom padding so floating CTA doesn't cover footer text */
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Floating WhatsApp Button for Mobile */
  .whatsapp-float-container {
    bottom: 22px;
    right: 18px;
  }

  .whatsapp-btn {
    width: 56px;
    height: 56px;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
  }

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

  .whatsapp-tooltip {
    display: none; /* Keep mobile viewport uncluttered */
  }

  /* Sticky Mobile App-Like Bottom Quick Action Bar */
  .mobile-bottom-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 16px rgba(18, 27, 36, 0.12);
    z-index: 9990;
    padding: 8px 12px;
    gap: 10px;
  }

  .mobile-bar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
  }

  .mobile-bar-call {
    background: var(--color-primary);
    color: #FFFFFF;
  }

  .mobile-bar-call:active {
    background: var(--color-primary-light);
  }

  .mobile-bar-wa {
    background: #25D366;
    color: #FFFFFF;
  }

  .mobile-bar-wa:active {
    background: #1EBE5B;
  }

  /* Adjust WhatsApp floating icon position above mobile bar */
  .whatsapp-float-container {
    bottom: 70px;
    right: 16px;
  }
}

/* Hide mobile bottom action bar on desktop */
@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none;
  }
  .menu-backdrop {
    display: none !important;
  }
}

/* Small Smartphone Tweaks (< 380px iPhone SE / Fold) */
@media (max-width: 380px) {
  .hero-stats-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .logo-title {
    font-size: 1.05rem;
  }
  
  .property-features {
    grid-template-columns: 1fr 1fr;
  }
}
