/* ====================================================
   SCHOOL WEBSITE - ELEGANT NAVY & GOLD THEME
   Fonts: Playfair Display + DM Sans
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy:       #0d1b3e;
  --navy-mid:   #1a2f6b;
  --gold:       #c9a84c;
  --gold-light: #e8c96a;
  --cream:      #faf7f0;
  --white:      #ffffff;
  --gray-100:   #f5f5f5;
  --gray-200:   #e0e0e0;
  --gray-500:   #9e9e9e;
  --gray-700:   #616161;
  --red:        #c62828;
  --green:      #2e7d32;
  --shadow-sm:  0 2px 8px rgba(13,27,62,.08);
  --shadow-md:  0 6px 24px rgba(13,27,62,.14);
  --shadow-lg:  0 12px 40px rgba(13,27,62,.18);
  --radius:     10px;
  --radius-lg:  18px;
  --transition: .3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: #2d3748;
  background: var(--white);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }

img { max-width: 100%; height: auto; }

/* ── Utility ─────────────────────────────────────────────── */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-pad { padding: 80px 0; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-center { text-align: center; }

.section-header { margin-bottom: 52px; text-align: center; }
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-header .subtitle {
  color: var(--gray-700); font-size: .95rem; margin-top: 8px;
}
.section-header .gold-line {
  width: 64px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-navy {
  background: var(--navy); color: var(--white);
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); }

.btn-outline {
  border-color: var(--navy); color: var(--navy); background: transparent;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #b71c1c; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #1b5e20; }

/* ═══════════════════════════════════════════════════════════
   TWO-ROW HEADER
   ROW 1 — Top Bar  : Logo  |  Quick contact  |  Admin Login
   ROW 2 — Nav Bar  : Navigation links  |  AI Search
═══════════════════════════════════════════════════════════ */

/* push all page content below both header rows */
body { padding-top: 120px; }

/* ─── ROW 1 : TOP BAR ────────────────────────────────────── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 70px;
  background: var(--navy);
  border-bottom: 1.5px solid rgba(201,168,76,.22);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.top-bar-inner {
  height: 100%;
  display: flex; align-items: center;
  width: 92%; max-width: 1300px; margin: 0 auto;
  gap: 0;
}

/* ── Logo + School Name ── */
.top-bar-logo {
  display: flex; align-items: center; gap: 13px;
  text-decoration: none; flex-shrink: 0;
  margin-right: auto;            /* push everything else right */
}
.school-logo-wrap {
  position: relative; flex-shrink: 0;
}
.school-logo-circle {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold) 0%, var(--gold-light) 100%);
  border: 2px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 14px rgba(201,168,76,.38);
  overflow: hidden;
  position: relative; z-index: 1;
}
.school-logo-circle img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.school-logo-circle .logo-letter {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem; font-weight: 900;
  color: var(--navy); line-height: 1; user-select: none;
}
/* spinning dashed ring */
.school-logo-wrap::before {
  content: '';
  position: absolute; inset: -5px; z-index: 0;
  border-radius: 50%;
  border: 2px dashed rgba(201,168,76,.35);
  animation: logospin 22s linear infinite;
  pointer-events: none;
}
@keyframes logospin { to { transform: rotate(360deg); } }

.school-name-block {
  display: flex; flex-direction: column; line-height: 1.2;
}
.school-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.13rem; font-weight: 700;
  color: #fff; letter-spacing: .01em;
  white-space: nowrap;
}
.school-tagline {
  font-size: .65rem; font-weight: 600;
  color: var(--gold-light);
  letter-spacing: .13em; text-transform: uppercase;
  margin-top: 2px; white-space: nowrap;
}

