/*
Theme Name: St Faith's High School
Theme URI: https://example.com/
Author: OpenAI
Author URI: https://openai.com/
Description: A premium one-page WordPress theme for a school, inspired by elegant college-style websites. Includes animated sections, editable homepage content, gallery placeholders, and a maroon/grey/white visual system.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: stfaiths
*/

:root {
  --sf-maroon: #7b1830;
  --sf-maroon-dark: #611124;
  --sf-maroon-soft: #a1455a;
  --sf-grey: #6b7280;
  --sf-grey-soft: #eef0f3;
  --sf-text: #1f2937;
  --sf-heading: #1e1b1b;
  --sf-white: #ffffff;
  --sf-line: #e5e7eb;
  --sf-bg: #faf8f8;
  --sf-shadow: 0 14px 40px rgba(31, 41, 55, 0.08);
  --sf-radius: 18px;
  --sf-container: 1240px;
  --sf-serif: "Georgia", "Times New Roman", serif;
  --sf-sans: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sf-text);
  background: var(--sf-white);
  font-family: var(--sf-sans);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(calc(100% - 40px), var(--sf-container)); margin: 0 auto; }
.section { padding: 80px 0; }
.section-title {
  font-family: var(--sf-serif);
  color: var(--sf-heading);
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
}
.eyebrow {
  display: inline-block;
  color: var(--sf-maroon);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.lead { font-size: 1.06rem; color: #4b5563; }
.btn,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 0;
  border: 1px solid var(--sf-maroon);
  font-weight: 700;
  transition: 0.3s ease;
  cursor: pointer;
}
.btn-primary { background: var(--sf-maroon); color: var(--sf-white); }
.btn-primary:hover { background: var(--sf-maroon-dark); border-color: var(--sf-maroon-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--sf-heading); }
.btn-outline:hover { background: var(--sf-maroon); color: var(--sf-white); }
.topbar {
  border-bottom: 1px solid var(--sf-line);
  padding: 10px 0;
  font-size: 0.92rem;
  background: var(--sf-white);
}
.topbar-inner, .site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-links, .social-links { display: flex; align-items: center; gap: 18px; color: #374151; }
.topbar-links a:hover, .social-links a:hover { color: var(--sf-maroon); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}
.site-header-inner { min-height: 88px; }
.branding { display: flex; align-items: center; gap: 16px; }
.brand-mark {
  width: 54px; height: 64px; object-fit: contain;
}
.brand-mark img, .brand-mark .custom-logo { width: 54px; height: 64px; object-fit: contain; }
.custom-logo-link { display: inline-flex; }
.site-title {
  font-family: var(--sf-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--sf-maroon);
  margin: 0;
}
.site-tagline {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sf-grey);
  margin-top: 6px;
}
.main-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 26px; align-items: center;
}
.main-nav a {
  position: relative; font-weight: 600; color: #374151; padding: 8px 0;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--sf-maroon); }
.main-nav .current-menu-item > a::after,
.main-nav a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--sf-maroon);
}
.header-actions { display: flex; align-items: center; gap: 16px; }
.mobile-toggle { display: none; }

.hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
  color: var(--sf-heading);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.76) 36%, rgba(255,255,255,0.12) 70%, rgba(255,255,255,0.04) 100%);
  z-index: 1;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.08) translateY(-8px); }
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 700px);
  padding: 110px 0 90px;
}
.hero h1 {
  font-family: var(--sf-serif);
  font-size: clamp(3rem, 6vw, 5.3rem);
  line-height: 0.96;
  color: var(--sf-heading);
  margin: 0 0 22px;
}
.hero p { font-size: 1.45rem; color: #374151; max-width: 580px; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-slider-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 28px; z-index: 2; display: flex; gap: 10px;
}
.hero-slider-dots span {
  width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--sf-maroon-soft); background: rgba(255,255,255,0.85);
}
.hero-slider-dots .active { background: var(--sf-maroon); }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.82); display: grid; place-items: center; color: var(--sf-maroon); font-size: 1.4rem; box-shadow: var(--sf-shadow);
}
.hero-arrow.left { left: 24px; }
.hero-arrow.right { right: 24px; }

