/* Custom CSS for Chidananda Website Additions */

/* Form style inside Hero section */
#hero-admission-form-outer {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Glassmorphism card for the hero form */
.hero-glass-card {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-glass-card input,
.hero-glass-card select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: all 0.3s ease;
}

.hero-glass-card input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.hero-glass-card input:focus,
.hero-glass-card select:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #f97316;
  /* Orange color */
  outline: none;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}

.hero-glass-card select option {
  background: #0f172a;
  color: #ffffff;
}

/* Orange Submit Button */
.btn-submit-orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.btn-submit-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
}

.btn-submit-orange:active {
  transform: translateY(0);
}

/* Spinner */
.spinner-loader {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid #ffffff;
  width: 20px;
  height: 20px;
  animation: spin-anim 1s linear infinite;
}

@keyframes spin-anim {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Active navigation link indicator */
/* Active navigation link indicator */
.nav-link-custom {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #f97316;
  transition: width 0.3s ease;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
  width: 100%;
}

/* Premium Navbar Link Styling for Static Pages */
header nav div.lg\:flex a {
  color: rgba(226, 232, 240, 0.8) !important;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap !important;
}

header nav div.lg\:flex a:hover {
  color: #ffffff !important;
}

header nav div.lg\:flex a.active {
  color: #f97316 !important;
}

/* Ensure all injected nav links don't wrap */
header nav .nav-link-custom {
  white-space: nowrap !important;
}

/* Mobile Drawer Links Styling */
#mobile-drawer-content a:not([href="/admin"]) {
  color: rgba(226, 232, 240, 0.8) !important;
  transition: all 0.3s ease;
}

#mobile-drawer-content a:not([href="/admin"]):hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Button Shine Sweep Effect */
.btn-submit-orange {
  position: relative;
  overflow: hidden;
}

.btn-submit-orange::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.25),
      transparent);
  transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit-orange:hover::before {
  left: 100%;
}

/* Themed Card Hover Glow Effects */
.card-gradient-border.border-blue-500:hover {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15) !important;
}

.card-gradient-border.border-purple-500:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15) !important;
}

.card-gradient-border.border-green-500:hover {
  border-color: rgba(34, 197, 94, 0.5) !important;
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.15) !important;
}

.card-gradient-border.border-orange-500:hover {
  border-color: rgba(249, 115, 22, 0.5) !important;
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.15) !important;
}

.card-gradient-border.border-pink-500:hover {
  border-color: rgba(236, 72, 153, 0.5) !important;
  box-shadow: 0 20px 40px rgba(236, 72, 153, 0.15) !important;
}

.card-gradient-border.border-cyan-500:hover {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15) !important;
}

.card-gradient-border.border-amber-500:hover {
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15) !important;
}

.card-gradient-border.border-indigo-500:hover {
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15) !important;
}

.card-gradient-border.border-teal-500:hover {
  border-color: rgba(20, 184, 166, 0.5) !important;
  box-shadow: 0 20px 40px rgba(20, 184, 166, 0.15) !important;
}

.card-gradient-border.border-red-500:hover {
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.15) !important;
}

/* Responsive Helper Utilities for Static Pages */
@media (min-width: 640px) {
  .sm\:px-6 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .sm\:inline-flex {
    display: inline-flex !important;
  }

  .sm\:p-8 {
    padding: 2rem !important;
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .md\:py-28 {
    padding-top: 7rem !important;
    padding-bottom: 7rem !important;
  }

  .md\:py-24 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }

  .md\:text-5xl {
    font-size: 3rem !important;
    line-height: 1 !important;
  }
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex !important;
  }

  .lg\:hidden {
    display: none !important;
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .lg\:px-8 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  .lg\:text-6xl {
    font-size: 3.75rem !important;
    line-height: 1 !important;
  }
}