/* ── Center contact info ── */
.top-bar-contact {
  display: flex; align-items: center; gap: 20px;
  margin: 0 28px;
}
.tbc-item {
  display: flex; align-items: center; gap: 7px;
  font-size: .76rem; color: rgba(255,255,255,.6);
  text-decoration: none; transition: color .22s;
  white-space: nowrap;
}
.tbc-item:hover { color: var(--gold-light); }
.tbc-icon {
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(201,168,76,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; flex-shrink: 0;
}

/* ── Right: Admin Login / Logged-in state ── */
.top-bar-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.btn-admin-login {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-family: 'DM Sans', sans-serif;
  font-size: .83rem; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  transition: all .25s; white-space: nowrap;
}
.btn-admin-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(201,168,76,.42);
  color: var(--navy);
}
.admin-logged-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,.1); border: 1px solid rgba(201,168,76,.22);
  border-radius: 24px; padding: 5px 14px 5px 6px;
}
.admin-avatar-sm {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: .73rem; font-weight: 700;
}
.admin-logged-name { font-size: .78rem; color: var(--gold-light); white-space: nowrap; }
.btn-admin-sm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 7px; font-size: .78rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; transition: all .22s;
}
.btn-admin-sm-dash { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.btn-admin-sm-dash:hover { background: rgba(255,255,255,.18); color: white; }
.btn-admin-sm-out  { background: rgba(198,40,40,.7); color: white; }
.btn-admin-sm-out:hover  { background: #b71c1c; }

/* ── Hamburger (mobile) ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; flex-shrink: 0; margin-left: 14px;
  background: none; border: none;
}
.hamburger span {
  width: 22px; height: 2px; background: white;
  border-radius: 2px; transition: all .3s;
  display: block;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ─── ROW 2 : NAVIGATION BAR ─────────────────────────────── */
.navbar {
  position: fixed; top: 70px; left: 0; right: 0; z-index: 999;
  height: 50px;
  background: rgba(22,40,88,.97);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1.5px solid rgba(201,168,76,.18);
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center;
  width: 92%; max-width: 1300px; margin: 0 auto;
  gap: 4px;
}

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 0;
  list-style: none; flex: 1;
}
.nav-links li a {
  display: block;
  color: rgba(255,255,255,.78); font-size: .86rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  text-decoration: none; white-space: nowrap;
  position: relative; transition: all .22s;
}
.nav-links li a::after {
  content: '';
  position: absolute; bottom: 2px; left: 12px; right: 12px;
  height: 2px; background: var(--gold); border-radius: 1px;
  transform: scaleX(0); transition: transform .22s;
}
.nav-links li a:hover,
.nav-links li a.active { color: var(--gold-light); }
.nav-links li a:hover::after,
.nav-links li a.active::after { transform: scaleX(1); }

/* Search pill in nav row */
.nav-search-wrap {
  position: relative; flex-shrink: 0; margin-left: 8px;
}
.nav-search-input {
  width: 190px; padding: 6px 34px 6px 14px;
  background: rgba(255,255,255,.09);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 20px; color: white; outline: none;
  font-size: .8rem; font-family: 'DM Sans', sans-serif;
  transition: all .25s;
}
.nav-search-input::placeholder { color: rgba(255,255,255,.38); }
.nav-search-input:focus {
  width: 240px;
  background: rgba(255,255,255,.14);
  border-color: rgba(201,168,76,.5);
}
.nav-search-btn-inline {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.45);
  font-size: .82rem; cursor: pointer; transition: color .2s; padding: 0;
}
.nav-search-btn-inline:hover { color: var(--gold-light); }

/* Legacy aliases kept for compatibility */
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 900; color: var(--navy);
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-text strong { font-family: 'Playfair Display', serif; font-size: .92rem; color: white; font-weight: 700; }
.nav-logo-text span { font-size: .66rem; color: var(--gold-light); letter-spacing: .08em; }
.nav-btn-login {
  background: linear-gradient(135deg, var(--gold), var(--gold-light)) !important;
  color: var(--navy) !important; font-weight: 700 !important;
  padding: 7px 16px !important; border-radius: 7px !important; font-size: .82rem !important;
}

