/* ============================================
   Mobile-First Responsive Design
   Best-in-Class Mobile Experience
   ============================================ */

/* IMPORTANT: All mobile styles are scoped to max-width: 767.98px */
/* Desktop styles (768px+) are NOT affected by this file */

/* Mobile Base Styles (320px - 767px) */
@media (max-width: 767.98px) {
  /* Typography - Mobile Optimized */
  html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
  }

  h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.3 !important;
  }

  h3 {
    font-size: clamp(1.25rem, 5vw, 1.5rem) !important;
  }

  p {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Hero Section - Mobile */
  .hero {
    padding: 2rem 0 3rem !important;
    min-height: auto !important;
  }

  .hero__container {
    padding: 0 1rem !important;
  }

  .hero__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .hero__content {
    text-align: center;
    padding: 0 !important;
  }

  .hero__badge {
    font-size: 0.75rem !important;
    padding: 0.375rem 0.75rem !important;
    margin-bottom: 1rem !important;
  }

  .hero__title-main {
    font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    margin-bottom: 0.5rem !important;
  }

  .hero__title-sub {
    font-size: clamp(1.125rem, 5vw, 1.5rem) !important;
  }

  .hero__subtitle {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
    padding: 0 !important;
  }
  
  .hero__subtitle-mobile {
    display: block !important;
    font-size: 1.125rem !important;
    line-height: 1.7 !important;
  }
  
  .hero__subtitle-desktop {
    display: none !important;
  }
  
  .hero__title-main {
    margin-top: 0 !important;
    font-weight: 900 !important;
  }

  .hero__actions {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .hero__actions .btn {
    width: 100% !important;
    padding: 1.125rem 2rem !important;
    font-size: 1.125rem !important;
    justify-content: center !important;
    min-height: 56px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25) !important;
  }
  
  .hero__actions .btn:hover {
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4) !important;
  }
  
  .hero__cta-subtext {
    font-size: 0.8125rem !important;
    margin-top: 0.5rem !important;
  }
  
  .hero__actions {
    margin-top: 1.5rem !important;
  }
  
  .hero__features-text {
    flex-wrap: wrap !important;
    gap: 1rem !important;
    font-size: 0.8125rem !important;
  }
  
  .value-bullet--primary {
    font-size: 1rem !important;
  }
  
  .value-bullet--secondary {
    font-size: 0.8125rem !important;
  }
  
  .value-bullet--mobile-hidden {
    display: none !important;
  }
  
  .value-bullet--mobile-inline {
    display: block !important;
    font-size: 0.875rem !important;
    color: #64748B !important;
    padding-right: 0 !important;
  }
  
  .value-bullet--mobile-inline::before {
    display: none !important;
  }
  
  .stat-item--mobile-hidden {
    display: none !important;
  }
  
  .stat-item--mobile-primary {
    display: block !important;
  }
  
  .hero__stats {
    justify-content: center !important;
  }
  
  /* Hide WhatsApp button in hero section on mobile */
  .whatsapp-float {
    display: none !important;
  }

  .hero__stats {
    flex-direction: column !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
  }

  .stat-item {
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem !important;
  }

  .stat-number {
    font-size: 1.75rem !important;
  }

  .stat-label {
    font-size: 0.875rem !important;
  }

  /* Hero Container - Prevent Overflow */
  .hero__container,
  .hero__container.container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .hero__grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .hero__visual {
    order: -1 !important;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .hero__illustration {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.375rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .illustration-card {
    padding: 0.5rem 0.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    min-height: auto !important;
  }

  .card-icon-wrapper {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 0.5rem !important;
  }

  .card-icon {
    font-size: 1.5rem !important;
    line-height: 1 !important;
  }

  .illustration-card h3 {
    font-size: 0.6875rem !important;
    margin-bottom: 0.125rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }

  .illustration-card p {
    font-size: 0.625rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    opacity: 0.9 !important;
  }


  /* Trust Section - Mobile */
  .trust-section {
    padding: 1.5rem 0 !important;
  }

  .trust-items {
    flex-direction: column !important;
    gap: 1rem !important;
    padding: 0 1rem !important;
  }

  .trust-item {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.75rem !important;
    background: white !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  }

  /* Features Section - Mobile */
  .features__grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 1rem !important;
  }

  .feature-card {
    padding: 1.5rem !important;
  }

  .feature-card__icon {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 1rem !important;
  }

  .feature-card__icon svg {
    width: 24px !important;
    height: 24px !important;
  }

  .feature-card__title {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }

  .feature-card__text {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
  }

  /* Benefits Section - Mobile */
  .benefits__grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    padding: 0 1rem !important;
  }

  .benefit-card {
    padding: 1.5rem !important;
  }

  .benefit-card__icon {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }

  .benefit-card__title {
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
  }

  .benefit-card__text {
    font-size: 0.9375rem !important;
  }

  /* Steps Section - Mobile */
  .steps {
    flex-direction: column !important;
    gap: 2rem !important;
    padding: 0 1rem !important;
  }

  .step {
    text-align: center !important;
    padding: 1.5rem !important;
  }

  .step__number {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.5rem !important;
    margin: 0 auto 1rem !important;
  }

  .step__title {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }

  .step__text {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
  }

  /* Section Headers - Mobile */
  .section {
    padding: 3rem 0 !important;
  }

  /* Positioning section removed */

  .benefits.section {
    padding-top: 4rem !important;
  }

  .how-it-works.section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .advantages.section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .section__header {
    text-align: center !important;
    padding: 0 1rem !important;
    margin-bottom: 2rem !important;
  }

  .section__title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    margin-bottom: 0.75rem !important;
  }

  .section__subtitle {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    padding: 0 !important;
  }

  .section__actions {
    padding: 0 1rem !important;
  }

  .section__actions .btn {
    width: 100% !important;
  }

  /* CTA Section - Mobile */
  .final-cta {
    padding: 3rem 1rem !important;
    text-align: center !important;
  }

  .final-cta__title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    margin-bottom: 1rem !important;
  }

  .final-cta__subtitle {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  .final-cta__actions {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

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

  /* Navigation - Mobile */
  .navbar {
    padding: 0.75rem 1rem !important;
  }

  /* Flex order: toggler left, brand right (RTL), collapse below */
  .navbar-mobile-container {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
  }

  /* RTL: order 1 = right (main-start), order 2 = left. Toggler left, brand right. */
  .navbar .navbar-brand {
    order: 1;
    margin-right: 0 !important;
    margin-left: auto !important; /* Push brand to the right */
  }

  .navbar .navbar-toggler,
  .navbar .nav-toggler-mobile {
    order: 2;
    margin-left: 0 !important;
    margin-right: auto !important; /* Toggler on the left */
  }

  .navbar .navbar-collapse {
    order: 3 !important;
    flex-basis: 100% !important;
    flex-grow: 1 !important;
  }

  .navbar-collapse {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
  }

  .navbar-brand {
    font-size: 1.125rem !important;
    display: flex !important;
    align-items: center !important;
  }

  .navbar-logo {
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
  }

  .navbar-brand-text {
    display: none !important;
  }

  .navbar-nav {
    margin-top: 1rem !important;
    width: 100% !important;
    text-align: right !important; /* RTL-friendly */
  }

  .navbar-nav .nav-item {
    width: 100% !important;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #0F172A !important;
  }

  .navbar-nav .nav-link:last-child {
    border-bottom: none !important;
  }

  .navbar-nav .btn,
  .navbar-nav .btn--primary {
    width: 100% !important;
    margin: 0.5rem 0 !important;
    text-align: center !important;
    background-color: #F97316 !important;
    color: #FFFFFF !important;
    border-color: #F97316 !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 700 !important;
  }

  /* Keep the top-bar login CTA compact on mobile */
  .nav-login-cta.d-lg-none {
    padding: 0.5rem 0.9rem !important;
    font-size: 0.95rem !important;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25) !important;
  }
  
  .navbar-nav .btn:hover,
  .navbar-nav .btn--primary:hover {
    background-color: #E67A0F !important;
    border-color: #E67A0F !important;
  }

  .dropdown-menu {
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: #f9fafb !important;
    margin-top: 0.5rem !important;
  }

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

  .footer-title {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  .footer-logo {
    height: 28px !important;
  }

  .footer-heading {
    font-size: 1rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  .footer-links {
    margin-bottom: 1rem !important;
  }

  .footer-links li {
    margin-bottom: 0.5rem !important;
  }

  .footer-copyright {
    text-align: center !important;
    margin-top: 1rem !important;
  }

  /* Buttons - Mobile Touch Targets */
  .btn {
    min-height: 44px !important; /* iOS touch target minimum */
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2) !important;
  }

  .btn--lg {
    min-height: 48px !important;
    padding: 0.875rem 2rem !important;
    font-size: 1.0625rem !important;
  }

  /* Forms - Mobile */
  .form-control,
  .form-select {
    min-height: 44px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 0.75rem 1rem !important;
  }

  /* Cards - Mobile */
  .card,
  .feature-card,
  .benefit-card {
    border-radius: 1rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  }

  /* Container - Mobile */
  .container,
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Page Hero - Mobile (for About, Features, Contact) */
  .page-hero {
    padding: 2.5rem 1rem !important;
  }

  .page-hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
  }

  .page-hero__subtitle {
    font-size: 1rem !important;
  }

  /* Feature Detail Grid - Mobile */
  .feature-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 1rem !important;
  }

  .feature-detail-card {
    padding: 1.5rem !important;
  }

  /* Contact Form - Mobile */
  .contact-card {
    padding: 1.5rem !important;
  }

  .contact-info-card {
    margin-bottom: 1rem !important;
  }

  /* About Section - Mobile */
  .about-section {
    margin-bottom: 2rem !important;
  }

  .features-list {
    gap: 1rem !important;
  }

  .feature-item {
    flex-direction: column !important;
    text-align: center !important;
    padding: 1.25rem !important;
  }

  /* Smooth Scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  /* Ensure all containers respect viewport - MOBILE ONLY */
  .container,
  .container-fluid {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Hero specific fixes - MOBILE ONLY */
  .hero {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .noga-landing {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
}

/* Desktop styles - ensure they're not affected by mobile CSS */
@media (min-width: 768px) {
  .hero__container,
  .hero__container.container-fluid {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
  }

  .hero__grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3rem !important;
    align-items: center !important;
  }

  .hero__illustration {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  .illustration-card {
    width: 100% !important;
    padding: 2rem !important;
  }

  /* Image optimization */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Remove hover effects on mobile */
  *:hover {
    transition: none !important;
  }

  /* Better tap targets */
  a, button, input, select, textarea {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
  }
}

/* Small Mobile (320px - 374px) */
@media (max-width: 374px) {
  .hero__title-main {
    font-size: 1.5rem !important;
  }

  .section__title {
    font-size: 1.375rem !important;
  }

  .btn {
    font-size: 0.9375rem !important;
    padding: 0.625rem 1.25rem !important;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero__grid {
    grid-template-columns: 1fr !important;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .benefits__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Landscape Mobile (568px - 767px) */
@media (min-width: 568px) and (max-width: 767.98px) and (orientation: landscape) {
  .hero {
    padding: 1.5rem 0 2rem !important;
  }

  .hero__stats {
    flex-direction: row !important;
    justify-content: center !important;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  /* Can add dark mode styles here if needed */
}

/* Increase font sizes in noga-showcase__right on mobile */
@media (max-width: 640px) {
  .noga-showcase__right-title {
    font-size: 1.5rem !important;
  }
  
  .noga-showcase__benefit h4 {
    font-size: 1.125rem !important;
  }
  
  .noga-showcase__benefit p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
}

/* Reduced Motion */
@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;
  }
}

