/* ==========================================================================
   EMAAR PROPERTIES - Mobile Responsive & Drawer Styles
   Precision Luxury UX, Fixed Header, Left Drawer, Balanced Typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Mobile Off-Canvas Drawer Navigation (SLIDES FROM LEFT)
   -------------------------------------------------------------------------- */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -320px; /* Hidden to the LEFT */
  right: auto;
  width: 295px;
  max-width: 82vw;
  height: 100%;
  background-color: #ffffff;
  z-index: 2999;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-drawer.active {
  left: 0; /* Slides into view from the LEFT */
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background-color: #ffffff;
}

.drawer-logo {
  height: 28px;
  width: auto;
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--color-secondary);
}

.drawer-menu {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  gap: 0.25rem;
}

.drawer-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.drawer-link:hover {
  color: var(--color-secondary);
  padding-left: 0.35rem;
}

.drawer-footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  background-color: #f9fafb;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   2. Search Modal Overlay
   -------------------------------------------------------------------------- */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 3500;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 2rem 1.5rem;
}

.search-modal-overlay.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  width: 100%;
  margin: 0 auto 1.5rem auto;
}

.search-modal-input-wrap {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.search-modal-input {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 2px;
}

.search-modal-input:focus {
  border-color: var(--color-secondary);
}

.search-results-box {
  max-width: 900px;
  width: 100%;
  margin: 1.5rem auto 0 auto;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-secondary);
}

