/* ===== MOBILE OPTIMIZATION ===== */

/* Enhanced Mobile Navbar */
@media (max-width: 768px) {
  .navbar {
    padding: 0.3rem 0;
    backdrop-filter: blur(20px);
  }
  
  .nav-container {
    padding: 0 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
  }
  
  .nav-logo img {
    height: 28px;
    width: auto;
  }
  
  /* Hide navigation menu on mobile */
  .nav-menu {
    display: none;
  }
  
  /* Mobile controls */
  .nav-controls {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
  }
  
  .mobile-menu-toggle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    font-size: 0.9rem !important;
  }
  
  .theme-toggle-nav {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
  }
  
  .theme-icon {
    font-size: 0.9rem !important;
  }
}

/* Compact Mobile Hero Section */
@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
    padding: 1rem 0;
  }
  
  .hero-container {
    padding: 0 0.75rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    line-height: 1.5;
  }
  
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1rem;
  }
  
  /* Mobile Ecosystem Flow - 2x2 Grid */
  .ecosystem-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .flow-item {
    padding: 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-align: center;
  }
  
  .flow-icon {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }
  
  .flow-arrow {
    display: none; /* Hide arrows in grid layout */
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
  }
  
  .btn {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .hero-code-snippet {
    margin-top: 1rem;
    transform: scale(0.9);
  }
}

/* Compact Mobile Sections */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .section-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }
  
  .ecosystem-intro,
  .products-intro,
  .community-intro {
    font-size: 0.9rem;
    padding: 0 0.5rem;
  }
}

/* Mobile Grid Layouts */
@media (max-width: 768px) {
  .ecosystem-pillars,
  .mission-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .products-showcase {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .product-spotlight {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .community-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .trusted-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Compact Mobile Cards */
@media (max-width: 768px) {
  .pillar-card,
  .mission-card,
  .testimonial-card,
  .community-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .pillar-card h3,
  .mission-card h3,
  .community-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .pillar-card p,
  .mission-card p,
  .community-card p {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  
  .pillar-features li,
  .feature-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
  
  .service-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-card {
    padding: 1rem;
  }
}

/* Mobile Stats */
@media (max-width: 768px) {
  .stat-item {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
}

/* Mobile Forms */
@media (max-width: 768px) {
  .newsletter-form,
  .contact-form {
    padding: 1rem;
  }
  
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  input,
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.6rem;
  }
  
  .newsletter-form .form-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
  
  label {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }
}

/* Mobile Footer */
@media (max-width: 768px) {
  .footer {
    padding: 1.5rem 0;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-links a {
    font-size: 0.85rem;
  }
  
  .social-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .footer-contact p {
    font-size: 0.8rem;
  }
}

/* Mobile WhatsApp Button */
@media (max-width: 768px) {
  .whatsapp-chat {
    bottom: 0.75rem;
    right: 0.75rem;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  /* Reduce animations on mobile */
  .hero-bg-animation,
  .hero-particles {
    display: none;
  }
  
  /* Simplify hover effects */
  .btn:hover,
  .pillar-card:hover,
  .mission-card:hover {
    transform: none;
  }
  
  /* Optimize images */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Reduce motion for better performance */
  * {
    animation-duration: 0.3s !important;
    transition-duration: 0.2s !important;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .nav-container {
    padding: 0 0.5rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .section-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  h3 {
    font-size: 1rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }
  
  .ecosystem-flow {
    max-width: 240px;
    gap: 0.5rem;
  }
  
  .flow-item {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .trusted-grid {
    grid-template-columns: 1fr;
  }
}