/* ==========================================================================
   Base
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #0a74ba;
  color: #fff;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#site-nav {
  background: transparent;
}

#site-nav.scrolled {
  background: rgba(251, 249, 244, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(36, 16, 88, 0.06);
}

.nav-logo {
  color: #fff;
  transition: color 0.4s ease;
}

#site-nav.scrolled .nav-logo {
  color: #241058;
}

.nav-logo-accent {
  color: #0a74ba;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  transition: color 0.3s ease;
}

#site-nav.scrolled .nav-link {
  color: #241058;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: #0a74ba;
  transition: width 0.3s ease;
}

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

.nav-burger {
  width: 28px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: background 0.4s ease;
}

#site-nav.scrolled .nav-burger span {
  background: #241058;
}

.mobile-menu-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.mobile-menu-panel.open {
  max-height: 500px;
}

.mobile-link {
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
  color: #0a74ba;
  transform: translateX(4px);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: heroZoom 18s ease-out forwards;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

.scroll-cue {
  animation: bounce 2.4s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

.scroll-line {
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: .8; }
  50% { transform: scaleY(0.4); opacity: .4; }
}

/* ==========================================================================
   Fade / Reveal animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: revealIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .35s; }
.delay-3 { animation-delay: .55s; }
.delay-4 { animation-delay: .75s; }
.delay-5 { animation-delay: 1.1s; }

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

.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.delay-1.in-view { transition-delay: .1s; }
.fade-up.delay-2.in-view { transition-delay: .22s; }
.fade-up.delay-3.in-view { transition-delay: .34s; }
.fade-up.delay-4.in-view { transition-delay: .46s; }

/* ==========================================================================
   Typography helpers
   ========================================================================== */
.eyebrow {
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .72rem;
  font-weight: 600;
  color: #0a74ba;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1.2;
  color: #241058;
}

.signature {
  font-style: italic;
  color: #4a9cd6;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a74ba;
  color: #fff;
  padding: .95rem 2.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  transition: background .35s ease, transform .35s ease, box-shadow .35s ease;
  box-shadow: 0 8px 24px rgba(10, 116, 186, 0.25);
}

.btn-primary:hover {
  background: #085a91;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(10, 116, 186, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: .95rem 2.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  backdrop-filter: blur(6px);
  transition: background .35s ease, border-color .35s ease, transform .35s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #241058;
  color: #241058;
  padding: .9rem 2.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: background .35s ease, color .35s ease, transform .35s ease;
}

.btn-outline:hover {
  background: #241058;
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   About image
   ========================================================================== */
.about-img-wrap {
  transition: transform .6s ease;
}

.about-img-wrap:hover {
  transform: translateY(-6px);
}

/* ==========================================================================
   Team Cards
   ========================================================================== */
.team-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 1.75rem;
  text-align: center;
  transition: transform .45s ease, background .45s ease;
}

.team-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.07);
}

.team-img-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(10, 116, 186, 0.4);
}

.team-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Program Cards
   ========================================================================== */
.program-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(36, 16, 88, 0.06);
  transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .5s ease;
}

.program-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 48px rgba(36, 16, 88, 0.14);
}

.program-img-wrap {
  height: 190px;
  overflow: hidden;
}

.program-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(0.22, 1, 0.36, 1);
}

.program-card:hover .program-img-wrap img {
  transform: scale(1.08);
}

.program-body {
  padding: 1.75rem 1.75rem 2rem;
}

.program-link {
  color: #085a91;
  font-weight: 600;
  font-size: .85rem;
  position: relative;
  transition: gap .3s ease, color .3s ease;
}

.program-link:hover {
  color: #241058;
}

/* ==========================================================================
   Feature cards (Why Choose Us)
   ========================================================================== */
