
/* ============================================================
   LARGE DESKTOP  (≥1200px)
   ============================================================ */
@media (min-width: 1200px) {
  .latest-news-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   DESKTOP  (≥992px)
   ============================================================ */
@media (min-width: 992px) {
  .sticky-share { display: flex; }
  .mobile-sticky-ad { display: none !important; }
  #mobile-search-toggle { display: none; }
  .hamburger-btn { display: none; }
  #nav-collapse { display: block !important; }
  .ad-728 { max-width: 728px; margin: 0 auto; }
  #main-nav { display: block; }
}

/* ============================================================
   TABLET  (768px – 991px)
   ============================================================ */
@media (max-width: 991px) {
  /* Topbar simplified */
  .topbar-tags { display: none; }

  /* Header */
  .header-inner { gap: 10px; }
  .logo-text { font-size: 17px; }

  /* Nav becomes mobile */
  #main-nav { top: unset; position: static; }
  .nav-menu { flex-direction: column; gap: 0; }
  .nav-menu > li > a { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .nav-menu > li > a.active { background: rgba(76,29,149,.05); }
  .dropdown-menu-custom {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding-left: 14px;
    background: var(--bg-soft);
    display: none;
  }
  .dropdown-menu-custom.show { display: block; }
  #nav-collapse { display: none; }
  #nav-collapse.show { display: block; }

  /* Search inside hamburger */
  .header-search-wrap { display: none; }

  /* Sliders */
  .headline-slide { flex: 0 0 calc(50% - 8px); }
  .hero-slider { height: 320px; }

  /* Grids */
  .latest-news-grid { grid-template-columns: repeat(2, 1fr); }
  .viral-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-main { min-height: 280px; }

  /* Sticky share */
  .sticky-share { display: none; }

  /* Footer */
  .footer-col { margin-bottom: 28px; }
}

/* ============================================================
   MOBILE  (≤767px)
   ============================================================ */
@media (max-width: 767px) {
  /* Typography */
  body { font-size: 14px; }

  /* Topbar */
  #topbar { font-size: 11.5px; }
  .topbar-date { display: none; }

  /* Header */
  .logo-text small { display: none; }
  .btn-login { padding: 6px 12px; font-size: 12.5px; }
  .btn-dark-mode { width: 32px; height: 32px; font-size: 13px; }
  .logo-placeholder { gap: 6px; }
  .logo-icon { width: 34px; height: 34px; font-size: 16px; }
  .logo-text { font-size: 15px; }

  /* Hero slider */
  .hero-slider { height: 240px; }
  .hero-slide .slide-title { font-size: 16px; }
  .hero-slide .slide-content { padding: 14px 16px; }
  .hero-arrow { width: 34px; height: 34px; font-size: 14px; }

  /* Headline slider */
  .headline-slide { flex: 0 0 calc(100% - 0px); }
  .hs-arrow { display: none; }

  /* Grids */
  .latest-news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
  .viral-grid { grid-template-columns: 1fr; }

  /* Newsletter */
  .newsletter-box { padding: 24px 20px; }
  .newsletter-box h3 { font-size: 20px; }
  .nl-options { flex-direction: column; align-items: center; }
  .nl-option-card { width: 100%; max-width: 320px; }

  /* Article */
  .article-title { font-size: 22px; }
  .article-body { font-size: 15.5px; }
  .author-box { flex-direction: column; gap: 10px; }

  /* Author page */
  .author-stats { gap: 16px; }

  /* Mobile ads */
  .mobile-sticky-ad { display: block; }
  .mobile-sticky-ad.bottom { bottom: 0; }

  /* Sticky share hidden on mobile */
  .sticky-share { display: none; }

  /* Back to top position */
  #back-to-top { right: 14px; bottom: 70px; }

  /* Section padding */
  .section-pad { padding: 20px 0; }
  .section-title h2 { font-size: 16px; }

  /* News card */
  .news-card .card-title { font-size: 14px; }

  /* Login card */
  .login-card { padding: 24px 20px; }
  .login-title { font-size: 20px; }

  /* Contact */
  .contact-form-box { padding: 20px 16px; }

  /* Ticker */
  .ticker-label { display: none; }
}

/* ============================================================
   EXTRA SMALL  (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-slider { height: 200px; }
  .hero-slide .slide-meta { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .reactions-bar { gap: 6px; }
  .reaction-btn { padding: 5px 10px; font-size: 12px; }
  .countdown-units { gap: 5px; }
  .countdown-unit { padding: 7px 8px; min-width: 48px; }
  .countdown-unit .num { font-size: 19px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  #topbar, #main-header, #main-nav, .breaking-ticker,
  .sticky-share, #back-to-top, .mobile-sticky-ad,
  .ad-box, .sidebar-widget, .comment-section,
  #main-footer, .newsletter-section { display: none !important; }

  body { font-size: 12pt; color: #000; }
  .article-title { font-size: 22pt; }
  .article-body { font-size: 11pt; }
  a { text-decoration: none; color: #000; }
}

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
[data-theme="dark"] {
  background: #0F172A;
}
[data-theme="dark"] #main-header,
[data-theme="dark"] #main-nav,
[data-theme="dark"] .news-card,
[data-theme="dark"] .sidebar-widget,
[data-theme="dark"] .contact-form-box,
[data-theme="dark"] .live-search-results {
  background: #1E293B;
  border-color: #334155;
}
[data-theme="dark"] .nav-menu > li > a { color: #E2E8F0; }
[data-theme="dark"] .nav-menu > li > a:hover { color: var(--cyan); }
[data-theme="dark"] .dropdown-menu-custom { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .dropdown-menu-custom a { color: #E2E8F0; border-color: #334155; }
[data-theme="dark"] .dropdown-menu-custom a:hover { background: #334155; }
[data-theme="dark"] .form-control { background: #0F172A; border-color: #334155; color: #E2E8F0; }
[data-theme="dark"] .form-control:focus { background: #1E293B; border-color: var(--cyan); }
[data-theme="dark"] .topbar-tags a,
[data-theme="dark"] .topbar-social a { background: rgba(255,255,255,.1); }
[data-theme="dark"] .viral-list-item { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .news-list-item { border-color: #334155; }
[data-theme="dark"] .most-read-item { border-color: #334155; }
[data-theme="dark"] .tag-cloud a { background: #1E293B; border-color: #334155; color: #9CA3AF; }
[data-theme="dark"] .tag-cloud a:hover { background: var(--primary); color: #fff; }
[data-theme="dark"] .toc-box,
[data-theme="dark"] .article-body .read-also,
[data-theme="dark"] .author-box { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%); }
[data-theme="dark"] .breadcrumb-wrap { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .ad-box { background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%); border-color: #334155; }
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-about { color: rgba(255,255,255,.55); }
[data-theme="dark"] .article-tags a { background: #1E293B; border-color: #334155; color: #9CA3AF; }
[data-theme="dark"] .login-card { background: #1E293B; }
[data-theme="dark"] .map-placeholder { background: #1E293B; border-color: #334155; }
[data-theme="dark"] .viral-section { background: #0F172A; }
[data-theme="dark"] .gallery-section,
[data-theme="dark"] .bg-white-section { background: #0F172A; }
[data-theme="dark"] .page-link { background: #1E293B !important; border-color: #334155 !important; color: #E2E8F0 !important; }
