/* ==============================================
   RESPONSIVE.CSS — Page-specific overrides only
   style.css handles all base + breakpoints.
   ============================================== */

/* ==============================================
   SEARCH MODAL
   ============================================== */
#searchModal {
  z-index: 1000;
  align-items: flex-start !important;
  padding-top: 20px;
}
@media (max-width: 768px) {
  #searchModal {
    padding: 10px;
  }
  #searchModal > div {
    margin-top: 20px !important;
  }
}

/* ==============================================
   AUTH PAGE
   ============================================== */
.auth-container {
  max-width: 100%;
  margin: 24px auto;
  padding: 24px 16px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 480px) {
  .auth-container { max-width: 420px; margin: 40px auto; padding: 32px 28px; }
}

/* ==============================================
   PROFILE PAGE
   ============================================== */
.profile-header {
  background: var(--bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  gap: 16px; align-items: center; text-align: center;
  padding: 20px; margin-bottom: 24px;
}
@media (min-width: 480px) {
  .profile-header { flex-direction: row; text-align: left; padding: 24px; align-items: flex-start; }
}
.avatar { width: 76px; height: 76px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; font-weight: bold; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info h1 { font-size: 1.3rem; margin-bottom: 4px; }
.profile-info p  { color: var(--text-muted); font-size: 0.9rem; }
.profile-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.ptab { padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ptab.active { color: var(--primary); border-bottom-color: var(--primary); }
.ptab-content { display: none; }
.ptab-content.active { display: block; }

/* ==============================================
   ADMIN LAYOUT
   ============================================== */
.admin-shell { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 1024px) {
  .admin-shell { flex-direction: row; }
}
.admin-sidebar { width: 100%; border-bottom: 1px solid var(--border); }
@media (min-width: 1024px) {
  .admin-sidebar { width: 220px; min-width: 220px; border-bottom: none; border-right: 1px solid var(--border); }
}
.admin-nav { display: flex; flex-direction: row; overflow-x: auto; gap: 4px; padding: 8px; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .admin-nav { flex-direction: column; overflow-x: visible; }
}
.admin-topbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.editor-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1024px) {
  .editor-layout { grid-template-columns: 1fr 1fr; }
}
.two-col { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 480px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 12px; }
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 520px; }

/* ==============================================
   ADMIN LOGIN CARD
   ============================================== */
.login-view { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 80px); padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; padding: 28px 20px; background: var(--bg); border-radius: 16px; box-shadow: var(--shadow-lg); }

/* ==============================================
   SEARCH PAGE
   ============================================== */
.search-hero { padding: 28px 0 20px; text-align: center; }
.search-box { position: relative; max-width: 620px; margin: 0 auto 28px; }
.search-box input { width: 100%; font-size: 1rem; padding: 13px 48px 13px 18px; border-radius: 40px; border: 2px solid var(--border); background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.search-box input:focus { outline: none; border-color: var(--primary); }
.search-icon { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.2rem; pointer-events: none; }

/* ==============================================
   EPAPER PAGE — hero
   ============================================== */
.epaper-hero-inner { display: flex; flex-direction: column; gap: 20px; }
.epaper-filters-hero { width: 100%; }
@media (min-width: 768px) {
  .epaper-hero-inner { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .epaper-filters-hero { width: auto; min-width: 240px; }
}
.epaper-page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }

/* Footer responsive is now handled in style.css */

/* ==============================================
   SMALL DEVICES — Extra Responsiveness
   ============================================== */
@media (max-width: 480px) {
  .ad-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  #searchModal > div { max-width: 100%; margin-left: 0; margin-right: 0; }
  .search-hero h1 { font-size: 1.4rem; }
  .page-hero h1 { font-size: 1.6rem; }
  .content-page { padding: 20px 0; }
}
