﻿/* =========================================
   ST. THERESE PRE & PRIMARY SCHOOL
   ========================================= */
:root {
  --primary: #8B1C1B;
  --primary-dark: #6b1414;
  --gold: #FCEB8E;
  --gold-light: #FEF8D6;
  --text: #333333;
  --text-light: #666666;
  --bg-light: #f9f9f9;
  --white: #ffffff;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-main); color: var(--text); line-height: 1.6; background-color: var(--white); }
h1, h2, h3, h4 { color: var(--primary); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.topbar { background-color: var(--primary); color: var(--white); font-size: 0.85rem; padding: 10px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.topbar a { color: var(--white); margin-right: 15px; transition: opacity 0.2s; }
.topbar a:hover { opacity: 0.8; }

.header { background-color: var(--white); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.brand { display: flex; align-items: center; gap: 15px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.4rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; }
.brand-text b { font-size: 0.9rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.nav { display: flex; gap: 25px; align-items: center; }
.nav a { font-weight: 600; color: var(--text); transition: color 0.2s; }
.nav a:hover, .nav a.active { color: var(--primary); }

.hero { position: relative; min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); padding: 100px 20px; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero h1 { color: var(--white); font-size: 3.5rem; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.2rem; margin-bottom: 30px; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

.btn { display: inline-block; padding: 12px 30px; border-radius: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s; cursor: pointer; border: 2px solid transparent; }
.btn-gold { background-color: var(--gold); color: var(--primary); }
.btn-gold:hover { background-color: var(--white); border-color: var(--gold); }
.btn-outline { background-color: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background-color: var(--white); color: var(--primary); }

.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 40px; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background-color: var(--gold); margin: 15px auto 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-text p { margin-bottom: 20px; font-size: 1.1rem; color: var(--text-light); }
.about-image img { border-radius: 10px; box-shadow: 15px 15px 0 var(--gold-light); }

.pillars { background-color: var(--bg-light); }
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.pillar-card { background: var(--white); padding: 40px 30px; border-radius: 10px; text-align: center; border-top: 5px solid var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.pillar-icon { font-size: 2.5rem; margin-bottom: 20px; }
.pillar-card h3 { margin-bottom: 15px; font-size: 1.4rem; }
.pillar-card p { color: var(--text-light); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; height: 250px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-label { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: var(--white); padding: 20px 15px 10px; font-weight: 600; text-align: center; }

.footer { background-color: var(--primary); color: var(--white); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer h3 { color: var(--gold); margin-bottom: 20px; font-size: 1.2rem; }
.footer p, .footer a { color: rgba(255,255,255,0.8); margin-bottom: 10px; display: block; }
.footer a:hover { color: var(--gold); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.footer-motto { color: var(--gold) !important; font-weight: 600; margin-top: 10px; font-size: 1rem; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { order: -1; }
  .nav-wrap { flex-direction: column; gap: 15px; }
  .nav { flex-wrap: wrap; justify-content: center; gap: 15px; }
  .topbar-inner { flex-direction: column; gap: 10px; }
}

/* --- SLIDESHOW --- */
.slideshow-container {
  max-width: 1000px;
  position: relative;
  margin: auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.mySlides {
  display: none;
  position: relative;
  height: 60vh;
  min-height: 400px;
}
.mySlides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}
@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}
.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(139, 28, 27, 0.9));
  color: white;
  padding: 40px 30px 20px;
  text-align: left;
}
.slide-caption h3 {
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 5px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.slide-caption p {
  font-size: 1.1rem;
  margin-bottom: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0,0,0,0.3);
}
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}
.prev:hover, .next:hover {
  background-color: var(--primary);
}
.dots-container {
  text-align: center;
  margin-top: 20px;
}
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}
.active, .dot:hover {
  background-color: var(--primary);
}
@media (max-width: 768px) {
  .mySlides { height: 40vh; min-height: 250px; }
  .slide-caption h3 { font-size: 1.5rem; }
  .slide-caption p { font-size: 0.9rem; }
  .prev, .next { padding: 10px; font-size: 18px; }
}

/* --- HERO SLIDER --- */
.hero-slider {
  position: relative;
  height: 85vh;
  min-height: 500px;
  width: 100%;
  overflow: hidden;
  background-color: #000;
}
.slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}
.slide.active {
  opacity: 1;
  z-index: 2;
}
.slide img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.slide-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7));
  z-index: 2;
}
.slide-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 20px;
  color: white;
  transform: translateY(20px);
  transition: transform 1s ease;
}
.slide.active .slide-content {
  transform: translateY(0);
}
.slide-content h1 {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}
.slide-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.slider-dots .dot {
  height: 12px;
  width: 12px;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}
