/* ============================================================
   RESPONSIVE STYLES — BJP Mandal Prasikshana Portal
   Breakpoints: Mobile < 768px | Tablet 768–1024px | Desktop > 1024px
   ============================================================ */

/* ---- TABLET (≤ 1024px) ---- */
@media (max-width: 1024px) {

  /* Navbar */
  .navbar-nav, .navbar-actions .btn { display: none; }
  .hamburger { display: flex; }

  /* Hero layout */
  .hero-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }

  /* Stats strip */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Admin layout */
  .admin-sidebar { width: 220px; }
  .admin-grid-2 { grid-template-columns: 1fr; }

  /* Registration layout */
  .registration-layout { grid-template-columns: 1fr; }
  .reg-sidebar { position: static; }

  /* Programs */
  .ideology-grid { grid-template-columns: 1fr; }
}

/* ---- MOBILE NAV DRAWER ---- */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
}
.mobile-nav.open { display: flex; }
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.mobile-nav-drawer {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--white);
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.mobile-nav-close {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--light-bg);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.mobile-nav-close:hover { background: rgba(255,103,31,0.1); color: var(--primary); }

.mobile-nav-links {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: var(--transition);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(255,103,31,0.07);
  color: var(--primary);
}
.mobile-nav-link .nav-icon { font-size: 1.1rem; }

.mobile-nav-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-nav-footer .btn { width: 100%; justify-content: center; }

/* ---- MOBILE (< 768px) ---- */
@media (max-width: 767px) {

  :root {
    --section-py: 52px;
  }

  /* Navbar */
  .navbar-brand-text span { display: none; }

  /* Hero */
  .hero { padding: 60px 0 50px; min-height: unset; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; flex-wrap: wrap; justify-content: flex-start; }
  .hero-stat-divider { display: none; }

  /* Stats strip */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item { border: none; border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(1), .stat-item:nth-child(3) { border-right: 1px solid var(--border); }
  .stat-number { font-size: 1.8rem; }

  /* Programs grid */
  .programs-grid { grid-template-columns: 1fr; }
  .programs-full-grid { grid-template-columns: 1fr; }
  .schemes-grid { grid-template-columns: 1fr; }

  /* Speakers */
  .speakers-grid { grid-template-columns: repeat(2, 1fr); }

  /* Booth */
  .booth-grid { grid-template-columns: 1fr; }

  /* Apps */
  .apps-grid { grid-template-columns: 1fr; }

  /* Meeting card select */
  .meeting-card-select { grid-template-columns: 1fr; }

  /* Form row */
  .form-row { grid-template-columns: 1fr; }
  .form-body { padding: 20px; }
  .form-section-header { padding: 16px 20px; }
  .form-submit-area { padding: 0 20px 20px; }

  /* Admin — hide sidebar on mobile, use top bar approach */
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  .admin-sidebar-header { display: none; }
  .admin-nav {
    display: flex;
    flex-direction: row;
    padding: 8px 12px;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
  }
  .admin-nav-label { display: none; }
  .admin-content-inner { padding: 20px; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-2 { grid-template-columns: 1fr; }

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

  /* Table — scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Section title */
  .section-title { font-size: 1.4rem; }

  /* Page hero */
  .page-hero { padding: 40px 0; }
  .page-hero h1 { font-size: 1.6rem; }

  /* Ideology */
  .ideology-grid { grid-template-columns: 1fr; }

  /* Speaker cards on very small screen */
  @media (max-width: 480px) {
    .speakers-grid { grid-template-columns: 1fr; }
    .stats-cards { grid-template-columns: 1fr; }
  }
}

/* ---- PRINT ---- */
@media print {
  .navbar, .footer, .hamburger, .mobile-nav { display: none !important; }
  body { color: #000; }
  .hero { background: #f5f5f5 !important; color: #000; }
}
