/* 
   ==========================================================================
   JANNAH RESPONSIVE BREAKPOINTS
   ========================================================================== 
*/

/* 1. Large Screen Adjustments */
@media (max-width: 1400px) {
  .container {
    padding: 0 15px;
  }
}

/* 2. Tablets & Small Laptops */
@media (max-width: 1024px) {
  /* Logo Area Wrap */
  .logo-area-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .header-ad-placeholder {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }

  /* Content area grid collapse */
  .content-area-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .widget {
    margin-bottom: 0;
  }

  /* Hero grid adjustments */
  .jannah-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid-main {
    height: 350px;
  }

  .hero-grid-side-stack {
    flex-direction: row;
    height: 200px;
    gap: 4px;
  }

  .hero-grid-sub {
    width: 50%;
    height: 100%;
  }
}

/* 3. Small Tablets & Big Phones */
@media (max-width: 768px) {
  /* Top date bar layout */
  .top-bar-container {
    flex-direction: column;
    height: auto;
    padding: 8px 0;
    gap: 8px;
  }

  .top-bar-left, .top-bar-right {
    width: 100%;
    justify-content: center;
  }

  /* Mobile menu button and navbar */
  .menu-primary-container-desktop {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
  }

  /* Hero grid stack */
  .hero-grid-side-stack {
    flex-direction: column;
    height: auto;
  }

  .hero-grid-sub {
    width: 100%;
    aspect-ratio: 16/10;
  }

  /* Ticker */
  .breaking-news-ticker-bar {
    height: auto;
    padding: 8px 0;
  }

  .ticker-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ticker-label {
    align-self: flex-start;
    height: 30px;
    border-radius: var(--radius);
  }

  .ticker-content-wrapper {
    margin: 0;
    width: 100%;
    min-height: 24px;
  }

  .ticker-posts-list {
    position: relative;
    align-items: flex-start;
  }

  .ticker-nav-buttons {
    display: none; /* Hide navs on mobile */
  }

  /* Blocks styling collapse */
  .block-columns-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .feed-article-row {
    flex-direction: column;
    gap: 12px;
  }

  .feed-thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }

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

  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

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

  .hero-card-title {
    font-size: 1.3rem;
  }

  .hero-card-title.sub-title {
    font-size: 1rem;
  }

  .jannah-logo-area {
    padding: 15px 0;
  }

  .site-branding .site-title-arabic {
    font-size: 1.8rem;
  }

  .site-branding .site-title-text {
    font-size: 1.3rem;
  }
}

/* 5. Mobile Drawer Menu */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: var(--bg-white);
  z-index: 2000;
  box-shadow: 10px 0 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-drawer.active {
  left: 0;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary);
  font-size: 1.2rem;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-dark);
  cursor: pointer;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.drawer-body ul {
  list-style: none;
}

.drawer-body li {
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.drawer-body li:last-child {
  border-bottom: none;
}

.drawer-body a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  display: block;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Kajian Row List & Category Grid Responsive modifications */
@media (max-width: 600px) {
  .kajian-row-item {
    flex-direction: column;
    gap: 12px;
  }
  .kajian-thumb {
    width: 100%;
    height: 160px;
  }
  .category-blocks-grid {
    grid-template-columns: 1fr;
  }
  .single-article-card {
    padding: 20px;
  }
  .related-posts-section {
    padding: 20px;
  }
  .comments-area {
    padding: 20px;
  }
  .comment-body {
    flex-direction: column;
    gap: 10px;
  }
  .author-box {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .post-card {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  .post-card-thumbnail {
    width: 100%;
    height: 180px;
  }
}
