/* =============================================================
   PAGES.CSS — Page-Specific Styles
   ============================================================= */

/* ─── HERO SECTION (Home) ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-height);
  background: var(--bg-main);
  /* GPU Accel for sharpness */
  perspective: 1000px;
  transform-style: preserve-3d;
}

.hero__scroller {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45; 
  filter: sepia(0.3) contrast(1.2) brightness(1.1);
  transition: opacity 1s ease;
}

.hero__scroller-images {
  display: flex;
  height: 100%;
  width: 400%; /* 4 images total */
  animation: scroll-bg 40s linear infinite;
}

.hero__scroller-img {
  flex: 1;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.5);
}

@keyframes scroll-bg {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Scroll through the first 2 images to reach the start of the second 2 */
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-main) 100%);
  z-index: 1;
}

/* (Removed video style in favor of static school background) */

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 4, 18, 0.4) 0%,
    rgba(2, 4, 18, 0.7) 40%,
    rgba(2, 4, 18, 0.9) 70%,
    var(--bg-primary) 100%
  );
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 var(--space-6);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-full);
  color: var(--color-gold-vivid);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-glow-gold);
  animation: heroFadeIn 1s ease both;
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  letter-spacing: -2px;
}

.hero__title .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: var(--text-xl);
  color: var(--color-gold-metallic);
  font-weight: 600;
  letter-spacing: 8px;
  text-transform: uppercase;
  margin-bottom: var(--space-12);
}

.hero__desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto var(--space-8);
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-xs);
  animation: float 2s ease-in-out infinite;
}

.hero__scroll-indicator .arrow {
  font-size: 1.5rem;
  animation: float 1.5s ease-in-out infinite;
}

/* ─── FEATURED SECTION (Home) ─── */
.featured-section {
  position: relative;
}

.featured-carousel {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-4);
  scrollbar-width: none;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-carousel .media-card {
  min-width: 320px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ─── ABOUT PAGE ─── */
.about-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.about-vision__card {
  padding: var(--space-8);
}

.about-vision__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.about-vision__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

/* Leadership Cards */
.leader-card {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-6);
  align-items: center;
}

.leader-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-gold-metallic);
  box-shadow: var(--shadow-glow-gold);
  flex-shrink: 0;
}

.leader-card__name {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.leader-card__role {
  font-size: var(--text-sm);
  color: var(--color-electric-blue);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.leader-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── TESTIMONIALS SECTION ─── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.testimonial-card {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  border-color: var(--color-gold-vivid);
}

.testimonial-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
}

.testimonial-card__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-gold-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.testimonial-card__info {
  flex: 1;
}

.testimonial-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 2px;
}

.testimonial-card__stars {
  color: var(--color-gold-vivid);
  font-size: var(--text-xs);
  letter-spacing: 2px;
}

.testimonial-card__google-icon {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.testimonial-card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
}

/* ─── HISTORY PAGE — Timeline ─── */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-gold-metallic),
    var(--color-gold-dark),
    transparent
  );
  transform: translateX(-50%);
}

.timeline__item {
  position: relative;
  width: 50%;
  padding: var(--space-6);
  padding-right: var(--space-10);
}

.timeline__item:nth-child(even) {
  margin-left: 50%;
  padding-left: var(--space-10);
  padding-right: var(--space-6);
}

.timeline__dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--gradient-primary);
  border-radius: 50%;
  top: var(--space-8);
  box-shadow: var(--shadow-glow-blue);
}

.timeline__item:nth-child(odd) .timeline__dot {
  right: -8px;
}

.timeline__item:nth-child(even) .timeline__dot {
  left: -8px;
}

.timeline__year {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-gold-vivid);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-2);
}

.timeline__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.timeline__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

.section {
  padding: var(--space-24) 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
  padding: 0 var(--space-6);
}

.section-header__tagline {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-gold-metallic);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: var(--space-4);
}

