/* ==========================================================================
   EarnifyX Lab - Responsive Stylesheet
   Breakpoints for Desktop, Tablet, and Mobile
   ========================================================================== */

/* Large Desktop Adjustments */
@media (min-width: 1400px) {
  .cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Medium Desktops & Tablets (<= 1100px) */
@media (max-width: 1100px) {
  .header-nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
  }
  .header-search {
    width: 170px;
  }
  .header-search:focus-within {
    width: 220px;
  }
}

/* Tablets and below (<= 1024px) */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-right {
    gap: 0.45rem;
  }

  .app-container {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem;
    gap: 1.5rem;
  }
  
  .app-rightbar {
    display: none;
  }

  .hero-banner {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 2rem;
  }

  .hero-visual {
    margin-top: 1rem;
  }

  .hero-visual-img {
    transform: scale(1.05);
  }

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

  /* Mobile Slide-out Sidebar Drawer */
  .app-sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-surface);
    z-index: 200;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
  }

  .app-sidebar.open {
    left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Tablets in Portrait */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .site-header {
    padding: 0 0.8rem;
  }

  .brand-logo .brand-tagline {
    display: none;
  }

  .header-search {
    display: none;
  }

  .header-auth-actions {
    gap: 0.3rem;
  }

  .app-container {
    padding: 1rem;
    gap: 1.25rem;
  }

  .hero-banner {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  .hero-title {
    font-size: 1.85rem;
  }

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

  .cards-grid-large, .cards-grid-wide {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .filter-pills-bar {
    padding: 0.2rem 0;
  }

  .about-profile-layout {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
}

/* Small Phones */
@media (max-width: 480px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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