/* Desktop / Web View Video Visibility (min-width: 769px) */
@media (min-width: 769px) {
  .desktop-hero-video {
    display: block !important;
  }
  .mobile-hero-video {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal layout scrolling */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* ------------------------------------------------------------------------
     1. Header & Navigation (Mobile)
     ------------------------------------------------------------------------ */
  header .max-w-7xl {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  header a img {
    height: 2.25rem !important;
  }

  header a .font-heading {
    font-size: 1.15rem !important;
    line-height: 1.15 !important;
  }

  header a span.uppercase {
    letter-spacing: 0.25em !important;
    font-size: 7.5px !important;
  }

  /* Compact spacing between notification bell, profile & hamburger */
  header .flex.items-center.space-x-4,
  header .flex.items-center.space-x-2 {
    gap: 0.25rem !important;
  }

  header button#notification-bell-btn,
  header button#me-avatar-btn,
  header button#mobile-menu-btn {
    padding: 0.35rem !important;
  }

  header button#me-avatar-btn img {
    width: 2rem !important;
    height: 2rem !important;
  }

  /* Mobile Drawer Menu Smooth Styling */
  #mobile-menu {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(192, 18, 76, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #FCE4EC;
  }

  #mobile-menu a {
    padding: 0.65rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    display: block !important;
  }

  /* ------------------------------------------------------------------------
     2. Hero Section (Index & Inner Pages) - Mobile Video Fit & Overflow Fix
     ------------------------------------------------------------------------ */
  section.min-h-\[540px\],
  section.h-\[480px\],
  section.lg\:h-\[520px\],
  section[style*="cople.webp"] {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    height: auto !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Desktop/Mobile Video Visibility Toggle Rules */
  .desktop-hero-video {
    display: none !important;
  }

  .mobile-hero-video {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
  }

  section[style*="cople.webp"] {
    background-position: center center !important;
    background-size: cover !important;
  }

  /* Soften/reduce white gradient overlay on Mobile View Only */
  .hero-gradient-overlay {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.20) 45%, rgba(255, 255, 255, 0) 100%) !important;
    width: 100% !important;
  }

  /* Headline Text Sizing on Mobile */
  .font-decorative {
    font-size: 1.35rem !important;
    letter-spacing: 0.02em !important;
  }

  .font-script-calligraphic {
    font-size: 3.25rem !important;
    line-height: 1.1 !important;
    padding-top: 0.15rem !important;
  }

  /* CTA Buttons Responsiveness */
  .pt-1.flex.items-center.gap-2 {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .pt-1.flex.items-center.gap-2 button,
  .pt-1.flex.items-center.gap-2 a {
    font-size: 0.8rem !important;
    padding: 0.6rem 1.1rem !important;
  }

  /* More Than Matches Badge Right Alignment on Mobile */
  .block.md\:hidden.pt-1\.5 {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 0.5rem !important;
  }

  /* Stats Row below Hero on Mobile (Moved down to eliminate bottom video peeking) */
  .hero-stats-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.15rem !important;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
    background-color: #ffffff !important;
    border-top: 1px solid #FCE4EC !important;
    border-bottom: 1px solid #FCE4EC !important;
    margin-top: 2.25rem !important;
    margin-bottom: -1.5rem !important;
    margin-left: -0.75rem !important;
    margin-right: -0.75rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    width: calc(100% + 1.5rem) !important;
    max-width: none !important;
    position: relative !important;
    z-index: 30 !important;
    box-shadow: 0 4px 12px rgba(192, 18, 76, 0.06) !important;
  }

  /* ------------------------------------------------------------------------
     3. Cards, Sliders & Grids (Mobile)
     ------------------------------------------------------------------------ */
  #my-matches-card {
    margin-top: 1rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Search & Filter Grids */
  .grid-cols-1.md\:grid-cols-3,
  .grid-cols-1.lg\:grid-cols-4,
  .grid-cols-1.md\:grid-cols-2 {
    gap: 1rem !important;
  }

  /* Section Padding Adjustments */
  .max-w-7xl, .max-w-6xl, .max-w-4xl {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* ------------------------------------------------------------------------
     4. Modals & Popups (Mobile)
     ------------------------------------------------------------------------ */
  #create-profile-modal > div,
  #candidate-modal > div,
  #checkout-modal > div {
    max-height: 90vh !important;
    margin: 0.75rem !important;
    width: calc(100% - 1.5rem) !important;
    border-radius: 1.25rem !important;
    overflow-y: auto !important;
  }

  /* Stepper Progress bar inside Modal */
  #create-profile-modal form {
    padding: 1.25rem 1rem !important;
  }

  /* Mobile Horizontal Scroll Containers */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}