.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 42px; align-items: start; }
.card-image {
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--sf-shadow);
}
.about-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 20px; }
.tab-btn {
  padding: 12px 24px;
  border: 1px solid #d1d5db;
  background: var(--sf-white);
  color: #374151;
  font-weight: 700;
  transition: 0.25s ease;
}
.tab-btn.active { background: var(--sf-maroon); color: var(--sf-white); border-color: var(--sf-maroon); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.45s ease; }

.stats-band {
  background: linear-gradient(180deg, #ffffff 0%, #fcfbfb 100%);
  border-top: 1px solid var(--sf-line);
  border-bottom: 1px solid var(--sf-line);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat-item {
  padding: 28px 24px;
  text-align: center;
  border-right: 1px solid var(--sf-line);
}
.stat-item:last-child { border-right: none; }
.stat-icon { font-size: 2.2rem; color: var(--sf-maroon); margin-bottom: 10px; }
.stat-number { font-family: var(--sf-serif); color: var(--sf-maroon); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
.stat-label { color: #4b5563; margin-top: 8px; font-weight: 600; }

.programs-wrap { display: grid; grid-template-columns: 0.9fr 1.35fr; gap: 28px; align-items: start; }
.program-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.program-card {
  background: var(--sf-white);
  border: 1px solid var(--sf-line);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  overflow: hidden;
  transition: 0.3s ease;
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--sf-shadow); }
.program-card h3 { font-size: 1.1rem; margin: 18px 18px 8px; color: var(--sf-heading); }
.program-card .arrow-link { display: inline-flex; margin: 0 18px 18px; color: var(--sf-maroon); font-weight: 700; }
.program-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.faith-strip { padding-top: 20px; }
.faith-grid { display: grid; grid-template-columns: 1fr 1fr; }
.faith-copy {
  background: var(--sf-bg);
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.faith-copy::after {
  content: "";
  position: absolute;
  right: 18px; bottom: 12px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(123,24,48,0.08), rgba(123,24,48,0));
}
.faith-cross {
  color: var(--sf-maroon);
  font-size: 2rem;
  margin-bottom: 16px;
}
.faith-copy h3 {
  font-family: var(--sf-serif);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.18;
  margin: 0 0 20px;
}
.faith-image img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }

.dept-copy { text-align: center; max-width: 980px; margin: 0 auto 32px; }
.department-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.department-card {
  border: 1px solid var(--sf-line);
  padding: 26px 16px;
  background: var(--sf-white);
  text-align: center;
  transition: 0.3s ease;
}
.department-card:hover { transform: translateY(-4px); border-color: rgba(123,24,48,0.3); box-shadow: var(--sf-shadow); }
.department-icon { font-size: 2rem; color: var(--sf-maroon); display: block; margin-bottom: 14px; }
.department-card h4 { margin: 0; font-size: 1.02rem; color: var(--sf-heading); }

.fees-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: start; }
.fee-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.fee-card {
  border: 1px solid #e7cbd3;
  background: var(--sf-white);
  padding: 26px;
}
.fee-card h4 { margin: 0 0 22px; color: var(--sf-heading); font-size: 1.5rem; font-family: var(--sf-serif); }
.fee-row { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--sf-line); }
.fee-row:last-child { border-bottom: none; font-weight: 700; color: var(--sf-maroon); }

