/* ==========================================================================
   MOHANUR.COM — Responsive Design Stylesheet: responsive.css
   Handles tablet, mobile, drawer navigation, accessibility & touch targets.
   ========================================================================== */

/* --- Tablet Devices (<= 1024px) --- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .story-block {
    gap: 2rem;
  }
}

/* --- Mobile Landscape & Tablets (<= 768px) --- */
@media (max-width: 768px) {
  .top-bar-info {
    display: none; /* Hide long location info on small screens to prioritize language switcher */
  }

  .top-bar-inner {
    justify-content: center;
  }

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

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem 1.75rem 2rem;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    transition: right var(--transition-smooth);
    z-index: 1005;
    overflow-y: auto;
    border-left: 3px solid var(--temple-gold);
  }

  .main-nav.open {
    right: 0;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 1002;
    backdrop-filter: blur(3px);
  }

  .nav-backdrop.open {
    display: block;
  }

  .nav-link {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-link.active::after {
    left: 1rem;
    right: auto;
    width: 4px;
    height: 70%;
    top: 15%;
    bottom: auto;
  }

  .mobile-nav-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-maroon);
  }

  .mobile-nav-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  /* Hero Section Mobile */
  .hero-section {
    min-height: auto;
    padding: 3.5rem 0 3rem;
  }

  .hero-content {
    padding: 0;
  }

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

  .hero-description {
    font-size: 1.02rem;
  }

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

  /* Story block */
  .story-block,
  .story-block.reversed {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .story-img-wrap {
    order: -1;
  }

  /* Grids */
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .page-banner {
    padding: 2.5rem 0 2rem;
  }

  .page-banner-title {
    font-size: 1.85rem;
  }

  /* Timeline */
  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    padding-left: 45px;
  }

  .timeline-dot {
    left: 7px;
    width: 22px;
    height: 22px;
  }

  /* Lightbox arrows on mobile */
  .lightbox-prev {
    left: 10px;
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .lightbox-next {
    right: 10px;
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
  }

  .lightbox-content {
    padding-bottom: 50px;
  }

  .lightbox-img {
    max-height: 60vh;
  }

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

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

/* --- Small Mobile Phones (<= 480px) --- */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .page-banner-title {
    font-size: 1.6rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-logo-img {
    width: 42px;
    height: 42px;
  }

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

  .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

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

  .ad-slot-box {
    min-height: 60px;
  }

  .ad-placeholder-text {
    font-size: 0.74rem;
  }
}

/* Ad Slots Mobile Landscape & Tablets (<= 768px) */
@media (max-width: 768px) {
  .ad-slot-wrapper {
    margin: 1.75rem auto;
  }

  .ad-slot-box {
    min-height: 75px;
    padding: 0.35rem;
  }

  .ad-leaderboard {
    min-height: 75px;
  }

  .ad-in-article {
    min-height: 100px;
  }

  .ad-placeholder-text {
    font-size: 0.78rem;
  }
}

/* --- Accessibility & Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
