/* ═══════════════════════════════════════════════════════════
   EMRS Bazpur — Main Stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
  --p: #1B4332;
  --pl: #2D6A4F;
  --a: #D4A017;
  --al: #F2CC59;
  --dk: #1A1A2E;
  --bd: #4A4A5A;
  --bg: #F8F6F1;
  --cr: #FDF8EF;
  --br: #E8E0D4;
  --fd: 'DM Serif Display', serif;
  --fb: 'Source Sans 3', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--fb); color: var(--bd); overflow-x: hidden; }
h1,h2,h3,h4,h5 { font-family: var(--fd); color: var(--dk); }
img { max-width: 100%; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-thumb { background: var(--p); border-radius: 4px; }

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar { background: var(--dk); color: rgba(255,255,255,.7); font-size: .8rem; padding: 6px 0; }
.topbar a { color: var(--al); text-decoration: none; transition: .3s; }
.topbar a:hover { color: #fff; }
.topbar .bi { color: var(--a); margin-right: 4px; }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar-e { background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-bottom: 2px solid var(--p); padding: 0; transition: .3s; }
.navbar-e.scrolled { box-shadow: 0 4px 20px rgba(27,67,50,.12); }
.navbar-logo { height: 52px; width: auto; transition: .3s; }
.navbar-e.scrolled .navbar-logo { height: 42px; }
.navbar-e .nav-link { font-weight: 700; font-size: .82rem; color: var(--dk) !important; padding: 18px 13px !important; text-transform: uppercase; letter-spacing: .6px; position: relative; transition: .3s; }
.navbar-e .nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background: var(--a); transition: .3s; border-radius: 2px 2px 0 0; }
.navbar-e .nav-link:hover::after, .navbar-e .nav-link.active::after { width: 80%; }
.navbar-e .nav-link:hover { color: var(--p) !important; }
.navbar-e .dropdown-menu { border: none; box-shadow: 0 12px 36px rgba(0,0,0,.12); border-radius: 12px; padding: 8px; border-top: 3px solid var(--p); }
.navbar-e .dropdown-item { border-radius: 8px; padding: 10px 16px; font-weight: 600; font-size: .85rem; transition: .2s; }
.navbar-e .dropdown-item:hover { background: var(--cr); color: var(--p); }
.btn-cta { background: var(--a); color: var(--dk) !important; border-radius: 8px; padding: 10px 20px !important; font-weight: 700 !important; font-size: .8rem !important; text-transform: uppercase; letter-spacing: 1px; border: 2px solid var(--a); transition: .3s; }
.btn-cta:hover { background: var(--al); color: var(--dk) !important; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(212,160,23,.3); }

/* ─── Hero Slider ────────────────────────────────────────── */
.hero-slider { position: relative; }
.hero-slider .carousel-item { min-height: 85vh; background-size: cover; background-position: center; position: relative; }
.hero-slider .carousel-item::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,26,46,.85) 0%, rgba(15,41,34,.7) 50%, rgba(27,67,50,.6) 100%); }
.hero-slider .carousel-caption { bottom: auto; top: 50%; transform: translateY(-50%); text-align: left; left: 0; right: 0; padding: 0; }
.hero-badge { display: inline-block; background: rgba(212,160,23,.15); border: 1px solid rgba(212,160,23,.3); padding: 6px 18px; border-radius: 30px; font-size: .72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--al); margin-bottom: 18px; }
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.hero-title span { color: var(--al); }
.hero-text { color: rgba(255,255,255,.65); font-size: 1.05rem; line-height: 1.8; max-width: 520px; margin-bottom: 2rem; }
.btn-hero { background: var(--a); color: var(--dk); border: 2px solid var(--a); padding: 13px 30px; border-radius: 10px; font-weight: 800; font-size: .88rem; transition: .3s; text-decoration: none; display: inline-block; }
.btn-hero:hover { background: var(--al); color: var(--dk); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,160,23,.3); }
.btn-hero-o { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.3); padding: 13px 30px; border-radius: 10px; font-weight: 700; font-size: .88rem; transition: .3s; text-decoration: none; display: inline-block; }
.btn-hero-o:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.carousel-indicators [data-bs-target] { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; opacity: .5; }
.carousel-indicators .active { background: var(--a); border-color: var(--a); opacity: 1; }
.hero-pattern { 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='%23D4A017' fill-opacity='0.05'%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/svg%3E"); pointer-events: none; z-index: 1; }

/* ─── News Ticker ────────────────────────────────────────── */
.news-ticker { background: var(--p); padding: 10px 0; overflow: hidden; }
.ticker-label { background: var(--a); color: var(--dk); font-weight: 800; font-size: .75rem; padding: 5px 16px; border-radius: 6px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; position: relative; z-index: 2; }
.ticker-content { overflow: hidden; flex: 1; }
.ticker-track { display: flex; animation: tickerScroll 35s linear infinite; white-space: nowrap; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { color: #fff; font-weight: 600; font-size: .85rem; padding: 0 40px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.badge-new { background: #E74C3C; color: #fff; padding: 2px 7px; border-radius: 4px; font-size: .6rem; font-weight: 800; letter-spacing: 1px; animation: blink 1.5s infinite; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ─── Section Helpers ────────────────────────────────────── */
.sp { padding: 72px 0; }
.st { font-size: 2rem; margin-bottom: .4rem; }
.ss { color: var(--p); font-weight: 800; font-size: .75rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 6px; }
.sl { width: 55px; height: 4px; background: linear-gradient(90deg, var(--a), var(--al)); border-radius: 2px; margin-top: 10px; }
.sl-c { margin-left: auto; margin-right: auto; }

/* ─── Page Header ────────────────────────────────────────── */
.page-header { background: linear-gradient(135deg, var(--dk) 0%, #0F2922 50%, var(--p) 100%); padding: 100px 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='%23D4A017' fill-opacity='0.05'%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/svg%3E"); }
.page-header h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); position: relative; z-index: 1; }
.page-header .breadcrumb { position: relative; z-index: 1; }
.page-header .breadcrumb a { color: var(--al); text-decoration: none; }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,.6); }

/* ─── Stats ──────────────────────────────────────────────── */
.stats { background: var(--p); position: relative; overflow: hidden; }
.stats::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.04'%3E%3Cpath d='M20 20.5V18H0v-2h20V0h2v16h18v2H22v20h-2V20.5z'/%3E%3C/g%3E%3C/svg%3E"); }
.stat-n { font-family: var(--fd); font-size: 2.6rem; color: var(--al); line-height: 1; }
.stat-l { color: rgba(255,255,255,.7); font-weight: 600; font-size: .85rem; margin-top: 4px; }

/* ─── Cards ──────────────────────────────────────────────── */
.card-e { background: #fff; border-radius: 14px; border: 1px solid var(--br); transition: .4s; overflow: hidden; height: 100%; }
.card-e:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(27,67,50,.1); }

/* ─── Facility Card ──────────────────────────────────────── */
.fac-icon { width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(135deg, var(--p), var(--pl)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto 14px; transition: .4s; }
.card-e:hover .fac-icon { transform: scale(1.1) rotate(5deg); }

/* ─── News Card ──────────────────────────────────────────── */
.news-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--br); height: 100%; transition: .4s; background: #fff; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,.08); }
.news-date { position: absolute; top: 14px; right: 14px; background: var(--a); color: var(--dk); padding: 6px 8px; border-radius: 8px; text-align: center; font-weight: 800; line-height: 1; }
.news-date .d { display: block; font-size: 1.2rem; }
.news-date .m { display: block; font-size: .6rem; letter-spacing: 1px; text-transform: uppercase; }

/* ─── Event Card ─────────────────────────────────────────── */
.evt-card { padding: 16px; border-radius: 10px; background: #fff; border: 1px solid var(--br); border-left: 4px solid var(--a); transition: .3s; margin-bottom: 12px; }
.evt-card:hover { background: var(--cr); transform: translateX(4px); }

/* ─── Topper Card ────────────────────────────────────────── */
.topper-card { text-align: center; background: #fff; border-radius: 14px; padding: 28px 16px; border: 1px solid var(--br); transition: .4s; height: 100%; }
.topper-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(27,67,50,.1); }
.topper-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 4px solid var(--cr); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--p), var(--pl)); }

