/* Attractive motion & visual polish */

/* Page loading screen */
body.is-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(172, 0, 81, 0.22), transparent 60%),
    linear-gradient(160deg, #0b1131 0%, #14121f 55%, #1a204d 100%);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.55s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-loader.is-done {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  pointer-events: none;
}

.page-loader-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.5rem;
  animation: loader-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loader-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-loader-mark {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
}

.page-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: #ac0051;
  border-right-color: rgba(255, 183, 219, 0.65);
  animation: loader-spin 0.9s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

.page-loader-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  animation: loader-pulse 1.4s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes loader-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.page-loader-brand {
  margin-top: 0.35rem;
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  letter-spacing: 0.01em;
}

.page-loader-bar {
  width: min(180px, 56vw);
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 0.15rem;
}

.page-loader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ac0051, #ff4fa3, #ac0051);
  background-size: 200% 100%;
  animation: loader-bar 1.1s ease-in-out infinite;
}

@keyframes loader-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

.page-loader-text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .page-loader-ring,
  .page-loader-logo,
  .page-loader-bar span,
  .page-loader-inner {
    animation: none !important;
  }

  .page-loader.is-done {
    transition-duration: 0.01ms;
  }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, #ff4fa3, var(--brand), #6b0b8a);
  box-shadow: 0 0 16px rgba(169, 2, 98, 0.55);
  transition: width 0.08s linear;
}

/* Soft ambient page wash */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(169, 2, 98, 0.08), transparent 60%),
    radial-gradient(700px 360px at 100% 20%, rgba(107, 11, 138, 0.06), transparent 55%);
}

/* Buttons with shine */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.35s ease;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(169, 2, 98, 0.28);
}

.btn-primary {
  background: linear-gradient(135deg, #c40a74, var(--brand) 45%, #7e0149);
  box-shadow: 0 10px 24px rgba(169, 2, 98, 0.28);
}

.btn-dark:hover {
  box-shadow: 0 14px 30px rgba(20, 18, 31, 0.28);
}

.btn-outline:hover {
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.18);
}

/* Section label pulse line */
.section-label {
  position: relative;
  padding-left: 1.1rem;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(169, 2, 98, 0.45);
  animation: pulse-dot 2.2s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(169, 2, 98, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(169, 2, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(169, 2, 98, 0); }
}

/* Hero cinematic layers */
.hero {
  background: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('https://leonardhospital.com/Images/college/Lamplighting-5a.jpg') center/cover no-repeat;
  transform: scale(1.08);
  animation: kenburns 18s ease-in-out infinite alternate;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 79, 163, 0.22), transparent 35%),
    linear-gradient(115deg, rgba(20, 10, 28, 0.92) 0%, rgba(80, 8, 48, 0.74) 55%, rgba(20, 10, 28, 0.42) 100%);
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.hero-orb-1 {
  width: 220px;
  height: 220px;
  background: rgba(255, 79, 163, 0.28);
  top: 12%;
  right: 8%;
  animation: float-a 7s ease-in-out infinite;
}

.hero-orb-2 {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.12);
  bottom: 22%;
  left: 10%;
  animation: float-b 9s ease-in-out infinite;
}

@keyframes kenburns {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}

@keyframes float-a {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-18px) translateX(-10px); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(14px) translateX(12px); }
}