/* Reveal on Scroll Transitions */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.animated {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Transition Delays for Reveal */
.delay-100 {
  transition-delay: 100ms !important;
}

.delay-150 {
  transition-delay: 150ms !important;
}

.delay-200 {
  transition-delay: 200ms !important;
}

.delay-250 {
  transition-delay: 250ms !important;
}

.delay-300 {
  transition-delay: 300ms !important;
}

.delay-350 {
  transition-delay: 350ms !important;
}

.delay-400 {
  transition-delay: 400ms !important;
}

.delay-450 {
  transition-delay: 450ms !important;
}

.delay-500 {
  transition-delay: 500ms !important;
}

/* Theme Background & Utility overrides for high readability */
.bg-slate-950 {
  background-color: #020617 !important;
}

.bg-slate-900 {
  background-color: #0f172a !important;
}

.bg-slate-900\/95 {
  background-color: rgba(15, 23, 42, 0.95) !important;
}

.bg-orange-500\/10 {
  background-color: rgba(249, 115, 22, 0.1) !important;
}

.bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.bg-black\/40 {
  background-color: rgba(0, 0, 0, 0.4) !important;
}

.bg-black\/60 {
  background-color: rgba(0, 0, 0, 0.6) !important;
}

.bg-blue-500\/10 {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.bg-purple-500\/10 {
  background-color: rgba(168, 85, 247, 0.1) !important;
}

.bg-green-500\/10 {
  background-color: rgba(34, 197, 94, 0.1) !important;
}

.bg-pink-500\/10 {
  background-color: rgba(236, 72, 153, 0.1) !important;
}

.bg-cyan-500\/10 {
  background-color: rgba(6, 182, 212, 0.1) !important;
}

.bg-amber-500\/10 {
  background-color: rgba(245, 158, 11, 0.1) !important;
}

.bg-indigo-500\/10 {
  background-color: rgba(99, 102, 241, 0.1) !important;
}

.bg-teal-500\/10 {
  background-color: rgba(20, 184, 166, 0.1) !important;
}

.bg-red-500\/10 {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Text Color Classes for Light/Dark backgrounds */
.text-white {
  color: #ffffff !important;
}

.text-white\/70 {
  color: rgba(255, 255, 255, 0.7) !important;
}

.text-white\/60 {
  color: rgba(255, 255, 255, 0.6) !important;
}

.text-white\/50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

.text-white\/40 {
  color: rgba(255, 255, 255, 0.4) !important;
}

.text-orange-500 {
  color: #f97316 !important;
}

.text-slate-300 {
  color: #cbd5e1 !important;
}

.text-slate-400 {
  color: #94a3b8 !important;
}

/* Icon box specific color overrides in Hub Grid */
.icon-box.text-blue-500 {
  color: #3b82f6 !important;
}

.icon-box.text-purple-500 {
  color: #a855f7 !important;
}

.icon-box.text-green-500 {
  color: #22c55e !important;
}

.icon-box.text-orange-500 {
  color: #f97316 !important;
}

.icon-box.text-pink-500 {
  color: #ec4899 !important;
}

.icon-box.text-cyan-500 {
  color: #06b6d4 !important;
}

.icon-box.text-amber-500 {
  color: #f59e0b !important;
}

.icon-box.text-indigo-500 {
  color: #6366f1 !important;
}

.icon-box.text-teal-500 {
  color: #14b8a6 !important;
}

.icon-box.text-red-500 {
  color: #ef4444 !important;
}

/* Scrolling Admission Banner Styles */
#scrolling-admission-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #ea580c 0%, #f97316 50%, #ea580c 100%);
  background-size: 200% auto;
  animation: shine-bg 6s linear infinite;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.25);
}

@keyframes shine-bg {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.marquee-container {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  padding: 0 4rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  font-size: 0.8rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0%);
  }

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

/* Side-by-Side Admission Form & Image Layout */
.apply-now-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 3.5rem auto 0 auto;
}

@media (min-width: 1024px) {
  .apply-now-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 2rem;
  }
}

.apply-now-image-wrapper {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  min-height: 380px;
  align-self: start;
}

.apply-now-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.apply-now-image-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.35);
}

.apply-now-image-wrapper:hover img {
  transform: scale(1.04);
}

.apply-now-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0) 50%);
  pointer-events: none;
}

/* Gallery Lightbox modal */
.gallery-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gallery-lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 50%;
}

.gallery-lightbox-close:hover {
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-image {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox-modal.active .gallery-lightbox-image {
  transform: scale(1);
}

/* Premium Consent Checkbox */
.consent-checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.85rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.consent-checkbox-container:hover {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.consent-checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f97316;
  border-radius: 4px;
  margin-top: 1px;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.consent-checkbox-container label {
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Premium Math Captcha */
.captcha-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem 1rem;
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.captcha-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.captcha-header svg {
  color: #f97316;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.captcha-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.captcha-question {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18) 0%, rgba(234, 88, 12, 0.3) 100%);
  border: 1px solid rgba(249, 115, 22, 0.45);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  min-w-[95px];
  text-align: center;
  user-select: none;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
  flex-shrink: 0;
}

.captcha-input {
  flex-grow: 1;
}

/* --- Admin Panel Premium Sidebar Styling --- */
aside.w-72 {
  background-color: #f8fafc !important; /* Premium off-white background */
  border-right: 1px solid #e2e8f0 !important;
}

button.admin-tab-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 0.75rem !important;
  width: calc(100% - 16px) !important; /* Premium side padding offset */
  margin: 4px 8px !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600 !important;
  color: #64748b !important; /* slate-500 */
  background-color: transparent !important;
  transition: all 0.2s ease-in-out !important;
  border: none !important;
  cursor: pointer !important;
}

/* Inactive button hover state */
button.admin-tab-btn:hover {
  background-color: #f1f5f9 !important; /* slate-100 */
  color: #0f172a !important; /* slate-900 */
}

/* Active button state - Premium White Card with Shadow & Orange left border indicator */
button.admin-tab-btn.bg-black {
  background-color: #ffffff !important; /* Pure White Card */
  color: #ea580c !important; /* Brand Orange text */
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
  border-left: 4px solid #ea580c !important;
  border-top-left-radius: 0px !important;
  border-bottom-left-radius: 0px !important;
}

/* SVG icons within the button */
button.admin-tab-btn svg {
  flex-shrink: 0 !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  transition: transform 0.2s ease-in-out !important;
}

button.admin-tab-btn:hover svg {
  transform: scale(1.05);
}

/* --- Fix Admission & Contact Page Submit Buttons --- */
#cap-submit-btn,
#adm-page-submit-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3) !important;
  transition: all 0.2s ease-in-out !important;
}

#cap-submit-btn:hover,
#adm-page-submit-btn:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* --- Premium Input & Select Focus Ring States --- */
#custom-contact-app-form input:focus,
#custom-contact-app-form select:focus,
#admission-page-element input:focus,
#admission-page-element select:focus {
  background-color: #ffffff !important;
  outline: none !important;
  border-color: #f97316 !important; /* Orange border */
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25) !important; /* Orange focus ring */
}