.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery-card { position: relative; overflow: hidden; }
.gallery-card img { width: 100%; aspect-ratio: 5/3.1; object-fit: cover; transition: 0.45s ease; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-card span {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(180deg, rgba(123,24,48,0), rgba(123,24,48,0.94));
  color: var(--sf-white); padding: 14px 16px; font-weight: 700; text-align: center;
}

.cta-band {
  background: linear-gradient(90deg, var(--sf-maroon) 0%, #8f2740 100%);
  color: var(--sf-white);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 34px 0;
}
.cta-copy { display: flex; align-items: center; gap: 18px; }
.cta-copy .crest-mini { width: 42px; height: 50px; object-fit: contain; }
.cta-copy h3 { font-family: var(--sf-serif); font-size: clamp(2rem, 3vw, 3rem); line-height: 1.16; margin: 0; }
.cta-actions { display: flex; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.cta-band .btn-primary { background: var(--sf-white); color: var(--sf-maroon); border-color: var(--sf-white); }
.cta-band .btn-outline { color: var(--sf-white); border-color: rgba(255,255,255,0.8); }
.cta-band .btn-outline:hover { background: var(--sf-white); color: var(--sf-maroon); }

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--sf-line);
}
.footer-main {
  padding: 40px 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 28px;
}
.footer-brand p { max-width: 320px; color: #6b7280; }
.footer-title { font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sf-maroon); margin-bottom: 14px; font-weight: 800; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a, .contact-list a { color: #374151; }
.footer-links a:hover, .contact-list a:hover { color: var(--sf-maroon); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 12px; color: #374151; }
.footer-bottom {
  border-top: 1px solid var(--sf-line);
  padding: 14px 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: #6b7280;
}

.reveal { opacity: 0; transform: translateY(24px); transition: 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px);} to { opacity:1; transform: translateY(0);} }

@media (max-width: 1180px) {
  .program-cards { grid-template-columns: repeat(2, 1fr); }
  .department-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .site-header-inner { min-height: 74px; }
  .main-nav {
    position: fixed; inset: 74px 0 auto 0; background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--sf-line); padding: 18px 20px 28px; display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }
  .mobile-toggle { display: inline-flex; background: none; border: 1px solid var(--sf-line); color: var(--sf-maroon); padding: 10px 14px; }
  .header-actions .btn-primary { display: none; }
  .about-grid, .programs-wrap, .faith-grid, .fees-grid, .cta-inner, .footer-main { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2n) { border-right: none; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .hero { min-height: 580px; }
  .hero-content { padding-top: 90px; }
  .hero h1 { font-size: clamp(2.6rem, 10vw, 4.2rem); }
  .hero p { font-size: 1.08rem; }
  .topbar-inner, .site-header-inner { gap: 14px; }
  .topbar-left { display: none; }
  .program-cards, .fee-cards, .gallery-grid, .department-grid, .stats-grid { grid-template-columns: 1fr; }
  .hero-arrow { display: none; }
  .cta-actions { justify-content: flex-start; }
  .cta-copy { align-items: flex-start; }
  .footer-main { gap: 20px; }
}

/* =========================================================
   Motion System — v1.1
   Elegant, restrained animation for the St Faith's website.
   ========================================================= */

body {
  overflow-x: hidden;
}

/* Header movement */
.site-header {
  transition: min-height .35s ease, box-shadow .35s ease, background-color .35s ease, transform .35s ease;
}
.site-header .site-header-inner,
.site-header .brand-mark,
.site-header .brand-mark img,
.site-header .site-title,
.site-header .site-tagline {
  transition: .35s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 12px 32px rgba(31, 20, 24, 0.09);
  background: rgba(255,255,255,.985);
}
.site-header.is-scrolled .site-header-inner { min-height: 70px; }
.site-header.is-scrolled .brand-mark,
.site-header.is-scrolled .brand-mark img { width: 44px; height: 52px; }
.site-header.is-scrolled .site-title { font-size: 1.68rem; }
.site-header.is-scrolled .site-tagline { opacity: .72; transform: translateY(-1px); }

/* Hero entrance choreography */
.hero-content h1,
.hero-content p,
.hero-content .hero-actions {
  opacity: 0;
  transform: translateY(28px);
}
body.motion-ready .hero-content h1 {
  animation: sfHeroIn .9s cubic-bezier(.2,.75,.3,1) .12s forwards;
}
body.motion-ready .hero-content p {
  animation: sfHeroIn .9s cubic-bezier(.2,.75,.3,1) .32s forwards;
}
body.motion-ready .hero-content .hero-actions {
  animation: sfHeroIn .9s cubic-bezier(.2,.75,.3,1) .5s forwards;
}
@keyframes sfHeroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-bg {
  will-change: transform;
  transition: transform .15s linear;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 68% 48%, rgba(255,255,255,.04), transparent 35%);
  opacity: .65;
  animation: sfHeroLight 7s ease-in-out infinite alternate;
}
@keyframes sfHeroLight {
  from { transform: translate3d(-1.5%,0,0); opacity: .45; }
  to { transform: translate3d(1.5%,-1%,0); opacity: .75; }
}
.hero-slider-dots .active {
  animation: sfDotPulse 2.2s ease-in-out infinite;
}
@keyframes sfDotPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(123,24,48,.24); }
  50% { box-shadow: 0 0 0 8px rgba(123,24,48,0); }
}
.hero-arrow {
  transition: transform .3s ease, background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.hero-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: var(--sf-maroon);
  color: #fff;
  box-shadow: 0 14px 34px rgba(123,24,48,.24);
}