.feature-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(36, 16, 88, 0.05);
  transition: transform .45s ease, box-shadow .45s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(36, 16, 88, 0.1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: #f2eefb;
  color: #085a91;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   Statistics
   ========================================================================== */
.stats-bg {
  background-image: url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?q=80&w=2000&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.stat-number {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #4a9cd6;
  line-height: 1;
  margin-bottom: .6rem;
}

.stat-label {
  font-size: .85rem;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: background .3s ease, color .3s ease, transform .3s ease;
}

.social-icon svg {
  width: 16px;
  height: 16px;
}

.social-icon:hover {
  background: #0a74ba;
  color: #fff;
  border-color: #0a74ba;
  transform: translateY(-3px);
}

.footer-link {
  transition: color .3s ease, padding-left .3s ease;
}

.footer-link:hover {
  color: #4a9cd6;
  padding-left: 4px;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: .7rem 1.2rem;
  font-size: .85rem;
  color: #fff;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-input:focus {
  outline: none;
  border-color: #0a74ba;
}

.newsletter-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0a74ba;
  color: #fff;
  font-size: 1.1rem;
  transition: background .3s ease, transform .3s ease;
}

.newsletter-btn:hover {
  background: #085a91;
  transform: translateX(2px);
}

/* ==========================================================================
   Category pills
   ========================================================================== */
.cat-pill {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .3rem .7rem;
  border-radius: 999px;
}

/* ==========================================================================
   Blog cards
   ========================================================================== */
.blog-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(36, 16, 88, 0.06);
  transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .5s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(36, 16, 88, 0.14);
}

.blog-card-img {
  height: 200px;
  overflow: hidden;
  background: #f2eefb;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.06);
}

.blog-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  font-size: .75rem;
  color: rgba(46, 47, 56, 0.5);
  margin: .6rem 0 .35rem;
}

/* ==========================================================================
   Filter tabs (blog / gallery category filters)
   ========================================================================== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.filter-tab {
  font-size: .8rem;
  font-weight: 600;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 16, 88, 0.15);
  background: #fff;
  color: #241058;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
  cursor: pointer;
}

.filter-tab:hover {
  border-color: #241058;
}

.filter-tab.active {
  background: #241058;
  color: #fff;
  border-color: #241058;
}

/* ==========================================================================
   Gallery grid + lightbox
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 1.25rem;
  overflow: hidden;
  cursor: pointer;
  background: #f2eefb;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item-cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(22, 10, 56, 0.85), transparent);
  color: #fff;
  font-size: .72rem;
  padding: 1.5rem .8rem .6rem;
  opacity: 0;
  transition: opacity .3s ease;
}

.gallery-item:hover .gallery-item-cap {
  opacity: 1;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 10, 56, 0.92);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
}

.lightbox-overlay.show {
  display: flex;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: .75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-cap {
  position: absolute;
  bottom: 4vh;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: .85rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background .25s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close { top: 3vh; right: 4vw; }
.lightbox-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 2vw; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Post detail typography
   ========================================================================== */
.post-body p {
  margin-bottom: 1.4rem;
  line-height: 1.85;
  color: rgba(46, 47, 56, 0.8);
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin: 1.75rem 0;
}

.post-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 1rem;
  cursor: pointer;
  transition: transform .35s ease;
}

.post-gallery img:hover {
  transform: scale(1.03);
}

/* ==========================================================================
   Contact form
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, 0.6);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: .75rem;
  padding: .85rem 1rem;
  font-size: .9rem;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color .25s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #0a74ba;
}

.form-group select option {
  background: #241058;
  color: #fff;
}

.form-msg {
  font-size: .85rem;
  padding: .85rem 1rem;
  border-radius: .75rem;
  display: none;
}

.form-msg.show {
  display: block;
}

.form-msg.success {
  background: rgba(10, 116, 186, 0.15);
  color: #bcdff0;
}

.form-msg.error {
  background: rgba(192, 57, 43, 0.15);
  color: #f3b8b0;
}

/* ==========================================================================
   Empty / loading states
   ========================================================================== */
.state-msg {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(46, 47, 56, 0.45);
  font-size: .9rem;
  grid-column: 1 / -1;
}

/* ==========================================================================
   Accessibility: reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .reveal, .fade-up, .hero-bg, .scroll-cue, .scroll-line {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .stats-bg {
    background-attachment: scroll;
  }
}
