/* RMPSSU — Final University Theme (PHP + MySQL) */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&family=Noto+Sans+Devanagari:wght@500;700&display=swap');

:root {
  --navy: #0c2d6b;
  --navy-light: #1e4a9e;
  --maroon: #6b3f1d;
  --maroon-dark: #4a2a14;
  --gold: #f0b429;
  --gold-dark: #d49a0f;
  --cream: #f8f6f3;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(12, 45, 107, 0.08);
  --radius: 12px;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site-body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
}

a { color: var(--navy-light); text-decoration: none; }
a:hover { color: var(--maroon); text-decoration: underline; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }

/* Top utility bar */
.top-bar {
  background: #111827;
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 0.4rem 0;
}
.top-bar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.top-bar a { color: #e5e7eb; text-decoration: none; }
.top-bar a:hover { color: var(--gold); }
.top-bar__links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.top-bar__actions { display: flex; gap: 0.35rem; }
.btn-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.7rem;
  text-decoration: none !important;
}
.btn-pill--admin { background: #b91c1c; color: #fff !important; }
.btn-pill--login { background: var(--navy); color: #fff !important; }

/* Site header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  border-bottom: 4px solid var(--gold);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}
.site-brand__hi {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.site-brand__en {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.3;
}
.site-brand__addr { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* Main navigation */
.site-nav {
  background: linear-gradient(180deg, var(--maroon) 0%, var(--maroon-dark) 100%);
}
.site-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}
.site-nav a {
  color: #fff;
  text-decoration: none !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.75rem 0.85rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(240, 180, 41, 0.2);
  color: var(--gold);
}
.site-nav--mobile {
  display: none;
  background: var(--maroon-dark);
  padding: 0.5rem 1rem;
}
.site-nav--mobile.is-open { display: block; }
.site-nav--mobile a {
  display: block;
  color: #fff;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-decoration: none !important;
}

/* Marquee */
.marquee-bar {
  background: linear-gradient(90deg, var(--gold) 0%, #fde68a 100%);
  color: #1c1917;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0;
  overflow: hidden;
}
.marquee-bar__track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 45s linear infinite;
}
.marquee-bar a { color: var(--navy); font-weight: 700; }
@keyframes marquee-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Main content */
.site-main { padding-bottom: 2rem; min-height: 50vh; }
.site-main--wide .container { max-width: 1400px; }
.breadcrumb {
  padding: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb .sep { margin: 0 0.35rem; }

.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
}
.page-hero__title { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; }
.page-hero__sub { margin: 0.5rem 0 0; opacity: 0.9; font-size: 1rem; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}
.card__body { padding: 1.25rem 1.5rem; }
.card__head {
  background: var(--maroon);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff !important; }
.btn-primary:hover { background: var(--navy-light); }
.btn-gold { background: var(--gold); color: #1c1917 !important; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy) !important;
}

/* Hero slider */
.hero-slider { position: relative; background: var(--navy); }
.hero-slider__slide { display: none; }
.hero-slider__slide.is-active { display: block; }
.hero-slider img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.hero-slider__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
}
.hero-slider__dot.is-active { background: var(--gold); }