.slider-dots .dot.active {
  background-color: var(--gold);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .hero-slider { height: 60vh; min-height: 400px; }
  .slide-content h1 { font-size: 2rem; }
  .slide-content p { font-size: 1rem; }
}


/* --- FORCE FIX FOR NAVIGATION --- */
.nav a {
  color: var(--text) !important;
  background: transparent !important;
  display: inline-block !important;
  padding: 5px 0 !important;
}

.nav a.active {
  color: var(--primary) !important;
  font-weight: 700 !important;
}

/* If the red box is from a pseudo-element, hide it */
.nav a::before,
.nav a::after {
  display: none !important;
}

/* =========================================
   PREMIUM MOBILE & TABLET RESPONSIVENESS
   ========================================= */
@media (max-width: 900px) {
  /* Navigation Bar Stacking */
  .nav-wrap {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
  }
  .nav a {
    font-size: 1rem;
    padding: 5px 10px;
  }

  /* Topbar adjustments */
  .topbar-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* Hero Slider Mobile Optimization */
  .hero-slider {
    height: 70vh; /* Keep it tall enough to be impressive */
    min-height: 450px;
  }
  .slide-content h1 {
    font-size: 2.2rem; /* Better fit for mobile screens */
    line-height: 1.2;
    margin-bottom: 10px;
  }
  .slide-content p {
    font-size: 1rem;
    margin-bottom: 25px;
    padding: 0 10px;
  }
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  /* Section Titles */
  .section {
    padding: 50px 0;
  }
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  /* About Grid (Stacks vertically on mobile) */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-image {
    order: -1; /* Photo goes on top */
  }
  .about-text p {
    font-size: 1rem;
  }

  /* Pillars (Mission & Vision) */
  .pillar-grid {
    grid-template-columns: 1fr;
  }
  .pillar-card {
    padding: 30px 20px;
  }

  /* Footer alignment */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  .footer h3 {
    margin-bottom: 15px;
  }
}

/* --- PREMIUM PHOTO GALLERY GRID --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 250px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(139, 28, 27, 0.9));
  color: white;
  padding: 30px 15px 15px;
  font-weight: 600;
  text-align: center;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* 1 column on mobile for large viewing */
  }
}

/* --- PREMIUM MOBILE MENU --- */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--primary);
  cursor: pointer;
  padding: 5px;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block !important;
  }
  
  .nav-wrap {
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-top: 3px solid var(--gold);
    z-index: 999;
  }

  .nav.active {
    display: flex !important;
  }

  .nav a {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
  }
  
  .nav a:last-child {
    border-bottom: none;
  }
}

/* =========================================
   FORCE PREMIUM BRAND COLORS (HEADER & TOPBAR)
   ========================================= */
.topbar {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}
.topbar a {
  color: var(--white) !important;
}
.header {
  background-color: var(--white) !important;
  border-bottom: 3px solid var(--gold) !important;
}
.brand-text strong {
  color: var(--primary) !important;
}
.brand-text b {
  color: var(--text-light) !important;
}

