/* Base Mobile Menu Button hidden on desktop */
.mobile-menu-btn {
    display: none;
}

/* Large screens (1200px and down) */
@media (max-width: 1200px) {
  .hero h1 {
    font-size: 3rem;
  }
}

/* Medium screens (992px and down) */
@media (max-width: 992px) {
  .hero {
    min-height: 80vh;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

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

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

  .services-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
  }
}

/* Small screens / Tablets (768px and down) */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Mobile Navigation */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }

  [dir="rtl"] .nav-links {
      right: auto;
      left: -100%;
      box-shadow: 5px 0 15px rgba(0,0,0,0.1);
      transition: left 0.3s ease;
  }

  .nav-links.active {
    right: 0;
  }

  [dir="rtl"] .nav-links.active {
      left: 0;
  }

  .mobile-menu-btn {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
  }

  .stats {
    margin-top: -60px; /* Maintain a smaller overlap */
    padding: var(--spacing-md) 1rem;
    border-radius: 15px;
  }

  .stat-item h3 {
    font-size: 2.2rem;
  }
  
  .hero {
    padding-bottom: 80px; /* Adjust padding to match smaller overlap */
  }

  /* Footer Newsletter */
  .newsletter-form {
    flex-direction: column;
    border-radius: 15px;
    background: transparent;
    border: none;
    padding: 0;
    gap: 10px;
  }
  
  .newsletter-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    width: 100%;
  }

  .newsletter-btn {
    width: 100%;
  }

  /* About Features */
  .about-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Extra small screens / Phones (480px and down) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .stats {
    margin-top: -40px; /* Even smaller overlap for phones */
  }

  .hero {
    padding-bottom: 60px;
  }

  .stat-item h3 {
    font-size: 1.8rem;
  }
}