/* ─── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 820px) {
  .top-bar-contact { display: none; }
  .school-tagline   { display: none; }
  .hamburger        { display: flex; }
  .nav-search-wrap  { display: none; }

  .nav-links {
    display: none; flex-direction: column; gap: 2px;
    position: absolute; top: 50px; left: 0; right: 0;
    background: rgba(22,40,88,.99);
    padding: 10px 16px 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    z-index: 1000;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 10px 14px; font-size: .9rem; border-radius: 8px; }

  body { padding-top: 120px; }
}
@media (max-width: 520px) {
  .school-title { font-size: .95rem; }
  .admin-logged-pill { display: none; }
  .btn-admin-login { padding: 7px 12px; font-size: .78rem; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1a2f6b 50%, #0a1428 100%);
}

.hero-bg-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201,168,76,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201,168,76,.06) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative; z-index: 2; width: 90%; max-width: 1200px; margin: 0 auto;
  padding: 148px 0 80px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.3);
  color: var(--gold-light); font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  padding: 8px 18px; border-radius: 30px; margin-bottom: 28px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: white; margin-bottom: 24px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero h1 .highlight { color: var(--gold-light); }

.hero-desc {
  font-size: 1.1rem; color: rgba(255,255,255,.75); max-width: 560px;
  margin-bottom: 40px; line-height: 1.8;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 40px; margin-top: 60px; flex-wrap: wrap;
}
.hero-stat { color: white; }
.hero-stat strong {
  display: block; font-family: 'Playfair Display', serif;
  font-size: 2rem; color: var(--gold-light);
}
.hero-stat span { font-size: .85rem; color: rgba(255,255,255,.6); }

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.4); font-size: .75rem; letter-spacing: .1em;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-transform: uppercase;
}
.hero-scroll::after {
  content: ''; width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.4), transparent);
  animation: scrollLine 2s infinite;
}
@keyframes scrollLine { 0%,100%{opacity:.4;transform:scaleY(1)} 50%{opacity:1;transform:scaleY(.6)} }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,.06);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* ── Event Card ──────────────────────────────────────────── */
.event-card { display: flex; flex-direction: column; }
.event-card-img {
  width: 100%; height: 200px; object-fit: cover;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
}
.event-card-img-placeholder {
  height: 200px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: rgba(255,255,255,.3); font-size: 3rem;
}
.event-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.event-date-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--gold); font-weight: 600;
  background: rgba(201,168,76,.1); padding: 4px 12px; border-radius: 20px;
  margin-bottom: 12px;
}
.event-card-body h3 { font-size: 1.1rem; margin-bottom: 10px; }
.event-card-body p { font-size: .9rem; color: var(--gray-700); flex: 1; }
.event-venue { font-size: .82rem; color: var(--gray-500); margin-top: 12px; }

/* ── News Card ───────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 24px; }
.news-card-img { width:100%; height:180px; object-fit:cover; }
.news-card-img-placeholder {
  height:180px; background:linear-gradient(135deg,#e8eaf6,#c5cae9);
  display:flex; align-items:center; justify-content:center; font-size:2.5rem; color:#9fa8da;
}
.news-card-body { padding: 20px; }
.news-date { font-size: .8rem; color: var(--gray-500); margin-bottom: 8px; }
.news-card-body h3 { font-size: 1rem; margin-bottom: 8px; }
.news-card-body p { font-size: .88rem; color: var(--gray-700); line-height: 1.6; }
.news-tag {
  font-size: .75rem; font-weight: 600; color: var(--navy-mid);
  background: rgba(26,47,107,.08); padding: 3px 10px; border-radius: 20px;
}

/* ── Faculty ─────────────────────────────────────────────── */
.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 28px; }
.faculty-card { text-align: center; }
.faculty-photo-wrap {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 20px; border: 4px solid var(--gold);
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: flex; align-items: center; justify-content: center;
}
.faculty-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.faculty-photo-placeholder { font-size: 2.5rem; color: rgba(255,255,255,.5); }
.faculty-card h3 { font-size: 1.05rem; }
.faculty-card .role { font-size: .85rem; color: var(--gold); font-weight: 600; }
.faculty-card .dept { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }
.faculty-card .bio { font-size: .85rem; color: var(--gray-700); margin-top: 12px; font-style: italic; }

