@media (max-width: 1023px) {
  .grid-lead { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .ft .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  /* HOMEPAGE 70/30 LAYOUT ON TABLETS & MOBILE */
  div[style*="grid-template-columns: 1fr 340px"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 767px) {
  /* FIX HORIZONTAL SCROLL & LAYOUT */
  html, body { overflow-x: hidden !important; width: 100%; position: relative; }
  
  /* HEADER FIX: Stack Logo and Search neatly */
  .hdr .wrap { flex-direction: column !important; gap: 15px !important; padding: 15px !important; }
  .brand { width: 100%; justify-content: center; }
  .brand img { height: auto !important; width: 100% !important; max-width: 250px; object-fit: contain; }
  .hdr .search { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
  
  /* HORIZONTAL SCROLLING MENU */
  .hdr .menu-btn { display: none !important; }
  .nav ul { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; margin: 0; }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav li { flex: 0 0 auto; }
  .nav a { padding: 12px 16px; font-size: 14.5px; border-bottom: none !important; white-space: nowrap; }
  
  /* GRID FIXES */
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .gal { grid-template-columns: repeat(2, 1fr); }
  
  /* ARTICLE PAGE FIXES */
  .article { padding: 18px; overflow: hidden; }
  .article h1 { font-size: 24px; }
  .hero-img { margin: 16px -18px 0; }
  .hero-img figcaption { padding: 8px 18px; }
  
  /* FOOTER & UTILS */
  .ft .wrap { grid-template-columns: 1fr; }
  .util .wrap { font-size: 11.5px; height: auto; padding: 6px 16px; flex-wrap: wrap; }
  
  /* MOBILE ADMIN PANEL FIXES */
  .layout { display: flex !important; flex-direction: column !important; }
  .side { width: 100% !important; position: relative !important; left: 0 !important; padding-bottom: 0 !important; }
  .side .brand { padding: 15px !important; }
  .side nav { display: flex !important; flex-direction: row !important; overflow-x: auto !important; padding: 0 !important; background: #fff; border-bottom: 2px solid #eee; }
  .tab-btn { width: auto !important; white-space: nowrap; border-bottom: 3px solid transparent; border-left: none !important; padding: 15px !important; color: #666 !important; }
  .tab-btn.active { border-bottom: 3px solid #c62828 !important; border-left: none !important; background: #f9f9f9 !important; color: #c62828 !important; }
  .main-area { height: auto !important; padding: 15px !important; }
  .form-row input, .form-row textarea { font-size: 16px; }
}