.hero-kicker {
  animation: rise-fade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.hero h1 {
  animation: rise-fade 1s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hero .lead {
  animation: rise-fade 1s cubic-bezier(0.22, 1, 0.36, 1) 0.36s forwards;
}

.hero-actions {
  animation: rise-fade 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-features {
  opacity: 0;
  animation: rise-fade 1s cubic-bezier(0.22, 1, 0.36, 1) 0.68s forwards;
  overflow: hidden;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.hero-feature {
  transition: background 0.35s ease, transform 0.35s ease;
}

.hero-feature:hover {
  background: rgba(169, 2, 98, 0.45);
  transform: translateY(-2px);
}

.hero-feature .num {
  transition: transform 0.35s ease, color 0.35s ease;
}

.hero-feature:hover .num {
  transform: scale(1.08);
  color: #fff;
}

@keyframes rise-fade {
  from { opacity: 0; transform: translateY(34px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Reveal variants */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s ease;
  transition-delay: var(--delay, 0ms);
}

.reveal-left {
  transform: translateX(-42px);
}

.reveal-right {
  transform: translateX(42px);
}

.reveal-scale {
  transform: scale(0.92);
}

.reveal.visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* About media polish */
.about-media {
  perspective: 1000px;
}

.about-media img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.7s ease;
  box-shadow: 0 30px 60px rgba(20, 18, 31, 0.18);
}

.about-media:hover img {
  transform: scale(1.03) rotateY(-2deg);
}

.experience-badge {
  animation: badge-float 3.5s ease-in-out infinite;
  border-radius: 14px;
  background: linear-gradient(145deg, #c40a74, var(--brand));
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.about-point {
  padding: 0.85rem;
  border-radius: 12px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.about-point:hover {
  background: var(--brand-soft);
  transform: translateX(6px);
}

.about-point .icon {
  transition: transform 0.35s ease, background 0.35s ease;
}

.about-point:hover .icon {
  transform: rotate(-8deg) scale(1.08);
  background: #fff;
}

/* Motto cards */
.motto {
  position: relative;
  overflow: hidden;
}

.motto::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(169, 2, 98, 0.07);
  top: -120px;
  right: -80px;
  animation: float-a 10s ease-in-out infinite;
}

.motto-item {
  position: relative;
  border-radius: 18px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  overflow: hidden;
}

.motto-item::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #ff4fa3, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}

.motto-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 45px rgba(169, 2, 98, 0.14);
}

.motto-item:hover::after {
  transform: scaleX(1);
}

.motto-item img {
  transition: transform 0.45s ease;
}

.motto-item:hover img {
  transform: scale(1.08) rotate(-4deg);
}

/* Departments */
.dept-item {
  border-radius: 18px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.dept-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(20, 18, 31, 0.25);
}

.dept-item .body {
  transition: transform 0.4s ease;
}

.dept-item:hover .body {
  transform: translateY(-4px);
}

.dept-item .body p {
  transition: color 0.35s ease;
}

.dept-item:hover .body p {
  color: #fff;
}

/* Why panel */
.why-panel {
  border-radius: 20px;
  transition: transform 0.4s ease, background 0.4s ease;
}

.why-panel:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(255, 255, 255, 0.14);
}

.why-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.3s ease, padding-left 0.3s ease;
}

.why-item:hover {
  transform: translateX(8px);
  padding-left: 0.4rem;
}

/* Steps */
.step {
  border-radius: 14px;
  transition:
    border-color 0.3s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    background 0.35s ease;
}

.step:hover {
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--brand), #ff4fa3) border-box;
  border: 1px solid transparent;
  transform: translateX(8px);
  box-shadow: 0 14px 30px rgba(169, 2, 98, 0.12);
}

.step .n {
  transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease;
}

.step:hover .n {
  transform: scale(1.1) rotate(-6deg);
  background: var(--brand);
  color: #fff;
}

.contact-panel {
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(20, 18, 31, 0.22);
}

.contact-panel::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(169, 2, 98, 0.28);
  top: -60px;
  right: -40px;
  animation: float-b 8s ease-in-out infinite;
}

.form input,
.form textarea {
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: rgba(255, 79, 163, 0.7);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Testimonials */
.testimonial {
  border-radius: 16px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(169, 2, 98, 0.12);
}

.testimonial::before {
  content: '“';
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: rgba(169, 2, 98, 0.18);
  display: block;
  margin-bottom: 0.2rem;
}

/* Gallery */
.gallery-strip a,
.gallery-page a {
  border-radius: 14px;
  position: relative;
}

.gallery-strip a::after,
.gallery-page a::after {
  content: 'View';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background: rgba(169, 2, 98, 0.45);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-strip a:hover::after,
.gallery-page a:hover::after {
  opacity: 1;
}

/* CTA shimmer */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #7e0149, var(--brand), #c40a74, #7e0149);
  background-size: 300% 300%;
  animation: cta-shift 8s ease infinite;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: -40% auto -40% -30%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-20deg);
  animation: cta-shine 4.5s ease-in-out infinite;
}

@keyframes cta-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes cta-shine {
  0% { left: -30%; }
  100% { left: 120%; }
}

.cta-band .container {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  animation: soft-pulse 3s ease-in-out infinite;
}

@keyframes soft-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Stats strip */
.stats-strip {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
}

.stats-strip .inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: 0 24px 50px rgba(20, 18, 31, 0.1);
}

.stat-card {
  text-align: center;
  padding: 0.8rem;
  border-radius: 14px;
  transition: transform 0.35s ease, background 0.35s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  background: var(--brand-soft);
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-card span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Leadership cards */
.leader-role {
  position: relative;
  display: inline-block;
  transition: letter-spacing 0.35s ease;
}

.leader-card:hover .leader-role {
  letter-spacing: 0.06em;
}

.leader-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(172, 0, 81, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.leader-card:hover .leader-photo::after {
  opacity: 1;
}

/* Facility / contact cards */
.facility,
.contact-card {
  border-radius: 16px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.facility:hover,
.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px rgba(20, 18, 31, 0.14);
}

.facility img,
.contact-card img {
  transition: transform 0.55s ease;
}

.facility:hover img,
.contact-card:hover img {
  transform: scale(1.06);
}

/* Back to top */
.back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #c40a74, var(--brand));
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 150;
  box-shadow: 0 12px 28px rgba(169, 2, 98, 0.35);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-top:hover {
  transform: translateY(-3px);
}

/* Page hero polish */
.page-hero {
  position: relative;
  overflow-x: clip;
  overflow-y: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  right: -60px;
  bottom: -80px;
  animation: float-a 8s ease-in-out infinite;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  animation: rise-fade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.page-hero p {
  animation: rise-fade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 980px) {
  .stats-strip .inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .stats-strip {
    margin-top: 1.5rem;
  }

  .stats-strip .inner {
    grid-template-columns: 1fr 1fr;
  }

  .hero-orb {
    display: none;
  }
}