/* ─── Gallery ────────────────────────────────────────────── */
.gal-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gal-item:hover img { transform: scale(1.08); }
.gal-ov { position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(27,67,50,.8)); opacity: 0; transition: .3s; display: flex; align-items: flex-end; padding: 16px; }
.gal-item:hover .gal-ov { opacity: 1; }

/* ─── Staff Card ─────────────────────────────────────────── */
.staff-card { text-align: center; background: #fff; border-radius: 14px; padding: 28px 18px; border: 1px solid var(--br); transition: .4s; height: 100%; }
.staff-card:hover { transform: translateY(-6px); box-shadow: 0 14px 36px rgba(27,67,50,.12); }
.staff-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--cr); box-shadow: 0 6px 20px rgba(0,0,0,.08); margin: 0 auto 14px; }
.staff-avatar { width: 110px; height: 110px; border-radius: 50%; background: linear-gradient(135deg, var(--p), var(--pl)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2.5rem; font-weight: 800; margin: 0 auto 14px; }

/* ─── Document Card ──────────────────────────────────────── */
.doc-card { background: #fff; border-radius: 14px; padding: 24px; border: 1px solid var(--br); transition: .3s; height: 100%; }
.doc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(27,67,50,.08); border-color: var(--p); }
.doc-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 14px; }