/* Better reveal system */
.reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  filter: blur(3px);
  transition:
    opacity .78s cubic-bezier(.2,.75,.3,1),
    transform .78s cubic-bezier(.2,.75,.3,1),
    filter .78s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.reveal-left { transform: translate3d(-44px, 0, 0); }
.reveal.reveal-right { transform: translate3d(44px, 0, 0); }
.reveal.reveal-scale { transform: scale(.965) translate3d(0, 16px, 0); }
.reveal.visible {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
  filter: blur(0);
}

/* Editorial heading accent motion */
.eyebrow {
  position: relative;
}
.eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 42px;
  height: 2px;
  background: var(--sf-maroon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s cubic-bezier(.2,.75,.3,1) .18s;
}
.reveal.visible .eyebrow::after,
.visible .eyebrow::after { transform: scaleX(1); }

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 72%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-22deg);
  transition: left .7s ease;
  z-index: -1;
}
.btn:hover::before { left: 145%; }
.btn:active { transform: translateY(0) scale(.985); }

/* Image reveal and depth */
.card-image,
.faith-image,
.program-card,
.gallery-card {
  transform-style: preserve-3d;
}
.card-image img,
.faith-image img {
  transition: transform 1s cubic-bezier(.2,.75,.3,1), filter .7s ease;
}
.card-image:hover img,
.faith-image:hover img {
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.02);
}
.card-image::after,
.faith-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 1.05s ease;
}
.card-image:hover::after,
.faith-image:hover::after { transform: translateX(120%); }
.card-image,
.faith-image { position: relative; overflow: hidden; }

/* About tabs */
.tab-btn {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}
.tab-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(123,24,48,.45);
  color: var(--sf-maroon);
}
.tab-btn.active:hover { color: #fff; }
.tab-panel.active {
  animation: sfTabIn .48s cubic-bezier(.2,.75,.3,1);
}
@keyframes sfTabIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats */
.stat-item {
  transition: background-color .3s ease, transform .3s ease;
}
.stat-item:hover {
  background: #fff8fa;
  transform: translateY(-3px);
}
.stat-icon {
  transition: transform .35s ease;
}
.stat-item:hover .stat-icon { transform: translateY(-4px) scale(1.08); }
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Program cards */
.program-card {
  position: relative;
  transition: transform .45s cubic-bezier(.2,.75,.3,1), box-shadow .45s ease, border-color .3s ease;
}
.program-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 3px;
  background: var(--sf-maroon);
  transition: width .45s cubic-bezier(.2,.75,.3,1);
}
.program-card:hover {
  transform: translateY(-10px);
  border-color: rgba(123,24,48,.2);
  box-shadow: 0 24px 48px rgba(57,28,36,.12);
}
.program-card:hover::after { width: 100%; }
.program-card img { transition: transform .75s cubic-bezier(.2,.75,.3,1), filter .5s ease; }
.program-card:hover img { transform: scale(1.055); filter: saturate(1.05); }
.program-card .arrow-link { transition: transform .3s ease, color .3s ease; }
.program-card:hover .arrow-link { transform: translateX(5px); }

/* Christian ethos */
.faith-cross {
  transform-origin: center;
  animation: sfCrossGlow 4s ease-in-out infinite;
}
@keyframes sfCrossGlow {
  0%,100% { text-shadow: 0 0 0 rgba(123,24,48,0); transform: scale(1); }
  50% { text-shadow: 0 8px 24px rgba(123,24,48,.18); transform: scale(1.035); }
}

/* Department cards */
.department-card {
  position: relative;
  overflow: hidden;
}
.department-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 0;
  background: linear-gradient(180deg, rgba(123,24,48,0), rgba(123,24,48,.055));
  transition: height .4s ease;
}
.department-card:hover::before { height: 100%; }
.department-icon {
  position: relative;
  z-index: 1;
  transition: transform .4s cubic-bezier(.2,.75,.3,1);
}
.department-card h4 { position: relative; z-index: 1; }
.department-card:hover .department-icon { transform: translateY(-5px) scale(1.1); }

