/* ==========================================================================
   Luxury Dating — Responsive & Mobile Optimization Stylesheet
   Breakpoints: Mobile (<768px), Tablet (768px-1024px), Desktop (>1024px)
   ========================================================================== */

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 380px;
  height: 100vh;
  background-color: var(--bg-primary);
  border-left: 1px solid var(--border-subtle);
  z-index: 1500;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 30px 24px;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
}

.mobile-nav-links a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  padding: 6px 0;
}

.mobile-drawer-cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(28, 25, 23, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1400;
  display: none;
}

.mobile-drawer-backdrop.active {
  display: block;
}

/* Sticky Bottom Mobile Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 20px;
  z-index: 999;
  box-shadow: 0 -4px 16px rgba(28, 25, 23, 0.06);
}

.mobile-bottom-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .clusters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .entity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  body {
    padding-bottom: 70px; /* Space for bottom mobile bar */
  }

  .mobile-bottom-bar {
    display: block;
  }

  .nav-desktop, .header-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .hero-img {
    height: 380px;
  }

  .hero-floating-card {
    position: static;
    margin-top: 16px;
    max-width: 100%;
  }

  .lead-box-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .values-list {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .profiles-grid {
    grid-template-columns: 1fr;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .clusters-grid {
    grid-template-columns: 1fr;
  }

  .entity-grid {
    grid-template-columns: 1fr;
  }

  .safety-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .modal-dialog {
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  .wizard-header, .wizard-body, .wizard-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  .form-input, .form-select, .form-textarea, .article-search-input {
    font-size: 16px !important;
  }

  /* Touch-friendly horizontal swipeable category pills & filter bars */
  .category-pills-bar, .profiles-filter-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px !important;
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    scrollbar-width: none !important;
  }

  .category-pills-bar::-webkit-scrollbar, .profiles-filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .category-pill, .filter-btn {
    flex-shrink: 0 !important;
    scroll-snap-align: start;
  }

  /* Safe Area Insets for modern bezel-less smartphones (iPhone, Galaxy) */
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .mobile-bottom-bar {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Improved Touch Targets */
  .btn {
    min-height: 48px;
  }

  .modal-close-btn, .reader-close-btn {
    width: 44px;
    height: 44px;
    top: 12px;
    right: 12px;
  }

  /* Table Scroll Cue on Mobile */
  .table-scroll-cue-wrapper {
    display: block;
    text-align: center;
    margin-bottom: 14px;
  }

  .table-scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--gold-hover);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--gold-light);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--gold-border);
    box-shadow: var(--shadow-sm);
  }

  /* Back-to-Top Safe Area Adjustment on Mobile */
  .back-to-top-btn {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
  }
}

/* Hide Table Scroll Cue by default on Desktop */
.table-scroll-cue-wrapper {
  display: none;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
