/* ========================================
   RESPONSIVE LAYOUTS - MEDIA QUERIES
   This file contains all responsive media queries for layouts including:
   - Large tablets and small desktops (max-width: 1024px)
   - Tablets and desktop layouts (min-width: 769px)
   - Large screens (min-width: 1024px)
   - Tablets and mobile landscape (max-width: 768px)
   - Mobile portrait (max-width: 480px)
   - Small mobile portrait (max-width: 375px)
   - Specific screen sizes (390px)
   ======================================== */

/* ==================== RESPONSIVE STYLES ==================== */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .features-container {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }

  .main-title,
  .features-title,
  .analytics-title,
  .community-title {
    font-size: 3.5rem;
  }
}

/* TABLETS AND DESKTOP (from 769px) */
@media (min-width: 769px) {
  .hero-section .features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    text-align: left;
    gap: 40px 80px;
  }

  .hero-section .phone-section {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .hero-section .content-section {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-section .signup-section-wrapper {
    grid-column: 2;
    grid-row: 2;
  }

  .hero-section .signup-section {
    width: 100%;
  }

  .hero-section .mobile-join-button {
    display: none;
  }

  .hero-section .launch-badge {
    display: inline-block;
  }

  .hero-section .content-section .stats-grid {
    display: grid;
  }

  .hero-section .signup-section .stats-grid {
    display: none;
  }
}

/* LARGE SCREENS (from 1024px) */
@media (min-width: 1024px) {
  .hero-section .features-container {
    gap: 60px 80px;
    padding: 0 60px;
  }
}

/* Tablets and Mobile Landscape */
@media (max-width: 768px) {
  .features-container {
    padding: 0 30px;
    gap: 60px;
  }

  .container {
    padding: 0 30px;
    gap: 60px;
  }

  .content-section,
  .features-content,
  .analytics-content {
    margin-block: 20px;
  }

  .community-content {
    margin-block: 20px !important;
  }

  .main-title,
  .features-title,
  .analytics-title,
  .community-title {
    font-size: 3.2rem;
    text-align: center;
  }

  .subtitle,
  .features-subtitle,
  .analytics-subtitle,
  .community-subtitle {
    font-size: 1.2rem;
    text-align: center;
    margin: 40px 20px;
  }

  .hero-section .main-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
  }

  .hero-section .subtitle {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
  }

  .hero-section {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    height: auto;
    padding: 15px 0;
    overflow: visible;
  }

  .hero-section .features-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 0 15px;
    margin: 0;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .hero-section .phone-section {
    order: 1;
    margin-bottom: 30px;
  }

  .hero-section .content-section {
    order: 2;
    max-width: 100%;
    padding: 0 10px;
  }

  .hero-section .mobile-join-button {
    order: 3;
  }

  .hero-section .signup-section-wrapper {
    order: 4;
    width: 100%;
    margin-block: 40px;
  }

  .hero-section .content-section .stats-grid {
    display: none;
  }

   .signup-section .stats-grid {
    display: grid;
    margin-top: 20px;
  }

  .video-section {
    padding: 20px 0;
  }

  .video-container-center {
    padding: 0 30px;
    gap: 35px;
  }

  .video-content-center {
    margin-bottom: 15px;
  }

  /* ==================== UNIFIED MOBILE LAYOUT: PHONE → TEXT ==================== */
  /* All sections follow same pattern: phone first, content second */

  /* Base rule for ALL features sections */
  .features-section .features-container,
  .ai-features-section .features-container,
  .premium-store-section .features-container,
  .get-paid-section .features-container,
  .community-section .features-container,
  .analytics-section .features-container {
    display: flex;
    flex-direction: column;
  }

  /* Phone always first (order: 1) */
  .features-section .phone-section,
  .ai-features-section .phone-section,
  .premium-store-section .phone-section,
  .get-paid-section .phone-section,
  .community-section .phone-section,
  .analytics-section .phone-section {
    order: 1;
    margin-bottom: 20px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  /* Content always second (order: 2) */
  .features-section .features-content,
  .ai-features-section .features-content,
  .premium-store-section .community-content,
  .get-paid-section .analytics-content,
  .community-section .community-content,
  .analytics-section .analytics-content,
  .features-section .analytics-content,
  .features-section .community-content {
    order: 2;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
  }

  /* Smooth padding between sections */
  .features-section,
  .ai-features-section,
  .premium-store-section,
  .get-paid-section,
  .community-section,
  .analytics-section {
    position: relative;
  }

  /* Ensure content is above blend layers */
  .features-section .features-container,
  .ai-features-section .features-container,
  .premium-store-section .features-container,
  .get-paid-section .features-container,
  .community-section .features-container,
  .analytics-section .features-container {
    position: relative;
    z-index: 2;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .features-container {
    padding: 0 25px;
    gap: 50px;
  }

  .main-title,
  .features-title,
  .analytics-title,
  .community-title {
    font-size: 2.8rem;
  }

  .subtitle,
  .features-subtitle,
  .analytics-subtitle,
  .community-subtitle {
    font-size: 1.1rem;
    margin: 30px 15px;
  }

  .hero-section .main-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    line-height: 1.2;
  }

  .hero-section .subtitle {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
  }

  .hero-section {
    padding: 20px 0 30px 0;
  }

  .hero-section .features-container {
    gap: 20px;
    padding: 0 20px;
  }

  .hero-section .signup-section {
    margin-top: 0;
  }

  .video-section {
    padding: 20px 0;
  }

  .video-container-center {
    padding: 0 15px;
    gap: 25px;
  }

  .video-content-center {
    margin-bottom: 10px;
  }

  /* Community Section - App Store Buttons Mobile Styles (like social.css) */
  .community-section .app-store-buttons {
    flex-direction: row !important;
    gap: 10px !important;
    justify-content: center;
    max-width: 100%;
    margin-top: 25px !important;
  }

  .community-section .app-store-btn {
    flex: 1;
    min-width: 0;
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  .community-section .btn-icon {
    font-size: 24px !important;
  }

  .community-section .btn-subtitle {
    font-size: 8px !important;
  }

  .community-section .btn-title {
    font-size: 14px !important;
  }

  .community-section .community-title {
    font-size: 2rem !important;
    margin-bottom: 15px !important;
  }

  .community-section .community-subtitle {
    font-size: 0.95rem !important;
    margin-bottom: 20px !important;
  }
}

/* Small Mobile Portrait */
@media (max-width: 375px) {
  .features-container {
    padding: 0 20px;
    gap: 40px;
  }

  .main-title,
  .features-title,
  .analytics-title,
  .community-title {
    font-size: 2.5rem;
  }

  .subtitle,
  .features-subtitle,
  .analytics-subtitle,
  .community-subtitle {
    font-size: 1rem;
    margin: 25px 10px;
  }

  .hero-section .main-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .hero-section .subtitle {
    font-size: 0.85rem;
    margin-bottom: 20px;
    font-weight: 500;
  }

  .hero-section {
    padding: 8px 0;
  }

  .hero-section .features-container {
    gap: 8px;
    padding: 0 8px;
    margin-bottom: 50px;
  }

  .video-section {
    padding: 50px 0;
  }

  .video-container-center {
    padding: 0 10px;
    gap: 20px;
  }

  .video-content-center {
    margin-bottom: 5px;
  }
}

/* 390px Screens */
@media (max-width: 390px) and (min-width: 376px) {
  .hero-section .main-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .hero-section .subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 500;
  }

  .hero-section {
    padding: 10px 0;
  }

  .hero-section .features-container {
    gap: 10px;
    padding: 0 12px;
    margin-bottom: 50px;
  }

  .video-section {
    padding: 55px 0;
  }

  .video-container-center {
    padding: 0 12px;
    gap: 22px;
  }

  .video-content-center {
    margin-bottom: 8px;
  }
}
