/* ========================================================
   GC Abohar — Bootstrap 5 Custom Styles
   Overrides Bootstrap defaults and adds custom animations
   ======================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Brand Color Overrides (Bootstrap 5 CSS vars) ── */
:root {
  --bs-primary: #1E3A8A;
  --bs-primary-rgb: 30, 58, 138;
  --bs-secondary: #F59E0B;
  --bs-secondary-rgb: 245, 158, 11;
  --bs-body-font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --brand-primary: #1E3A8A;
  --brand-secondary: #F59E0B;
}

/* ── Global body ── */
body {
  font-family: var(--bs-body-font-family);
  background-color: #f9fafb;
  color: #111827;
}

/* ── Preloader ── */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s ease, visibility .8s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  animation: logoPulse 1.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.8; }
}

/* ── Brand utility classes ── */
.text-brand-primary {
  color: var(--brand-primary) !important;
}

.text-brand-secondary {
  color: var(--brand-secondary) !important;
}

.bg-brand-primary {
  background-color: var(--brand-primary) !important;
}

.bg-brand-secondary {
  background-color: var(--brand-secondary) !important;
}

.border-brand-primary {
  border-color: var(--brand-primary) !important;
}

.border-brand-secondary {
  border-color: var(--brand-secondary) !important;
}

/* ── Buttons ── */
.btn-brand-primary {
  background-color: var(--brand-primary);
  color: #fff;
  border: none;
}

.btn-brand-primary:hover {
  background-color: #162d6b;
  color: #fff;
}

.btn-brand-secondary {
  background-color: var(--brand-secondary);
  color: var(--brand-primary);
  border: none;
  font-weight: 700;
}

.btn-brand-secondary:hover {
  background-color: #d97706;
  color: var(--brand-primary);
}

/* ── Section spacing (matches Tailwind py-20) ── */
.py-section {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

/* ── Tracking utilities ── */
.tracking-widest {
  letter-spacing: .15em;
}

/* ============================================================
   TOP NAV
   ============================================================ */
#top-nav a,
#top-nav span {
  font-size: .875rem;
}

#top-nav a:hover {
  color: var(--brand-secondary) !important;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  transition: all .3s ease;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

#navbar.scrolled {
  padding-top: .5rem;
  padding-bottom: .5rem;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .10);
}

.navbar-brand h1 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.navbar-brand p {
  font-size: .7rem;
  letter-spacing: .18em;
  font-weight: 600;
}

/* Nav link underline on hover */
.nav-item .nav-link {
  position: relative;
  font-weight: 500;
  color: #374151 !important;
  padding-bottom: 4px;
}

.nav-item .nav-link::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-secondary);
  transition: width .3s ease;
}

.nav-item .nav-link:hover {
  color: var(--brand-primary) !important;
}

.nav-item .nav-link:hover::after {
  width: 100%;
}

/* Bootstrap dropdown (login) */
.login-dropdown-btn {
  border-radius: 50px !important;
  font-weight: 600;
  padding: .5rem 1.5rem;
}

.dropdown-item svg {
  flex-shrink: 0;
}

/* ============================================================
   NEWS TICKER
   ============================================================ */
#ticker-wrap {
  background-color: #fffbeb;
  border-top: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
  padding: .5rem 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--brand-secondary);
  color: #fff;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: .875rem;
  z-index: 2;
  text-decoration: none;
  transition: background-color .3s ease;
}

.ticker-label:hover {
  background-color: var(--brand-primary);
  color: #fff;
}

@keyframes ticker {
  0% {
    transform: translateX(100vw);
  }

  100% {
    transform: translateX(-100%);
  }
}

.animate-ticker {
  display: inline-block;
  white-space: nowrap;
  padding-left: 140px;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  margin: 0 2rem;
  font-weight: 500;
  color: var(--brand-primary);
}

/* ============================================================
   HERO SLIDER (custom — same logic as before)
   ============================================================ */
#hero {
  position: relative;
  height: 650px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.5);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  color: #fff;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
  pointer-events: none;
}

.hero-content.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-secondary);
  color: var(--brand-primary);
  padding: .25rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.15rem;
  max-width: 36rem;
  margin-bottom: 2.5rem;
  color: #e5e7eb;
}

/* Hero controls */
.hero-controls {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 20;
  display: flex;
  gap: 1rem;
}

.hero-ctrl-btn {
  padding: .75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  cursor: pointer;
  transition: background .2s;
  line-height: 0;
}

.hero-ctrl-btn:hover {
  background: rgba(255, 255, 255, .25);
}

/* Hero dots */
.hero-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: .5rem;
}

.dot-indicator {
  width: .75rem;
  height: .75rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, .3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .3s ease;
}

.dot-indicator.active {
  width: 2rem;
  background: var(--brand-secondary);
}

/* ============================================================
   PRINCIPAL'S MESSAGE
   ============================================================ */
.principal-photo-card {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, .18);
}

.principal-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--brand-primary);
  color: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.stat-divider {
  border-color: #e5e7eb !important;
}

/* ============================================================
   ACADEMICS
   ============================================================ */
.course-card {
  border-radius: 1rem !important;
  border: 1px solid #f3f4f6 !important;
  transition: transform .3s ease, box-shadow .3s ease;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .12) !important;
}

.subject-badge {
  background: #f3f4f6;
  color: #374151;
  padding: .25rem .75rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 500;
}

/* ============================================================
   STUDENT SERVICES
   ============================================================ */
#students {
  position: relative;
  overflow: hidden;
}

#students::before {
  content: '';
  position: absolute;
  top: 0;
  right: -25%;
  width: 33%;
  height: 100%;
  background: rgba(255, 255, 255, .05);
  transform: skewX(12deg);
}

.service-card {
  border-radius: 1rem !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
}

/* ============================================================
   FACULTY
   ============================================================ */
.faculty-card .faculty-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter .5s ease, transform .5s ease;
}

.faculty-card:hover .faculty-img {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.faculty-img-wrap {
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-item {
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
  transition: box-shadow .3s ease;
}

.gallery-item:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, .18);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer a {
  transition: color .2s;
}

footer a:hover {
  color: var(--brand-secondary) !important;
}

/* ============================================================
   LOGIN PAGES
   ============================================================ */
.login-card {
  border-radius: 1rem !important;
  border: 1px solid #f3f4f6 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .1) !important;
  animation: fadeInScale .4s ease forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-icon-wrap {
  width: 4rem;
  height: 4rem;
  background: rgba(30, 58, 138, .08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  margin: 0 auto 1rem;
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .2rem rgba(30, 58, 138, .2);
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal-scale {
  opacity: 0;
  transform: scale(.92);
  transition: opacity .6s ease, transform .6s ease;
}

.revealed {
  opacity: 1 !important;
  transform: none !important;
}