/* ==========================================================================
   TRENDWRITES - RESPONSIVE BREAKPOINTS STYLESHEET
   ========================================================================== */

/* --------------------------------------------------------------------------
   LARGE DESKTOP & WIDESCREEN (1280px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* --------------------------------------------------------------------------
   LAPTOP / MEDIUM DESKTOP (1024px to 1279px)
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .mega-menu {
    width: 720px;
    left: -150px;
  }
}

/* --------------------------------------------------------------------------
   TABLET LANDSCAPE & PORTRAIT (768px to 1023px)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Navigation adjustments */
  .main-nav {
    display: none; /* Mobile menu drawer takes over */
  }
  .mobile-toggle {
    display: flex;
  }

  /* Two-column layout becomes single column stacking sidebar below main */
  .main-layout-grid {
    grid-template-columns: 1fr;
  }

  /* Hero grid stacks */
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-card-main {
    min-height: 380px;
  }

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

  .latest-news-grid,
  .trending-stories-grid,
  .opinions-grid,
  .videos-grid,
  .reviews-grid,
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-spotlight-banner {
    grid-template-columns: 1fr;
  }

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

/* --------------------------------------------------------------------------
   MOBILE DEVICES (Up to 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .top-bar-inner {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }
  .top-nav-links {
    display: none;
  }

  .navbar-inner {
    height: 60px;
  }
  .brand-logo {
    font-size: 1.25rem;
  }

  .hero-card-main {
    min-height: 320px;
  }
  .hero-card-overlay {
    padding: 1.25rem;
  }

  .latest-news-grid,
  .trending-stories-grid,
  .tutorials-grid,
  .opinions-grid,
  .videos-grid,
  .webinars-grid,
  .reviews-grid,
  .tools-grid,
  .case-studies-grid {
    grid-template-columns: 1fr;
  }

  .card-horizontal {
    flex-direction: column;
  }
  .card-horizontal .card-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

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

  .newsletter-banner {
    padding: 2rem 1.25rem;
  }
  .newsletter-form-wide {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .search-modal {
    padding-top: 1rem;
  }
}

/* --------------------------------------------------------------------------
   MOBILE DRAWER NAVIGATION MODAL
   -------------------------------------------------------------------------- */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-links {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-nav-item {
  border-bottom: 1px solid var(--border);
}
.mobile-nav-item a {
  display: block;
  padding: 0.85rem 0;
  font-weight: 700;
  font-size: 1.1rem;

.mobile-subnav {
  padding-left: 1rem;
  display: none;
}
.mobile-nav-item.active .mobile-subnav {
  display: block;
}
.mobile-subnav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0;
}
