/* ==========================================
   AB MEDIA GROUP — COMPREHENSIVE RESPONSIVE SYSTEM
   ========================================== */

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip !important;
}

/* 1. LARGE TABLETS & SMALL DESKTOPS (<= 1024px) */
@media screen and (max-width: 1024px) {
  :root {
    --header-height: 76px;
  }

  .container {
    padding: 0 1.25rem;
    max-width: 100%;
    overflow-x: clip;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .about-image-wrapper img {
    height: 380px;
  }

  .divisions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .offices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-magazine-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
  }

  .footer-nav-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem !important;
  }
}

/* 2. TABLETS & LARGE PHONES (<= 768px) */
@media screen and (max-width: 768px) {
  .section-padding {
    padding: 4.5rem 0;
  }

  .section-header .title {
    font-size: 2.1rem;
  }

  .hero-headline {
    font-size: 2.35rem;
  }

  .hero-statement {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  /* Hero 2 Buttons Strictly in 1 Row Side-by-Side */
  .hero-ctas {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .hero-ctas .btn {
    flex: 1 1 50% !important;
    width: 50% !important;
    padding: 0.75rem 0.35rem !important;
    font-size: 0.75rem !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  .scroll-indicator {
    display: none !important;
  }

  .hero-slider-controls {
    bottom: 1rem;
    right: 1.25rem;
  }

  /* Stats Counter Grid 2x2 on Mobile (2 per row) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem 0.75rem !important;
  }

  .stat-item {
    padding: 1.25rem 0.75rem !important;
    background: var(--bg-surface);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stat-number {
    font-size: 2.25rem !important;
    margin-bottom: 0.35rem !important;
  }

  .stat-title {
    font-size: 0.85rem !important;
  }

  .stat-subtitle {
    font-size: 0.75rem !important;
  }

  /* Six Pillars Division Filter Buttons 2x2 on Mobile (2 per row) */
  .divisions-filter {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    margin-bottom: 2.5rem !important;
  }

  .divisions-filter .filter-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 0.65rem 0.5rem !important;
    font-size: 0.825rem !important;
    white-space: normal !important;
  }

  .divisions-grid {
    grid-template-columns: 1fr;
  }

  /* Executive Leadership Touch Slider on Mobile */
  .leadership-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    gap: 1.25rem !important;
    padding-bottom: 1.5rem !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .leadership-grid .executive-card {
    min-width: 85% !important;
    max-width: 85% !important;
    flex-shrink: 0 !important;
    scroll-snap-align: center !important;
  }

  /* Global Office Cards 2x2 Grid on Mobile (2 cards per row) */
  .offices-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem 0.65rem !important;
  }

  .office-card {
    padding: 1.25rem 0.85rem !important;
  }

  .office-city {
    font-size: 1.05rem !important;
  }

  .office-status-badge {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.5rem !important;
  }

  .office-address {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
  }

  .office-contact {
    font-size: 0.725rem !important;
  }

  /* Timeline Mobile Overhaul */
  .timeline-wrapper::before {
    left: 20px;
    transform: none;
  }

  .timeline-item {
    width: 100% !important;
    padding-left: 3.25rem !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 2.5rem;
  }

  .timeline-dot {
    left: 11px !important;
    right: auto !important;
    top: 1.75rem;
  }

  .timeline-card {
    padding: 1.5rem;
  }

  /* Map Container Responsiveness (Zero Body Scroll) */
  .map-container-wrapper {
    padding: 1.5rem 0.5rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .world-map-img {
    min-width: 600px;
    max-width: 100%;
  }

  .featured-story-card {
    padding: 2rem 1.25rem;
    min-height: 400px;
  }

  .partnership-cta-card {
    padding: 3rem 1.5rem;
  }

  .partnership-title {
    font-size: 2rem;
  }

  /* Partnership CTA Buttons 2 in 1 Row Strictly Side-by-Side */
  .partnership-btn-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .partnership-btn-group .btn {
    flex: 1 1 50% !important;
    width: 50% !important;
    padding: 0.75rem 0.35rem !important;
    font-size: 0.75rem !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer Navigation Menu 2-Column Mobile Grid */
  .footer-top-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.5rem !important;
    margin-bottom: 3.5rem !important;
  }

  .footer-nav-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem 1.25rem !important;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* 3. SMALL MOBILE PHONES (<= 480px) */
@media screen and (max-width: 480px) {
  .header-actions .btn {
    display: none;
  }

  .logo-name {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }

  .mobile-drawer {
    max-width: 100vw;
    width: 100vw;
    border-left: none;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.85rem;
  }

  .hero-headline {
    font-size: 1.95rem;
  }

  /* Hero 2 Buttons in 1 Row on Small Mobile Screens */
  .hero-ctas {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
  }

  .hero-ctas .btn {
    padding: 0.65rem 0.25rem !important;
    font-size: 0.7rem !important;
  }

  /* Partnership CTA Buttons 2 in 1 Row on Small Mobile */
  .partnership-btn-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
  }

  .partnership-btn-group .btn {
    padding: 0.65rem 0.25rem !important;
    font-size: 0.7rem !important;
  }

  /* Ensure 2x2 Grid (2 Boxes per row) on Small Mobile Screens */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem 0.65rem !important;
  }

  .stat-item {
    padding: 1rem 0.5rem !important;
  }

  .stat-number {
    font-size: 1.95rem !important;
  }

  .stat-title {
    font-size: 0.8rem !important;
  }

  .stat-subtitle {
    font-size: 0.7rem !important;
  }

  .divisions-filter {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-bottom: 2rem !important;
  }

  .divisions-filter .filter-btn {
    font-size: 0.775rem !important;
    padding: 0.6rem 0.35rem !important;
  }

  /* Leadership Card Width on Small Mobile Screens */
  .leadership-grid .executive-card {
    min-width: 90% !important;
    max-width: 90% !important;
  }

  /* Global Offices 2x2 Grid on Small Mobile Phones */
  .offices-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .office-card {
    padding: 1rem 0.65rem !important;
  }

  .office-city {
    font-size: 0.95rem !important;
  }

  .office-status-badge {
    font-size: 0.6rem !important;
  }

  .office-address {
    font-size: 0.75rem !important;
  }

  .office-contact {
    font-size: 0.7rem !important;
  }

  .footer-nav-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.75rem 1rem !important;
  }

  .tech-card-floating {
    position: static;
    margin-top: 1.5rem;
    width: 100%;
  }

  .news-card-small {
    flex-direction: column;
  }

  .news-card-thumb {
    width: 100%;
    height: 160px;
  }

  .single-article-content h2 {
    font-size: 1.5rem;
  }

  .pull-quote {
    font-size: 1.2rem;
    padding-left: 1rem;
  }

  .author-bio-card {
    flex-direction: column;
    text-align: center;
  }

  .modal-container {
    padding: 1.75rem 1rem;
  }
}
