/* ==========================================================================
   AlWajibat.com (الواجبات) - Responsive Stylesheet
   Mobile-first adjustments, drawer navigation, breakpoints
   ========================================================================== */

/* Breakpoint: Desktop to Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .popular-tags {
    justify-content: center;
  }
  .hero-visual {
    display: none;
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Breakpoint: Tablet to Mobile (max-width: 768px) */
@media (max-width: 768px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .hero-section {
    padding: 2.5rem 0 3rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobile Drawer Navigation */
  .main-nav {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    width: 280px;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  .main-nav.open {
    transform: translateX(0);
  }
  
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .nav-link {
    padding: 0.75rem 1rem;
    width: 100%;
    justify-content: space-between;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--surface-alt);
    margin-top: 0.25rem;
    padding: 0.25rem 0.75rem;
    display: none;
  }
  .has-dropdown.expanded .dropdown-menu {
    display: block;
  }

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

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

  .hero-search-wrapper {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
  }
  .hero-search-btn {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
  }
  
  .main-article {
    padding: 1.5rem;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
  }
  .nav-backdrop.active {
    display: block;
  }
}

/* Breakpoint: Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.65rem;
  }
  .btn {
    padding: 0.65rem 1.15rem;
    font-size: 0.9rem;
  }
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