.search-result-img {
  width: 80px;
  height: 54px;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   3. MOBILE SCREEN STYLES (< 768px) - Professional & Refined Typography
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  
  /* Header Fixation (Transparent 30% Opacity) & Left Menu Alignment */
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 62px !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05) !important;
    padding: 0 !important;
  }

  .site-header.scrolled {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
  }

  .header-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    height: 100%;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem !important;
  }

  .menu-toggle {
    display: flex !important;
    width: 20px !important;
    height: 14px !important;
    padding: 0;
  }

  .menu-toggle span {
    height: 2px;
  }

  .header-logo-svg {
    height: 26px !important;
    width: auto !important;
  }

  .header-actions {
    gap: 0.85rem !important;
  }

  .header-btn svg {
    width: 18px;
    height: 18px;
  }

  .lang-selector {
    font-size: 0.68rem !important;
    gap: 0.15rem;
  }

  /* Hero Section Mobile - 100% Full Height From Absolute Top to Phone Edge */
  .hero-section {
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
  }

  .hero-video-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
  }

  .hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.8) 100%) !important;
    z-index: 2 !important;
  }

  .hero-content {
    position: relative !important;
    z-index: 3 !important;
    padding: 68px 1.25rem 1.25rem 1.25rem !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .hero-badge {
    font-size: 0.6rem !important;
    letter-spacing: 0.16em !important;
    padding: 0.22rem 0.75rem !important;
    margin-bottom: 0.65rem !important;
    border-radius: 20px !important;
  }

  /* Refined, Elegant Mobile Hero Title */
  .hero-title {
    font-size: 1.45rem !important;
    line-height: 1.22 !important;
    letter-spacing: 0.03em !important;
    margin-bottom: 0.65rem !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7) !important;
  }

  /* Refined Mobile Hero Subtitle */
  .hero-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    max-width: 310px !important;
    margin: 0 auto 1rem auto !important;
  }

  .hero-actions {
    gap: 0.6rem !important;
    margin-bottom: 1rem !important;
  }

  .btn-primary, 
  .btn-outline-white {
    padding: 0.65rem 1.2rem !important;
    font-size: 0.66rem !important;
    letter-spacing: 0.12em !important;
  }

  /* Sound Toggle on Mobile */
  .hero-sound-wrapper {
    margin-top: 0.5rem !important;
  }

  .hero-sound-btn {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.12em !important;
  }

  /* Quick Search Filter Section Mobile - Generous Spacing From Fixed Header */
  .search-filter-section {
    padding-top: 2.25rem !important;
    padding-bottom: 2rem !important;
    scroll-margin-top: 76px !important;
  }

  .search-filter-bar {
    padding: 1.5rem 1.15rem !important;
    margin-top: 0.75rem !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  }

  .filter-grid {
    gap: 0.75rem !important;
  }

  .filter-group label {
    font-size: 0.65rem !important;
    margin-bottom: 0.25rem !important;
  }

  .filter-group select,
  .filter-group input {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  /* Stats Section Mobile (NEAT, UNCLUTTERED) */
  .stats-section {
    padding: 2.75rem 0 !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem 0.75rem !important;
  }

  .stat-item {
    padding: 0.4rem 0.25rem !important;
  }

  .stat-value {
    font-size: 1.6rem !important;
    line-height: 1.15 !important;
    margin-bottom: 0.25rem !important;
  }

  .stat-label {
    font-size: 0.64rem !important;
    letter-spacing: 0.1em !important;
    line-height: 1.35 !important;
  }

  /* Section Headers Mobile */
  .section-header {
    margin-bottom: 2.5rem !important;
  }

  .section-tag {
    font-size: 0.68rem !important;
    letter-spacing: 0.2em !important;
    margin-bottom: 0.4rem !important;
  }

  .section-title {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.5rem !important;
  }

  .section-desc {
    font-size: 0.84rem !important;
    line-height: 1.55 !important;
  }

  /* Communities Showcase Mobile */
  .communities-section {
    padding: 3rem 0 3.5rem 0 !important;
    scroll-margin-top: 76px !important;
  }

  .community-filter-tabs {
    gap: 0.4rem !important;
    margin-bottom: 1.75rem !important;
  }

  .tab-btn {
    padding: 0.4rem 0.9rem !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.1em !important;
  }

  .communities-grid {
    gap: 1.5rem !important;
  }

  .community-body {
    padding: 1.25rem !important;
  }

  .community-type {
    font-size: 0.65rem !important;
    margin-bottom: 0.2rem !important;
  }

  .community-title {
    font-size: 1.25rem !important;
    margin-bottom: 0.25rem !important;
  }

  .community-tagline {
    font-size: 0.78rem !important;
    margin-bottom: 0.6rem !important;
  }

  .community-desc {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
  }

  .price-amount {
    font-size: 0.95rem !important;
  }

  .btn-card-action {
    font-size: 0.7rem !important;
  }

  /* Launches Section Mobile */
  .launches-section {
    padding: 3rem 0 3.5rem 0 !important;
    scroll-margin-top: 76px !important;
  }

  .launches-grid {
    gap: 1.25rem !important;
  }

  .launch-body {
    padding: 1rem !important;
  }

  .launch-name {
    font-size: 1.15rem !important;
  }

  .launch-meta {
    font-size: 0.75rem !important;
    padding: 0.5rem 0 !important;
    gap: 0.2rem !important;
    margin-bottom: 0.75rem !important;
  }

  .launch-price {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* VR Tour Banner Mobile (Full Slide) */
  .vr-tour-banner {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 4.5rem 0 3rem 0 !important;
    scroll-snap-align: start !important;
    scroll-margin-top: 76px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .vr-tour-grid {
    gap: 1.75rem !important;
  }

  .vr-tour-banner h2 {
    font-size: 1.55rem !important;
    margin-bottom: 0.65rem !important;
  }

  .vr-tour-banner p {
    font-size: 0.82rem !important;
    margin-bottom: 1.25rem !important;
  }

  /* Sustainability Banner Mobile (Full Slide) */
  .sustainability-banner {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 4.5rem 0 3rem 0 !important;
    scroll-snap-align: start !important;
    scroll-margin-top: 76px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .sustainability-banner h2 {
    font-size: 1.55rem !important;
  }

  .esg-docs-box {
    padding: 1rem !important;
  }

  /* Blogs Section Mobile */
  .blogs-section {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 4.5rem 0 3rem 0 !important;
    scroll-snap-align: start !important;
    scroll-margin-top: 76px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .blog-title {
    font-size: 1.05rem !important;
  }

  .blog-excerpt {
    font-size: 0.82rem !important;
  }

  /* Subpage Hero Mobile Flow Behind 30% Header */
  .subpage-hero {
    padding-top: calc(62px + 2rem) !important;
    padding-bottom: 2.25rem !important;
    min-height: 38vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    scroll-snap-align: start !important;
  }

  .subpage-hero h1 {
    font-size: 1.75rem !important;
  }

  .subpage-hero p {
    font-size: 0.85rem !important;
  }

  /* Footer Mobile */
  .site-footer {
    padding-top: 2.5rem !important;
  }

  .footer-top {
    padding-bottom: 2rem !important;
  }

  .footer-brand-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
  }

  .newsletter-form {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .newsletter-btn {
    width: 100% !important;
  }

  .footer-links-section {
    padding: 2rem 0 !important;
  }

  .footer-col-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.78rem !important;
  }

  .footer-col-title::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 300;
    transition: transform 0.2s ease;
  }

  .footer-col-title.active::after {
    content: '−';
  }

  .footer-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-bottom 0.3s ease;
    margin-bottom: 0;
  }

  .footer-menu.active {
    max-height: 500px;
    margin-bottom: 1.25rem;
  }

  .footer-bottom {
    padding: 1.5rem 0 !important;
  }

  .footer-bottom-flex {
    text-align: center;
    gap: 0.75rem !important;
  }

  .footer-legal-links {
    justify-content: center !important;
    gap: 1rem !important;
  }

  /* Global Mobile Heading Bounds (Clean & Balanced Typography) */
  h1 {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
  }
  h2 {
    font-size: 1.45rem !important;
    line-height: 1.3 !important;
  }
  h3 {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }
}