/* Nav Links (Desktop) */
.nav a {
  color: var(--text) !important;
  background: transparent !important;
}
.nav a:hover, .nav a.active {
  color: var(--primary) !important;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: transparent !important;
  border: none;
  font-size: 2rem;
  color: var(--primary) !important;
  cursor: pointer;
  padding: 5px;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block !important;
  }
  .nav-wrap {
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px !important;
  }
  
  /* The Mobile Dropdown */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white) !important;
    flex-direction: column !important;
    padding: 10px 0 !important;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-top: 3px solid var(--gold);
    z-index: 999;
  }
  .nav.active {
    display: flex !important;
  }
  .nav a {
    width: 100%;
    text-align: center;
    padding: 15px 0 !important;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
  }
  .nav a:last-child {
    border-bottom: none;
  }
}

/* --- PREMIUM LIGHTBOX POPUP --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}
.lightbox.show {
  opacity: 1;
}
.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 90%;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lightbox.show .lightbox-content {
  transform: scale(1);
}
.lightbox-content img {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background-color: #f0f0f0;
  display: block;
}
.lightbox-caption {
  padding: 25px 30px;
  background: var(--white);
  border-top: 4px solid var(--gold);
}
.lightbox-caption h3 {
  color: var(--primary);
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.lightbox-caption p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.6;
}
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--white);
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s;
  line-height: 1;
}
.close-lightbox:hover {
  color: var(--gold);
}

@media (max-width: 768px) {
  .lightbox-content { width: 95%; }
  .lightbox-caption { padding: 20px 15px; }
  .lightbox-caption h3 { font-size: 1.3rem; }
  .lightbox-caption p { font-size: 0.95rem; }
  .close-lightbox { top: 10px; right: 20px; font-size: 35px; }
}

/* --- ULTRA PREMIUM LIGHTBOX REDESIGN --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.9); /* Darker, richer background */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
}

.lightbox.show {
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 92%;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.show .lightbox-content {
  transform: scale(1) translateY(0);
}

/* The Magic: object-fit: cover makes it fill the space beautifully */
.lightbox-content img {
  width: 100%;
  height: 65vh; 
  object-fit: cover; 
  object-position: center 25%; /* Keeps faces near the top in view */
  display: block;
}

/* Overlap the caption slightly with a nice shadow for a premium feel */
.lightbox-caption {
  position: relative;
  padding: 35px 40px;
  background: var(--white);
  border-top: 5px solid var(--gold);
  z-index: 2;
}

.lightbox-caption h3 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.lightbox-caption p {
  color: var(--text-light);
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 500;
}

/* A sleek, minimalist close button */
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 25px;
  color: var(--white);
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  line-height: 1;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.close-lightbox:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .lightbox-content { 
    width: 95%; 
    border-radius: 12px;
  }
  .lightbox-content img { 
    height: 45vh; 
  }
  .lightbox-caption { 
    padding: 25px 20px; 
  }
  .lightbox-caption h3 { 
    font-size: 1.5rem; 
  }
  .lightbox-caption p { 
    font-size: 1rem; 
  }
  .close-lightbox { 
    top: 15px; 
    right: 15px; 
    font-size: 30px;
    width: 35px;
    height: 35px;
  }
}

/* --- DRAGGABLE FLOATING APPLY BUTTON --- */
.floating-apply-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #059669;
  color: #ffffff !important;
  padding: 15px 28px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  cursor: grab;
  user-select: none; /* Prevents text highlighting while dragging */
  touch-action: none; /* Prevents scrolling on mobile while dragging */
}

/* The Icon */
.floating-apply-btn .icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

/* The Pro Hover Effect */
.floating-apply-btn:hover {
  background-color: #047857; /* Darker green on hover */
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.6);
}

/* Subtle pulse animation to grab attention */
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.floating-apply-btn {
  animation: pulse-green 2s infinite;
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .floating-apply-btn {
    bottom: 20px;
    right: 50%;
    transform: translateX(50%); /* Centers it at the bottom on mobile */
    padding: 12px 25px;
    font-size: 1rem;
    width: max-content;
    white-space: nowrap;
  }
  .floating-apply-btn:hover {
    transform: translateX(50%) translateY(-3px) scale(1.02); /* Keep centered on mobile hover */
  }
}