/* Leadership */
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.leader-card img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  margin: 0 auto;
}
.leader-card h3 { margin: 0.75rem 0 0.25rem; color: var(--navy); font-size: 1rem; }
.leader-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Notice columns */
.notice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .notice-grid { grid-template-columns: repeat(3, 1fr); }
}
.notice-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.notice-panel__head {
  background: var(--maroon);
  color: #fff;
  padding: 0.65rem 1rem;
  font-weight: 700;
}
.notice-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}
.notice-panel__list li {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.notice-panel__list a { font-weight: 600; color: var(--navy); }
.notice-panel__date { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }
.notice-panel__more {
  padding: 0.65rem 1rem;
  text-align: right;
  border-top: 1px solid var(--border);
}
.notice-panel__more a { color: #b91c1c; font-weight: 700; font-size: 0.85rem; }

/* Portal grid */
.portals-section {
  background: linear-gradient(180deg, var(--navy) 0%, #0a224f 100%);
  color: #fff;
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.portals-section h2 { text-align: center; margin: 0 0 1.5rem; font-size: 1.5rem; }
.portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.portal-tile {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 1rem 0.75rem;
  text-align: center;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.portal-tile:hover { background: rgba(240, 180, 41, 0.25); color: var(--gold) !important; }
.portal-tile--highlight {
  background: var(--gold);
  color: #1c1917 !important;
  border-color: var(--gold);
}

/* CTA band */
.cta-band {
  background: linear-gradient(90deg, var(--maroon), var(--maroon-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.cta-band h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.cta-band p { margin: 0; opacity: 0.9; }

/* Section titles */
.section-title {
  text-align: center;
  color: var(--navy);
  font-size: 1.5rem;
  margin: 2rem 0 1.25rem;
  font-weight: 700;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gold);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Forms */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 0.75rem;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(30, 74, 158, 0.15);
}
.form-label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.25rem; }

.alert { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th,
.data-table td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { background: #f3f4f6; font-weight: 700; color: var(--navy); }

/* Footer */
.site-footer {
  background: #111827;
  color: #9ca3af;
  margin-top: 2rem;
}
.site-footer a { color: #d1d5db; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer__grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.5rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.site-footer__bottom {
  border-top: 1px solid #374151;
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
}

/* Mobile dock */
.mobile-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--maroon-dark);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 100;
  border-top: 2px solid var(--gold);
}
.mobile-dock a {
  color: #fff;
  text-decoration: none !important;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  flex: 1;
}
.mobile-dock a span { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.mobile-dock a.is-highlight { color: var(--gold); }
.body-pad-mobile { padding-bottom: 4rem; }
.whatsapp-fab {
  position: fixed;
  bottom: 4.5rem;
  right: 1rem;
  width: 52px;
  height: 52px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 101;
  text-decoration: none !important;
}
@media (min-width: 768px) {
  .mobile-dock, .body-pad-mobile { display: none; }
  .whatsapp-fab { bottom: 1.5rem; }
  .hero-slider img { height: 420px; }
  .site-logo { width: 88px; height: 88px; }
  .site-brand__hi { font-size: 1.15rem; }
  .site-brand__en { font-size: 1.05rem; }
}
@media (max-width: 767px) {
  .site-nav--desktop { display: none; }
  .nav-toggle { display: block; }
  body.site-body { padding-bottom: 3.5rem; }
}

/* Popup */
.popup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.popup-box { position: relative; max-width: 92vw; }
.popup-box img { max-width: 100%; max-height: 85vh; border-radius: var(--radius); }
.popup-close {
  position: absolute; top: -14px; right: -14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: #dc2626; color: #fff; font-size: 1.5rem;
  border: 3px solid #fff; cursor: pointer; line-height: 1;
}

/* Admin */
.admin-sidebar { min-height: 100vh; background: #0f172a; color: #e2e8f0; }
.admin-sidebar a { color: #cbd5e1; text-decoration: none; display: block; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.85rem; }
.admin-sidebar a:hover { background: #1e293b; color: #fff; }

/* Form grid (admission etc.) */
.form-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid--2 .form-span-2 { grid-column: 1 / -1; }
}

/* FAQ */
.faq-section { margin: 2rem 0; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.faq-item summary {
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-answer {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
}

/* Payment box */
.pay-box {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
}
.pay-box .pay-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #166534;
  margin: 1rem 0;
}

/* Legacy utility shims (pages not yet migrated) */
.w-full { width: 100%; }
.border { border: 1px solid var(--border); }
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 600; }
.block { display: block; }
.text-gray-500 { color: var(--muted); }
.text-gray-600 { color: var(--muted); }
.text-gray-700 { color: #374151; }
.text-blue-700 { color: var(--navy-light); }
.text-blue-900 { color: var(--navy); }
.text-green-700 { color: #166534; }
.text-red-600 { color: #b91c1c; }
.bg-white { background: var(--white); }
.bg-gray-100 { background: var(--cream); }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-lg { max-width: 32rem; margin-left: auto; margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .md\:col-span-2 { grid-column: 1 / -1; }
}

/* Grid utils */
.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