/* ─── Principal Section ──────────────────────────────────── */
.principal-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,.06); border: 1px solid var(--br); }
.principal-img-col { background: linear-gradient(180deg, var(--p), var(--pl)); display: flex; align-items: center; justify-content: center; padding: 36px 20px; }
.principal-photo { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; border: 5px solid rgba(255,255,255,.2); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.principal-quote { font-size: 1.02rem; line-height: 1.85; color: #555; padding-left: 20px; border-left: 4px solid var(--a); }

/* ─── Footer ─────────────────────────────────────────────── */
.footer { background: var(--dk); color: rgba(255,255,255,.65); padding-top: 56px; }
.footer h5 { color: #fff; font-family: var(--fd); font-size: 1.1rem; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer h5::after { content: ''; position: absolute; bottom: 0; left: 0; width: 32px; height: 3px; background: var(--a); border-radius: 2px; }
.footer a { color: rgba(255,255,255,.6); text-decoration: none; transition: .3s; }
.footer a:hover { color: var(--al); padding-left: 3px; }
.footer-links li { padding: 5px 0; }
.footer-links li i { color: var(--a); margin-right: 6px; font-size: .65rem; }
.ft-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; margin-top: 40px; font-size: .8rem; }
.ft-social a { width: 38px; height: 38px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); transition: .3s; margin-right: 6px; }
.ft-social a:hover { background: var(--a); color: var(--dk); border-color: var(--a); padding-left: 0; }

/* ─── Back to Top ────────────────────────────────────────── */
.btt { position: fixed; bottom: 20px; right: 20px; width: 44px; height: 44px; border-radius: 10px; background: var(--p); color: #fff; border: none; font-size: 1rem; cursor: pointer; z-index: 100; opacity: 0; transform: translateY(20px); transition: .3s; box-shadow: 0 6px 20px rgba(27,67,50,.3); }
.btt.v { opacity: 1; transform: translateY(0); }
.btt:hover { background: var(--a); color: var(--dk); }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-emrs { background: var(--p); color: #fff; border: 2px solid var(--p); padding: 10px 24px; border-radius: 10px; font-weight: 700; font-size: .88rem; transition: .3s; }
.btn-emrs:hover { background: var(--pl); color: #fff; transform: translateY(-2px); }
.btn-emrs-outline { background: transparent; color: var(--p); border: 2px solid var(--p); padding: 10px 24px; border-radius: 10px; font-weight: 700; font-size: .88rem; transition: .3s; }
.btn-emrs-outline:hover { background: var(--p); color: #fff; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .hero-slider .carousel-item { min-height: 70vh; }
  .hero-slider .carousel-caption { padding: 0 20px; }
  .sp { padding: 48px 0; }
  .navbar-e .nav-link::after { display: none; }
}
@media (max-width: 575.98px) {
  .hero-title { font-size: 1.7rem !important; }
  .hero-slider .carousel-item { min-height: 60vh; }
  .st { font-size: 1.5rem; }
  .stat-n { font-size: 2rem; }
}