/* ── Gallery ─────────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 24px; }
.album-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; }
.album-cover {
  width: 100%; height: 220px; object-fit: cover;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: block;
}
.album-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,27,62,.9) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 24px;
  opacity: 0; transition: opacity var(--transition);
}
.album-card:hover .album-overlay { opacity: 1; }
.album-overlay h3 { color: white; font-size: 1.1rem; }
.album-overlay span { color: var(--gold-light); font-size: .85rem; }
.album-title { padding: 16px; background: white; }
.album-title h3 { font-size: 1rem; }
.album-title small { color: var(--gray-500); font-size: .82rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 12px; }
.photo-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photo-item:hover img { transform: scale(1.08); }

/* ── Page Header Banner ──────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 130px 0 50px; position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23c9a84c' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header h1 { color: white; font-size: clamp(1.8rem,4vw,2.8rem); position: relative; }
.page-header .breadcrumb {
  display: flex; gap: 8px; align-items: center;
  color: rgba(255,255,255,.6); font-size: .85rem; margin-top: 12px; position: relative;
}
.page-header .breadcrumb a { color: var(--gold-light); }
.page-header .breadcrumb span { color: rgba(255,255,255,.4); }

/* ── Contact Form ────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start; }
.contact-info { }
.contact-info-item {
  display: flex; gap: 16px; margin-bottom: 28px;
}
.contact-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 1rem;
}
.contact-info-text strong { display: block; font-size: .85rem; color: var(--gray-700); margin-bottom: 4px; }
.contact-info-text span { font-size: .95rem; }

/* ── Admission Form ──────────────────────────────────────── */
.admission-form-card { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.form-section-title {
  font-family: 'Playfair Display', serif; font-size: 1.15rem;
  color: var(--navy); margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

/* ── Form Styles ─────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 8px; color: var(--navy); }
.form-control {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-family: 'DM Sans', sans-serif; font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white); color: #2d3748;
}
.form-control:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-control.is-invalid { border-color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.validation-message { font-size: .8rem; color: var(--red); margin-top: 4px; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: white; }
thead th {
  background: var(--navy); color: white; padding: 14px 16px;
  font-size: .85rem; font-weight: 600; text-align: left; white-space: nowrap;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: .9rem; }
tbody tr:hover { background: rgba(13,27,62,.025); }
tbody tr:last-child td { border-bottom: none; }

/* ── Status Badges ───────────────────────────────────────── */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.badge-pending  { background: #fff8e1; color: #f9a825; }
.badge-approved { background: #e8f5e9; color: var(--green); }
.badge-rejected { background: #ffebee; color: var(--red); }
.badge-active   { background: #e8f5e9; color: var(--green); }
.badge-inactive { background: #ffebee; color: var(--red); }

/* ── Admin Layout ────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; flex-shrink: 0; background: var(--navy);
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 100;
  box-shadow: var(--shadow-lg);
}
.admin-sidebar-logo {
  padding: 28px 24px; border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
}
.admin-sidebar-logo span {
  font-family: 'Playfair Display', serif; color: white; font-size: 1.1rem; font-weight: 700;
}
.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.sidebar-nav-group { margin-bottom: 8px; }
.sidebar-nav-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  color: rgba(255,255,255,.3); padding: 8px 12px; text-transform: uppercase;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: 8px;
  color: rgba(255,255,255,.7); font-size: .9rem; font-weight: 500;
  transition: all var(--transition); margin-bottom: 2px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar-nav a.active { background: rgba(201,168,76,.2); color: var(--gold-light); }
.sidebar-nav a .icon { width: 20px; opacity: .8; }
.sidebar-user {
  padding: 20px 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-weight: 700; font-size: .95rem;
}
.sidebar-user-info strong { display: block; color: white; font-size: .9rem; }
.sidebar-user-info small { color: rgba(255,255,255,.45); font-size: .78rem; }

.admin-main { margin-left: 260px; flex: 1; background: #f0f2f8; min-height: 100vh; }
.admin-topbar {
  background: white; padding: 0 32px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-size: 1.3rem; }
.admin-content { padding: 32px; }

/* ── Dashboard Cards ─────────────────────────────────────── */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 20px; margin-bottom: 32px; }
.dash-card {
  background: white; border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 20px;
  border-left: 4px solid var(--gold);
}
.dash-card-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.dash-card-text strong { display: block; font-size: 1.8rem; font-family: 'Playfair Display', serif; color: var(--navy); }
.dash-card-text span { font-size: .82rem; color: var(--gray-500); }

/* ── Alert / Flash ───────────────────────────────────────── */
.alert {
  padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px; font-size: .9rem;
}
.alert-success { background: #e8f5e9; color: var(--green); border-left: 4px solid var(--green); }
.alert-danger  { background: #ffebee; color: var(--red);   border-left: 4px solid var(--red); }
.alert-info    { background: #e3f2fd; color: #1565c0;      border-left: 4px solid #1565c0; }

/* ── Attachment type toggle ──────────────────────────────── */
.attach-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.attach-btn {
  padding: 8px 18px; border-radius: 8px; border: 1.5px solid var(--gray-200);
  background: transparent; cursor: pointer; font-size: .88rem; font-weight: 600;
  color: var(--gray-700); transition: all var(--transition); font-family: inherit;
}
.attach-btn.active { border-color: var(--gold); background: rgba(201,168,76,.1); color: var(--navy); }

/* ── About / Infrastructure ──────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img { width: 100%; height: 440px; object-fit: cover; }
.about-image-placeholder {
  height: 440px; background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: flex; align-items: center; justify-content: center; font-size: 6rem; color: rgba(255,255,255,.15);
}
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.feature-item {
  display: flex; gap: 14px; padding: 16px;
  border-radius: var(--radius); background: var(--cream);
  border-left: 3px solid var(--gold);
}
.feature-icon { font-size: 1.5rem; flex-shrink: 0; }
.feature-text strong { display: block; font-size: .95rem; color: var(--navy); margin-bottom: 4px; }
.feature-text span { font-size: .85rem; color: var(--gray-700); }

.infra-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 24px; }
.infra-card {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); background: white;
}
.infra-card-header {
  padding: 24px; background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: flex; align-items: center; gap: 16px;
}
.infra-card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(201,168,76,.2); display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem;
}
.infra-card-header h3 { color: white; font-size: 1.05rem; }
.infra-card-body { padding: 20px; }
.infra-card-body p { font-size: .9rem; color: var(--gray-700); line-height: 1.7; }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--navy); color: rgba(255,255,255,.75); padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { font-size: .9rem; line-height: 1.8; margin-top: 16px; color: rgba(255,255,255,.6); }
.footer-col h4 { color: var(--gold-light); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: .9rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; color: rgba(255,255,255,.4);
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.95); align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
  position: fixed; top: 24px; right: 32px; color: white; font-size: 2rem;
  cursor: pointer; opacity: .7; transition: opacity var(--transition);
  background: none; border: none;
}
.lightbox-close:hover { opacity: 1; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .top-bar-contact { display: none; }
  .school-name-block .school-tagline { display: none; }
  .nav-search-wrap { display: none; }
  .nav-links { display: none; flex-direction: column; gap: 2px; }
  .nav-links.open {
    display: flex; position: absolute; top: 52px; left: 0; right: 0;
    background: rgba(26,47,107,.99); padding: 12px 16px 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .hero-stats { gap: 24px; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease forwards; }
.delay-1 { animation-delay: .1s; opacity: 0; }
.delay-2 { animation-delay: .2s; opacity: 0; }
.delay-3 { animation-delay: .3s; opacity: 0; }
.delay-4 { animation-delay: .4s; opacity: 0; }

/* ══════════════════════════════════════════════════════════
   AI CHATBOT WIDGET
══════════════════════════════════════════════════════════ */

/* Toggle button */
.chatbot-toggle {
    position: fixed; bottom: 28px; right: 28px; z-index: 9000;
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none; cursor: pointer; box-shadow: 0 6px 24px rgba(201,168,76,.45);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; transition: all .3s; color: var(--navy);
}
.chatbot-toggle:hover { transform: scale(1.1); box-shadow: 0 8px 32px rgba(201,168,76,.55); }
.chatbot-toggle .badge-unread {
    position: absolute; top: -4px; right: -4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--red); color: white; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

/* Chat window */
.chatbot-window {
    position: fixed; bottom: 100px; right: 28px; z-index: 9000;
    width: 360px; max-height: 520px;
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(13,27,62,.25);
    display: flex; flex-direction: column;
    transform: scale(.9) translateY(20px);
    opacity: 0; pointer-events: none;
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.chatbot-window.open {
    transform: scale(1) translateY(0);
    opacity: 1; pointer-events: all;
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    padding: 16px 20px;
    display: flex; align-items: center; gap: 12px;
}
.chat-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-info strong { display: block; color: white; font-size: .95rem; }
.chat-header-info span {
    font-size: .75rem; color: rgba(255,255,255,.6);
    display: flex; align-items: center; gap: 5px;
}
.chat-header-info span::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: #4caf50; display: inline-block;
    box-shadow: 0 0 0 2px rgba(76,175,80,.3);
}
.chat-close {
    background: none; border: none; color: rgba(255,255,255,.6);
    font-size: 1.2rem; cursor: pointer; padding: 4px;
    transition: color .2s;
}
.chat-close:hover { color: white; }

/* Suggested prompts */
.chat-suggestions {
    background: #f8f9ff; padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; gap: 6px; flex-wrap: wrap;
}
.chat-suggestion {
    background: white; border: 1.5px solid var(--gray-200);
    border-radius: 20px; padding: 5px 12px;
    font-size: .75rem; color: var(--navy-mid);
    cursor: pointer; transition: all .2s; font-weight: 500;
}
.chat-suggestion:hover {
    border-color: var(--gold); background: rgba(201,168,76,.08); color: var(--navy);
}

/* Messages area */
.chat-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    background: #f5f6fa;
    display: flex; flex-direction: column; gap: 12px;
    scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }

/* Message bubbles */
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg.user { flex-direction: row-reverse; }

.chat-bubble {
    max-width: 78%; padding: 10px 14px; border-radius: 18px;
    font-size: .88rem; line-height: 1.55; word-break: break-word;
}
.chat-msg.bot .chat-bubble {
    background: white; color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.chat-msg.user .chat-bubble {
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    color: white; border-bottom-right-radius: 4px;
}
.msg-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.bot .msg-avatar { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.user .msg-avatar { background: var(--navy-mid); color: white; font-size: .7rem; }

/* Typing indicator */
.typing-indicator {
    display: flex; gap: 4px; align-items: center; padding: 10px 14px;
    background: white; border-radius: 18px; border-bottom-left-radius: 4px;
    width: fit-content; box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.typing-indicator span {
    width: 7px; height: 7px; background: var(--gray-300); border-radius: 50%;
    animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0);background:var(--gray-300)} 30%{transform:translateY(-8px);background:var(--gold)} }

/* Input area */
.chat-input-area {
    background: white; padding: 12px 14px;
    border-top: 1px solid var(--gray-100);
    display: flex; gap: 8px; align-items: flex-end;
}
.chat-input {
    flex: 1; border: 1.5px solid var(--gray-200); border-radius: 12px;
    padding: 9px 14px; font-family: 'DM Sans', sans-serif; font-size: .9rem;
    resize: none; min-height: 40px; max-height: 100px; line-height: 1.4;
    transition: border-color .2s; outline: none;
}
.chat-input:focus { border-color: var(--gold); }
.chat-send {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: none; cursor: pointer; font-size: 1rem; color: var(--navy);
    transition: all .2s; display: flex; align-items: center; justify-content: center;
}
.chat-send:hover { transform: scale(1.08); }
.chat-send:disabled { opacity: .5; cursor: not-allowed; }
.chat-powered { text-align: center; font-size: .7rem; color: var(--gray-500); padding: 6px; background: white; }

/* ══════════════════════════════════════════════════════════
   SMART SEARCH BAR
══════════════════════════════════════════════════════════ */
.ai-search-wrap { position: relative; max-width: 640px; margin: 0 auto; }
.ai-search-input {
    width: 100%; padding: 16px 56px 16px 20px;
    border: 2px solid var(--gray-200); border-radius: 50px;
    font-size: 1rem; font-family: 'DM Sans', sans-serif;
    box-shadow: var(--shadow-sm); outline: none; transition: all .3s;
    background: white;
}
.ai-search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,168,76,.12); }
.ai-search-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    color: white; cursor: pointer; font-size: 1.1rem; transition: all .2s;
}
.ai-search-btn:hover { background: var(--gold); color: var(--navy); }
.ai-search-badge {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    font-size: .7rem; font-weight: 700; color: var(--gold);
    letter-spacing: .06em; text-transform: uppercase; pointer-events: none;
    display: none;
}

/* Search results dropdown */
.search-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: white; border-radius: 16px; box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--gray-100); z-index: 500; overflow: hidden;
    max-height: 420px; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: all .25s;
}
.search-dropdown.visible { transform: translateY(0); opacity: 1; pointer-events: all; }

.search-result-item {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100); transition: background .2s;
    text-decoration: none; cursor: pointer;
}
.search-result-item:hover { background: #f8f9ff; }
.search-result-item:last-child { border-bottom: none; }
.search-result-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.sri-faculty  { background: #e8f5e9; }
.sri-event    { background: #e3f2fd; }
.sri-news     { background: #fff8e1; }
.sri-gallery  { background: #fce4ec; }
.search-result-text strong { display: block; font-size: .9rem; color: var(--navy); }
.search-result-text span   { font-size: .8rem; color: var(--gray-500); }
.search-type-badge {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; padding: 2px 8px; border-radius: 10px;
    background: rgba(13,27,62,.08); color: var(--navy-mid); margin-left: auto; flex-shrink: 0;
}
.search-ai-tip {
    padding: 12px 16px; font-size: .82rem; color: var(--gray-700);
    background: linear-gradient(135deg, #f8f9ff, #eef0f8);
    border-top: 1px solid var(--gray-100);
    display: flex; gap: 8px; align-items: flex-start;
}
.search-ai-tip::before { content: '🤖'; flex-shrink: 0; }
.search-no-results { padding: 28px 16px; text-align: center; color: var(--gray-500); font-size: .9rem; }

/* ══════════════════════════════════════════════════════════
   AI ADMIN CONTENT GENERATOR
══════════════════════════════════════════════════════════ */
.ai-gen-box {
    background: linear-gradient(135deg, #f0f2ff, #e8ebff);
    border: 1.5px dashed rgba(26,47,107,.2); border-radius: var(--radius);
    padding: 16px; margin-bottom: 20px;
}
.ai-gen-box .ai-label {
    font-size: .75rem; font-weight: 700; color: var(--navy-mid);
    letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.ai-gen-row { display: flex; gap: 8px; }
.ai-gen-input {
    flex: 1; padding: 9px 14px; border: 1.5px solid rgba(26,47,107,.15);
    border-radius: 8px; font-size: .88rem; font-family: inherit; outline: none;
}
.ai-gen-input:focus { border-color: var(--gold); }
.ai-gen-btn {
    padding: 9px 18px; background: var(--navy); color: white; border: none;
    border-radius: 8px; cursor: pointer; font-size: .85rem; font-weight: 600;
    transition: all .2s; white-space: nowrap;
}
.ai-gen-btn:hover { background: var(--gold); color: var(--navy); }
.ai-gen-btn:disabled { opacity: .5; cursor: wait; }
.ai-gen-result {
    margin-top: 12px; background: white; border-radius: 8px; padding: 14px;
    font-size: .88rem; line-height: 1.6; border-left: 3px solid var(--gold);
    white-space: pre-wrap; display: none;
}
.ai-gen-actions { display: flex; gap: 8px; margin-top: 10px; }
.ai-copy-btn {
    font-size: .8rem; padding: 5px 14px; border-radius: 6px; cursor: pointer;
    background: var(--navy); color: white; border: none; transition: all .2s;
}
.ai-copy-btn:hover { background: var(--gold); color: var(--navy); }

@media (max-width: 480px) {
    .chatbot-window { width: calc(100vw - 32px); right: 16px; }
}
