/* Custom premium styles for Solid Foundation Academy (S.F.A) */
/* Note: Google Fonts loaded via parallel preconnected link tags in index.html for fast CRP */

:root {
  --primary-color: #37389C; /* Deep Royal Blue */
  --primary-text: #24344D;  /* Charcoal Navy */
  --secondary-text: #6C7A89; /* Slate Gray */
  --accent-gold: #F7931E;   /* Golden Orange Accent */
  --accent-green: #2EA0DA;  /* Bright Academic Blue Secondary */
  --bg-off-white: #FAFBFD;  /* Soft White Background */
  --bg-cream: #F2F5FA;      /* Cool Light Gray Background */
  --gold-glow: rgba(247, 147, 30, 0.2);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-off-white);
}
::-webkit-scrollbar-thumb {
  background: rgba(55, 56, 156, 0.15);
  border-radius: 5px;
  border: 2px solid var(--bg-off-white);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  content-visibility: auto;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-off-white);
  color: var(--primary-text);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.font-serif-academy {
  font-family: 'Playfair Display', Georgia, serif;
}

/* SPA page-switching animations */
.page-view {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
}

.page-view.active {
  display: block;
  animation: pageFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Gold border offset frame */
.image-frame-gold {
  position: relative;
}
.image-frame-gold::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: -16px;
  border: 2px solid var(--accent-gold);
  border-radius: 0.75rem;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.4s ease;
}
.image-frame-gold:hover::before {
  transform: translate(-4px, -4px);
}

/* Animated links with expanding underline */
.link-underline {
  position: relative;
}
.link-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-gold);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Dotted background pattern */
.grid-bg-pattern {
  background-image: radial-gradient(rgba(13, 35, 58, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Glassmorphism utility */
.glass-nav {
  background: rgba(55, 56, 156, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Pulse keyframe for gold buttons */
@keyframes goldPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(247, 147, 30, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(247, 147, 30, 0);
  }
}
.pulse-gold {
  animation: goldPulse 2s infinite;
}

/* Dual Curriculum comparison tables cards styling */
.curr-card {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.curr-card:hover {
  transform: translateY(-2px);
}

/* Custom premium fullwidth hero slider transitions */
.hero-slide {
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active-slide {
  opacity: 1 !important;
  z-index: 20 !important;
  pointer-events: auto !important;
}

/* --- Premium Enhancements CSS --- */

/* FAQ Accordion Height Collapse Transitions */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.accordion-content.open {
  max-height: 500px;
}
.accordion-rotate {
  transition: transform 0.3s ease;
}
.accordion-rotate.open {
  transform: rotate(180deg);
}

/* History Timeline Stems */
.timeline-line::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16px;
  width: 2px;
  background-color: var(--accent-gold);
}
@media (min-width: 768px) {
  .timeline-line::before {
    left: 50%;
    margin-left: -1px;
  }
}

/* Scroll Progress Bar styling */
#scroll-progress {
  height: 4px;
  background-color: var(--accent-gold);
  width: 0%;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: width 0.1s ease-out;
}

/* Floating Action Button Animations */
.floating-contact-btn {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.floating-contact-btn:hover {
  transform: scale(1.1) translateY(-2px);
}

/* Accessible focus outline glows */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-gold) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(247, 147, 30, 0.3) !important;
}

/* Premium logo auto-sizing and transitions */
.logo-img {
  height: 4rem !important; /* h-16 (64px) top mobile */
  transition: height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 768px) {
  .logo-img {
    height: 5rem !important; /* md:h-20 (80px) top desktop */
  }
}

/* Scrolled states */
.scrolled .logo-img {
  height: 3.5rem !important; /* scrolled mobile */
}

@media (min-width: 768px) {
  .scrolled .logo-img {
    height: 4rem !important; /* scrolled desktop */
  }
}

/* --- Mobile Responsiveness & Touch Target Optimizations --- */

/* Prevent horizontal overflow on mobile viewports */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(247, 147, 30, 0.15);
}

/* Prevent auto-zoom on iOS Safari form inputs */
input, select, textarea, button {
  font-size: 16px;
}

/* Ensure minimum 44x44px touch targets on interactive controls */
.touch-target,
.mobile-nav-link,
#mobile-menu-toggle,
#mobile-menu-close,
.gallery-filter-btn,
.faq-accordion-header,
#prev-slide,
#next-slide,
.slide-dot-touch {
  min-width: 44px;
  min-height: 44px;
}

/* Responsive adjustment for decorative gold frame offset on mobile */
@media (max-width: 639px) {
  .image-frame-gold::before {
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    border-width: 1.5px;
  }
}

/* Mobile drawer overlay animation */
#mobile-menu {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Responsive video container ratio */
.responsive-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 1rem;
}
.responsive-video-wrapper video,
.responsive-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Premium Footer Credit Link Styling & Micro-Interactions */
.footer-credit {
  color: #9CA3AF;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.6875rem; /* 11px matching footer typography */
  font-weight: 500;
  letter-spacing: 0.025em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: color 0.35s ease, transform 0.35s ease, opacity 0.35s ease, background-color 0.35s ease;
  will-change: color, transform;
}

.footer-credit:hover,
.footer-credit:focus {
  color: var(--accent-gold) !important;
  transform: translateY(-1px);
  background-color: rgba(247, 147, 30, 0.05);
}

.footer-credit:focus-visible {
  outline: 2px solid var(--accent-gold) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(247, 147, 30, 0.25) !important;
}



