/*
 * SAHHILHA (سهّلها) - Responsive Breakpoints & Mobile Layouts
 * Breakpoints: 320px, 360px, 390px, 430px, 768px, 1024px, 1280px, 1440px+
 */

/* Desktops & Large Screens (1024px to 1440px+) */
@media (min-width: 1025px) {
  .hamburger-btn {
    display: none;
  }
}

/* Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

/* Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  body {
    padding-bottom: 72px; /* Safe space for fixed bottom navigation */
  }

  .nav-desktop {
    display: none;
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }

  .search-box {
    padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  }

  .search-btn {
    padding: 0.55rem 1.15rem;
    font-size: 0.9rem;
  }

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

  .category-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .category-icon {
    width: 44px;
    height: 44px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .about-preview {
    padding: 2rem 1.25rem;
  }

  /* Fixed Mobile Bottom Navigation */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }

  [data-theme="dark"] .mobile-bottom-bar {
    background-color: var(--surface);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem;
    min-width: 54px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
  }

  .bottom-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .bottom-nav-item.active {
    color: var(--primary);
  }
}

/* Small Smartphone screens (max-width: 430px) */
@media (max-width: 430px) {
  .hero h1 {
    font-size: 1.75rem;
  }

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

  .search-chip {
    padding: 0.3rem 0.65rem;
    font-size: 0.775rem;
  }
}

/* Ultra Small screens (320px - 360px) */
@media (max-width: 360px) {
  .brand-name {
    font-size: 1.15rem;
  }

  .brand-symbol {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
  }
}