/* --- ADMISSIONS PROCESS STYLES --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.process-step {
  text-align: center;
  padding: 30px 20px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  position: relative;
}
.step-number {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 3px solid var(--gold);
}
.process-step h3 {
  margin-bottom: 10px;
  color: var(--primary);
}
.process-step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Form input focus states */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(139, 28, 27, 0.1);
}

/* --- FIX FOR DRAGGABLE BUTTON ON MOBILE --- */
@media (max-width: 768px) {
  .floating-apply-btn {
    bottom: auto !important; /* Let JS handle the bottom */
    right: auto !important;  /* Let JS handle the right */
    position: fixed !important;
    margin: 0 !important;
    /* We set a default starting position if JS hasn't moved it yet */
    top: 80vh; 
    left: 50%;
    transform: translateX(-50%) !important;
    animation: none !important; /* Stop pulsing on mobile so it doesn't lag */
  }
}

/* --- FIX FOR 4-CARD GRID (2x2 on Desktop) --- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .pillar-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- ADVANCED ADMISSIONS HERO --- */
.admissions-hero {
  position: relative;
  background: linear-gradient(135deg, #6b1414 0%, var(--primary) 100%);
  color: white;
  text-align: center;
  padding: 120px 20px;
  overflow: hidden;
}

/* Glowing text effect */
.glow-text {
  color: var(--gold);
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(252, 235, 142, 0.4), 0 0 40px rgba(252, 235, 142, 0.2);
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  from { text-shadow: 0 0 20px rgba(252, 235, 142, 0.4); }
  to { text-shadow: 0 0 30px rgba(252, 235, 142, 0.8), 0 0 50px rgba(252, 235, 142, 0.4); }
}

.admissions-hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* Fade up animation for text */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUpAnim 1s forwards;
}

@keyframes fadeUpAnim {
  to { opacity: 1; transform: translateY(0); }
}

/* The Burst Button */
.btn-burst {
  font-size: 1.3rem;
  padding: 15px 40px;
  border-radius: 50px;
  box-shadow: 0 0 20px rgba(252, 235, 142, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-burst:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 0 40px rgba(252, 235, 142, 0.9);
}

/* CSS Only Confetti/Particles */
#particles-js {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  background-image: 
    radial-gradient(circle, var(--gold) 2px, transparent 2px),
    radial-gradient(circle, #ffffff 1.5px, transparent 1.5px),
    radial-gradient(circle, var(--gold-light) 1px, transparent 1px);
  background-size: 100px 100px, 150px 150px, 200px 200px;
  background-position: 0 0, 40px 60px, 130px 270px;
  animation: fallingParticles 15s linear infinite;
  opacity: 0.3;
}

@keyframes fallingParticles {
  0% { background-position: 0 0, 40px 60px, 130px 270px; }
  100% { background-position: 100px 500px, 140px 560px, 230px 770px; }
}

@media (max-width: 768px) {
  .glow-text { font-size: 2.2rem; }
  .admissions-hero { padding: 80px 20px; }
}

/* --- CELEBRATION POPUP --- */
.celebration-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.celebration-overlay.active {
  opacity: 1;
  visibility: visible;
}

.celebration-content {
  background: white;
  padding: 50px 40px;
  border-radius: 20px;
  text-align: center;
  position: relative;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.8) translateY(20px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.celebration-overlay.active .celebration-content {
  transform: scale(1) translateY(0);
}

.celebration-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  animation: popIcon 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIcon {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.celebration-content h2 {
  color: var(--primary);
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.celebration-content p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Confetti / Flowers Explosion */
.confetti-container {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti-flower {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  opacity: 0.9;
  animation: explodeDown 3s ease-in forwards;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes explodeDown {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(600px) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}
