/* ============================================================
   B52 WordPress Theme - Responsive Stylesheet
   ============================================================ */

/* ====== Tablet (max-width: 1024px) ====== */
@media (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 20px; }
    .header-time { display: none; }
    .nav-link { padding: 12px 8px; font-size: 11px; }
    .camo-hero { min-height: 350px; }
    .camo-hero h1 { font-size: 36px; }
    .camo-hero p { font-size: 15px; }
    .banner-slider .swiper-slide img { height: 280px; }
    .mission-grid { grid-template-columns: repeat(3, 1fr); }
    .poster-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .content-area { flex-direction: column; }
    .footer-columns-grid { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 20px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .notification-bar { padding: 10px 0; }
    .notification-content { font-size: 12px; gap: 30px; line-height: 1.4; }
    .floating-sidebar { right: 8px; }
    .sidebar-btn { width: 48px; height: 48px; font-size: 16px; }
    .sidebar-label { display: none; }
}

/* ====== Mobile (max-width: 768px) ====== */
@media (max-width: 768px) {
    .site-header { position: relative; }
    .header-top { flex-direction: column; gap: 10px; padding: 12px 0; }
    .header-btn-group { width: auto; justify-content: center; }
    .header-time { display: none; }
    .main-navigation { padding: 0; }

    .mobile-menu-toggle {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #3d5a3d;
        border-radius: 0;
    }

    .nav-menu { display: none; flex-direction: column; width: 100%; max-height: 60vh; overflow-y: auto; }
    .nav-menu.active { display: flex; }
    .nav-link { padding: 10px 15px; font-size: 13px; border-bottom: 1px solid #1B2A1B; }

    .camo-hero { min-height: 300px; }
    .camo-hero h1 { font-size: 28px; letter-spacing: 1px; }
    .camo-hero p { font-size: 14px; padding: 0 15px; }
    .camo-hero-cta { flex-direction: column; align-items: center; }
    .camo-hero-cta .btn-register, .camo-hero-cta .btn-demo { padding: 12px 30px; font-size: 14px; }

    .banner-slider .swiper-slide img { height: 200px; }
    .banner-slider .swiper-button-next, .banner-slider .swiper-button-prev { display: none; }

    .rank-bar { padding: 15px; overflow-x: auto; }
    .rank-item { min-width: 75px; }
    .rank-badge { width: 40px; height: 40px; font-size: 18px; }
    .rank-connector { width: 20px; }

    .mission-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mission-card { padding: 14px; }

    .section-title { font-size: 18px; margin-bottom: 15px; }

    .poster-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .poster-item img { height: 150px; }

    .news-grid { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }

    .content-area { flex-direction: column; padding: 20px 0; }

    .single-article { padding: 20px 15px; }
    .article-title { font-size: 22px; }
    .article-content { font-size: 15px; }
    .article-meta { gap: 10px; font-size: 12px; }

    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .download-app-section h2 { font-size: 22px; }
    .download-app-section p { font-size: 13px; }
    .download-btn-group { flex-direction: column; align-items: center; }
    .download-btn-item { width: 100%; justify-content: center; }

    .footer-columns-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    .notification-content { font-size: 12px; gap: 25px; }

    .floating-sidebar { right: 5px; gap: 4px; }
    .sidebar-btn { width: 42px; height: 42px; font-size: 14px; border-radius: 8px; }
    .sidebar-label { display: none; }

    .provider-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 15px; }
    .provider-tab { flex-shrink: 0; }
}

/* ====== Small Mobile (max-width: 480px) ====== */
@media (max-width: 480px) {
    .container { padding: 0 10px; }

    .btn-login, .btn-register, .btn-demo { padding: 6px 14px; font-size: 13px; }
    .logo img { max-height: 35px; }

    .camo-hero { min-height: 250px; }
    .camo-hero h1 { font-size: 22px; }
    .camo-hero p { font-size: 12px; }
    .camo-hero-badge { font-size: 10px; padding: 4px 12px; }

    .banner-slider .swiper-slide img { height: 150px; }

    .rank-bar { padding: 10px; }
    .rank-item { min-width: 65px; padding: 6px; }
    .rank-badge { width: 35px; height: 35px; font-size: 15px; }
    .rank-name { font-size: 9px; }
    .rank-connector { width: 15px; }

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

    .poster-grid { grid-template-columns: 1fr; }
    .poster-item img { height: 180px; }

    .game-card img { height: 140px; }

    .download-btn-item { padding: 10px 20px; font-size: 13px; }

    .related-grid { grid-template-columns: 1fr; }
    .related-item-thumb img { height: 100px; }

    .single-article { padding: 15px 12px; }
    .article-title { font-size: 20px; }

    .nav-links a, .nav-links .current, .nav-links span.page-numbers {
        min-width: 32px; height: 32px; padding: 6px 10px; font-size: 13px;
    }

    .floating-sidebar { bottom: 80px; top: auto; transform: none; right: 5px; }
    .sidebar-btn { width: 38px; height: 38px; font-size: 12px; }

    .footer-col h4 { font-size: 14px; }
    .license-item i { font-size: 22px; }
    .license-item span { font-size: 11px; }
    .footer-social-links a { width: 32px; height: 32px; font-size: 14px; }

    .notification-bar { padding: 6px 0; }
    .notification-content { font-size: 11px; gap: 20px; }

    .footer-copyright { font-size: 12px; }
}


/* === Mobile Optimization Additions === */

/* Improve tap targets */
@media (max-width: 768px) {
  .nav-link, .btn-login, .btn-register, .btn-demo,
  a, button, .sidebar-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Prevent horizontal overflow */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Optimize font sizes for mobile */
  body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }

  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Fix iOS safe area */
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }

  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* Reduce animation for performance on mobile */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Touch-friendly spacing */
  .article-card {
    margin-bottom: 20px;
  }

  .content-area {
    padding: 10px;
  }
}

/* Fix small screens */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }

  h1, .hero-title {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }
}
