/* ============================================
   MOBILE-FIRST RESPONSIVE CSS - Updated
   ============================================ */

@media (max-width: 768px) {

  /* TOP BAR */
  .topbar-inner { flex-direction: column; gap: 4px; padding: 6px 14px; text-align: center; }
  .topbar-date { display: none; }

  /* HEADER */
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .brand-text .name { font-size: 1rem; }
  .brand-text .tag { font-size: .65rem; }
  .nav-search { width: 100%; order: 3; margin-left: 0; border-radius: 8px; }
  .nav-search input { width: 100%; flex: 1; font-size: .82rem; }
  .nav-search button { padding: 8px 14px; font-size: .8rem; }

  /* MENU BAR */
  .menu-bar-wrap { padding: 0 14px; }
  .menu-inner { padding: 6px 0; }
  .menu-bar a { padding: 11px 18px; font-size: .88rem; }

  /* SLIDER */
  .slider-wrap { height: 220px !important; }
  .slide { min-height: 220px !important; }
  .slide-content { display: none !important; }
  .slider-arrow { width: 30px; height: 30px; font-size: .9rem; }
  .slider-prev { left: 6px; }
  .slider-next { right: 6px; }
  .slider-dots { bottom: 10px; }
  .dot { width: 8px; height: 8px; }

  /* MAIN CONTAINER */
  .container { padding: 16px 14px; }

  /* LAYOUT — single column */
  .layout { grid-template-columns: 1fr !important; gap: 20px; }

  /* CATEGORY FILTER */
  .cat-filter {
    margin: 16px 0 20px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    gap: 6px !important;
    justify-content: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .cat-pill { padding: 5px 12px; font-size: .76rem; white-space: nowrap; }

  /* POST LIST */
  .post-list { padding-left: 0 !important; gap: 16px; }
  .post-item { flex-direction: column !important; padding: 12px !important; gap: 10px !important; }
  .post-item-img { width: 100% !important; border-radius: 8px; }
  .post-item-img img { width: 100% !important; height: 180px !important; object-fit: cover !important; border-radius: 8px; }
  .post-item-img-ph { width: 100% !important; height: 140px !important; border-radius: 8px; }
  .post-item-body { padding: 4px 0 0 !important; }
  .post-title-link { font-size: 1rem !important; }
  .post-excerpt { font-size: .84rem; }
  .post-foot { flex-direction: column; gap: 10px; align-items: flex-start !important; }
  .post-meta-sm { flex-wrap: wrap; gap: 6px; font-size: .73rem; }
  .btn-read { font-size: .78rem; padding: 6px 14px; }

  /* PAGINATION */
  .pagination { flex-wrap: wrap; gap: 4px; padding: 20px 0 4px; }
  .pagination a, .pagination span { padding: 6px 11px; font-size: .82rem; }

  /* SIDEBAR — hide on mobile */
  .sidebar { display: none !important; }
  .layout { grid-template-columns: 1fr !important; }
  .s-card-head { padding: 10px 14px; font-size: .9rem; }
  .s-card-body { padding: 12px; }
  .author-card { padding: 16px 12px; }
  .social-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .social-btn { padding: 9px 4px; font-size: .68rem; }
  .social-btn .ico { font-size: 1.1rem; }

  /* FOOTER */
  .footer-top { display: none !important; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 20px 16px;
    font-size: .78rem;
    background: #1a2540;
  }
  .footer-bottom div { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer-bottom a { font-size: .78rem; }

  /* POST PAGE */
  .post-wrap { padding: 18px 14px !important; }
  .post-h1 { font-size: 1.4rem !important; line-height: 1.25; }
  .post-meta { gap: 8px; font-size: .75rem; flex-wrap: wrap; }
  .post-content { font-size: .94rem; }
  .post-hero img { max-height: 200px; object-fit: cover; }
  .post-hero-ph { height: 160px !important; font-size: 3rem; }
  .post-nav { flex-direction: column; gap: 8px; }
  .post-nav a { text-align: center; padding: 11px; }
  .post-share { gap: 6px; }
  .share-btn { padding: 5px 11px; font-size: .75rem; }
  .breadcrumb { font-size: .72rem; gap: 4px; }

  /* CONTACT PAGE */
  .fc { padding: 20px 14px !important; }
  .form-c { margin: 20px auto; padding: 0 12px; }
  .row2 { grid-template-columns: 1fr !important; }

  /* ADMIN MOBILE */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .stat-num { font-size: 1.5rem; }
  .content { padding: 14px; }
  .form-row { grid-template-columns: 1fr !important; }
  .card { padding: 14px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  td, th { padding: 8px 10px; font-size: .78rem; }
}

@media (max-width: 480px) {
  .slider-wrap { height: 180px !important; }
  .slide { min-height: 180px !important; }
  .brand-text .name { font-size: .92rem; }
  .post-title-link { font-size: .95rem !important; }
  .cat-pill { padding: 4px 11px; font-size: .75rem; }
  .post-item-img img { height: 150px !important; }
  .post-h1 { font-size: 1.25rem !important; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-icon { font-size: 1.5rem; }
  .stat-num { font-size: 1.3rem; }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
  .layout { grid-template-columns: 1fr 260px; gap: 20px; }
  .post-item-img { width: 170px !important; }
  .post-item-img img { width: 170px !important; height: 145px !important; }
  .post-item-img-ph { width: 170px !important; height: 145px !important; }
  .slider-wrap { height: 300px !important; }
  .nav-search input { width: 150px; }
  .footer-top { grid-template-columns: 1fr 1fr !important; gap: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* HAMBURGER MENU */
.mob-menu-toggle {
  display: none;
  background: rgba(255,255,255,.15);
  border: none;
  color: white;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .mob-menu-toggle { display: flex; }
  .menu-bar { position: relative; }
  .menu-inner {
    flex-direction: column !important;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--accent);
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    padding: 6px 0;
  }
  .menu-bar a { padding: 13px 20px; border-radius: 0; width: 100%; font-size: .9rem; }
  .menu-bar a.active::after { display: none; }
}

/* ADMIN SIDEBAR MOBILE */
.mob-admin-toggle {
  display: none;
  background: var(--accent);
  border: none; color: white;
  padding: 7px 12px; border-radius: 7px;
  cursor: pointer; font-size: 1.1rem;
  align-items: center; justify-content: center;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 190;
}
.sidebar-overlay.show { display: block; }
@media (max-width: 900px) {
  .mob-admin-toggle { display: flex !important; }
  .sidebar { position: fixed; left: -100%; transition: left .3s; z-index: 200; }
  .sidebar.open { left: 0; }
  .main { margin-left: 0 !important; }
  .topbar { padding: 0 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
}