.section-header__title {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.section-header__title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Timeline Mobile */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline__item,
  .timeline__item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 50px;
    padding-right: 0;
  }

  .timeline__item:nth-child(odd) .timeline__dot,
  .timeline__item:nth-child(even) .timeline__dot {
    left: 12px;
    right: auto;
  }
}

/* ─── ALUMNI PAGE ─── */
.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* ─── GALLERY PAGE ─── */
.gallery-grid, .grid--media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
}

.media-card__image {
  width: 100%;
  height: 280px;
  object-fit: contain; /* Don't cut any image */
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-lg);
  display: block;
}

.gallery-grid .media-card {
  animation: heroFadeIn 0.5s ease both;
}

/* ─── CONTACT PAGE ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  flex-shrink: 0;
  color: #fff;
}

.contact-item__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.contact-item__value {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 500;
}

/* Gallery Overhaul */
.grid--media {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.media-card__image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.media-card__image.video-large {
  height: 440px;
}

.video-card-large {
  grid-column: span 2;
}

/* Balanced Home Video */
.home-hero-video {
  position: relative;
  width: 100%;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4);
}

.home-hero-video__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-12) var(--space-8);
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}

@media (max-width: 992px) {
  .video-card-large {
    grid-column: span 1;
  }
}

.contact-map {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  height: 400px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-vision {
    grid-template-columns: 1fr;
  }

  .leader-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Admin Professional Sidebar ─── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

/* Futuristic background aura */
.admin-layout::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle at 80% 20%, rgba(122, 0, 255, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(0, 191, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: aura-pulse 10s infinite alternate ease-in-out;
}

@keyframes aura-pulse {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

.admin-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(8, 12, 40, 0.98) 0%, rgba(2, 4, 18, 0.98) 100%);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border-right: 1px solid var(--border-glass);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  z-index: 10;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-10);
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-6);
  border-radius: var(--radius-2xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-electric-blue);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.admin-section {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: var(--space-6);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.admin-sidebar__link:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.admin-sidebar__link.active {
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold-vivid);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.admin-main {
  padding: var(--space-8);
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }
}

/* Admin Media Table */
.media-table {
  width: 100%;
  border-collapse: collapse;
}

.media-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}

.media-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-glass);
  vertical-align: middle;
}

.media-table tr:hover td {
  background: var(--bg-glass);
}

.media-table__thumb {
  width: 60px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.media-table__actions {
  display: flex;
  gap: var(--space-2);
}

/* ─── LOGIN SCREEN ─── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.login-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  padding: var(--space-10);
}

.login-card__icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
}

.login-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.login-card__desc {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}

.btn--google {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: #fff;
  color: #333;
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.btn--google:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--google img {
  width: 20px;
  height: 20px;
}

/* File preview in upload */
.upload-preview {
  margin-top: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  max-height: 200px;
  display: none;
}

.upload-preview.active {
  display: block;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: var(--bg-secondary);
}


/* --- Faculty Premium Design --- */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.teacher-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.teacher-card:hover {
  transform: translateY(-10px);
  border-color: #D4AF37;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.teacher-card__img-wrapper {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.teacher-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.teacher-card:hover .teacher-card__img {
  transform: scale(1.05);
}

.teacher-card__content {
  padding: var(--space-6);
}

.teacher-card__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.teacher-card__subject {
  font-size: 0.75rem;
  font-weight: 800;
  color: #D4AF37;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.teacher-card__info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

@media (max-width: 992px) {
  .teacher-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .teacher-grid { grid-template-columns: 1fr; }
}


/* --- Faculty Filter Bar --- */
.faculty-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-full);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.faculty-filter__btn {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faculty-filter__btn:hover {
  color: #fff;
}

.faculty-filter__btn.active {
  background: #D4AF37;
  color: #020412;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.section-group {
  display: none;
}

.section-group.active {
  display: block;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* --- Mobile Faculty Tuning --- */
@media (max-width: 500px) {
  .teacher-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .teacher-card__name {
    font-size: 1.1rem;
  }
}