/* Fees */
.fee-card {
  position: relative;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.75,.3,1), box-shadow .4s ease, border-color .3s ease;
}
.fee-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: var(--sf-maroon);
  transform: scaleX(.14);
  transform-origin: left;
  transition: transform .45s ease;
}
.fee-card:hover {
  transform: translateY(-6px);
  border-color: rgba(123,24,48,.36);
  box-shadow: 0 20px 40px rgba(57,28,36,.09);
}
.fee-card:hover::before { transform: scaleX(1); }

/* Gallery */
.gallery-card {
  transition: transform .4s cubic-bezier(.2,.75,.3,1), box-shadow .4s ease;
}
.gallery-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 38px rgba(31,41,55,.15);
  z-index: 2;
}
.gallery-card span {
  transform: translateY(4px);
  transition: transform .4s ease, padding .4s ease;
}
.gallery-card:hover span {
  transform: translateY(0);
  padding-top: 26px;
}

/* CTA animation */
.cta-band {
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -70%; left: -20%;
  width: 45%; height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transform: rotate(14deg) translateX(-100%);
  animation: sfCtaSweep 7s ease-in-out infinite;
}
@keyframes sfCtaSweep {
  0%,55% { transform: rotate(14deg) translateX(-140%); }
  78%,100% { transform: rotate(14deg) translateX(390%); }
}
.crest-mini { animation: sfCrestFloat 4s ease-in-out infinite; }
@keyframes sfCrestFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Footer links animate rather than just changing colour */
.footer-links a {
  display: inline-block;
  transition: color .25s ease, transform .25s ease;
}
.footer-links a:hover { transform: translateX(4px); }

/* Accessible motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .reveal,
  .reveal.reveal-left,
  .reveal.reveal-right,
  .reveal.reveal-scale,
  .hero-content h1,
  .hero-content p,
  .hero-content .hero-actions {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* =========================================================
   Editable Gutenberg homepage sections — v1.2
   ========================================================= */
.custom-page-sections {
  background: var(--sf-white);
  overflow: hidden;
}
.custom-content-title {
  padding-top: 64px;
  margin-bottom: 0;
}
.custom-page-content > *:not(.alignfull):not(.alignwide) {
  width: min(calc(100% - 40px), var(--sf-container));
  margin-left: auto;
  margin-right: auto;
}
.custom-page-content > .alignwide {
  width: min(calc(100% - 40px), 1380px);
  margin-left: auto;
  margin-right: auto;
}
.custom-page-content > .alignfull {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.custom-page-content .wp-block-group,
.custom-page-content .wp-block-columns,
.custom-page-content .wp-block-media-text,
.custom-page-content .wp-block-cover {
  box-sizing: border-box;
}
.custom-page-content h2,
.custom-page-content h3,
.custom-page-content h4 {
  font-family: var(--sf-serif);
  color: var(--sf-heading);
}
.custom-page-content h2 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.12;
}
.custom-page-content p { color: #4b5563; }
.custom-page-content .wp-block-button__link {
  background: var(--sf-maroon) !important;
  color: #fff !important;
  border-radius: 0;
  padding: 13px 24px;
  transition: transform .3s ease, background-color .3s ease;
}
.custom-page-content .wp-block-button__link:hover {
  background: var(--sf-maroon-dark) !important;
  transform: translateY(-2px);
}
.custom-page-content .wp-block-image img,
.custom-page-content .wp-block-media-text__media img {
  transition: transform .7s cubic-bezier(.2,.75,.3,1);
}
.custom-page-content .wp-block-image:hover img,
.custom-page-content .wp-block-media-text__media:hover img {
  transform: scale(1.025);
}
.programs-title,
.fees-heading { font-size: clamp(2rem, 3vw, 3rem); }
.programs-view-all { color: var(--sf-maroon); font-weight: 700; }

@media (max-width: 768px) {
  .custom-page-content > *:not(.alignfull):not(.alignwide),
  .custom-page-content > .alignwide {
    width: min(calc(100% - 30px), var(--sf-container));
  }
  .custom-content-title { padding-top: 48px; }
}
