/* Custom animations and styling for Bright Career Academy */
:root {
  --primary-color: #1e40af;
  --secondary-color: #3b82f6;
  --accent-color: #f59e0b;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}
.service-icon {
  transition: transform 0.3s ease;
}

/* Preloader Animation */
#preloader {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}
.preloader-logo {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.2);
  animation: pulse-logo 2s infinite ease-in-out;
  margin-bottom: 24px;
}
.preloader-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.loader-bar-container {
  width: 200px;
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  background-color: #1e40af;
  border-radius: 4px;
  animation: loading-bar 1.2s ease-in-out forwards;
}

@keyframes pulse-logo {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 18px rgba(30, 64, 175, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 64, 175, 0); }
}
@keyframes loading-bar {
  0% { width: 0%; }
  60% { width: 75%; }
  100% { width: 100%; }
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* SPA Page Views */
.page-view {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.page-view.active {
  display: block;
  opacity: 1;
  animation: fadeInView 0.4s ease forwards;
}
@keyframes fadeInView {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast Notification */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100002;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: white;
  border-left: 4px solid #10b981;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  padding: 14px 20px;
  border-radius: 10px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  max-width: 380px;
}
.toast.show {
  transform: translateX(0);
}
.toast.error {
  border-left-color: #ef4444;
}

/* Table styling */
.custom-table-container {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}
.custom-table-container::-webkit-scrollbar {
  height: 6px;
}
.custom-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Rock-solid top navbar fixation across all viewports and hosting setups */
#navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 50 !important;
  margin: 0 !important;
  transform: none !important;
}

/* Admin Portal Text CMS & Custom Override Indicator */
.text-has-custom-override {
  transition: background-color 0.3s ease;
}

.admin-field-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-field-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.08);
}

