/**
 * Hydroposhan Academy — shared motion, cards, heroes (load last in head)
 */

html.ha-unified {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html.ha-unified {
    scroll-behavior: auto;
  }

  html.ha-unified .ha-scroll-progress,
  html.ha-unified .ha-back-to-top,
  html.ha-unified .ha-tilt-card,
  html.ha-unified .ha-parallax-hero {
    display: none !important;
  }
}

/* —— Scroll progress —— */
html.ha-unified .ha-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10050;
  pointer-events: none;
  background: rgba(0, 115, 5, 0.12);
}

html.ha-unified .ha-scroll-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--ha-scroll-pct, 0%);
  background: linear-gradient(90deg, var(--accent-blue, #0079c6), var(--primary-green, #007305));
  border-radius: 0 2px 2px 0;
  transition: width 0.12s ease-out;
  box-shadow: 0 0 12px rgba(0, 115, 5, 0.35);
}

/* —— Back to top (disabled site-wide) —— */
html.ha-unified .footer-back-top,
html.ha-unified .ha-back-to-top {
  display: none !important;
}

html.ha-unified .ha-back-to-top--legacy {
  position: fixed;
  right: clamp(14px, 3vw, 22px);
  bottom: clamp(18px, 4vw, 28px);
  z-index: 10040;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: var(--primary-green, #007305);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 12px 32px rgba(0, 115, 5, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.28s ease,
    background 0.2s ease;
}

html.ha-unified .ha-back-to-top.ha-back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

html.ha-unified .ha-back-to-top:hover {
  background: var(--primary-hover, #005a04);
  transform: translateY(-3px) scale(1.04);
}

/* —— Header scroll —— */
html.ha-unified header#header.ha-header-scrolled {
  box-shadow: 0 8px 32px rgba(0, 75, 4, 0.12);
}

html.ha-unified header#header {
  transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

/* —— Hero parallax —— */
html.ha-unified .ha-parallax-hero {
  --ha-parallax-y: 0px;
}

html.ha-unified .ha-parallax-hero .container,
html.ha-unified .ha-parallax-hero .hero-content,
html.ha-unified .ha-parallax-hero .blog-hero-content {
  transform: translateY(calc(var(--ha-parallax-y) * -0.35));
  transition: transform 0.1s linear;
  will-change: transform;
}

html.ha-unified section.hero .hero-bg-slider {
  transform: translateY(calc(var(--ha-parallax-y) * 0.2));
  transition: transform 0.1s linear;
}

/* —— Page heroes —— */
html.ha-unified .page-hero,
html.ha-unified .blog-hero {
  position: relative;
  overflow: hidden;
}

html.ha-unified .programs-hero {
  position: relative;
  overflow: visible;
}

html.ha-unified .hero-divider {
  width: 72px;
  height: 3px;
  margin-inline: auto;
  background: linear-gradient(90deg, var(--accent-blue, #0079c6), var(--primary-green, #007305));
  border-radius: 2px;
  transform-origin: center;
  animation: ha-divider-grow 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ha-divider-grow {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

/* —— 3D card tilt (desktop) —— */
html.ha-unified .ha-tilt-card {
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--ha-tilt-y, 0deg)) rotateY(var(--ha-tilt-x, 0deg));
  transition: transform 0.15s ease-out, box-shadow 0.28s ease;
}

/* —— Interactive cards —— */
html.ha-unified .article-card,
html.ha-unified .program-card,
html.ha-unified .infra-card,
html.ha-unified .content-card,
html.ha-unified .batch-list-card,
html.ha-unified .contact-info-box,
html.ha-unified .gallery-panel,
html.ha-unified .themes-strip,
html.ha-unified .bottom-cta,
html.ha-unified .global-cta,
html.ha-unified .programs-power-cta,
html.ha-unified .programs-cta-band,
html.ha-unified .featured-article,
html.ha-unified .testimonial-card,
html.ha-unified .program-showcase-card,
html.ha-unified button.gallery-card {
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.22s ease;
}

html.ha-unified .card-img,
html.ha-unified .featured-img {
  overflow: hidden;
}

html.ha-unified .card-img img,
html.ha-unified .featured-img img {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  html.ha-unified .article-card:hover,
  html.ha-unified .program-card:hover,
  html.ha-unified .infra-card:hover,
  html.ha-unified .batch-list-card:hover,
  html.ha-unified .testimonial-card:hover,
  html.ha-unified .featured-article:hover {
    box-shadow: 0 20px 48px rgba(0, 115, 5, 0.16);
  }

  html.ha-unified .article-card:hover .card-img img,
  html.ha-unified .featured-article:hover .featured-img img,
  html.ha-unified .program-card:hover img {
    transform: scale(1.06);
  }

  html.ha-unified .btn:hover,
  html.ha-unified a.btn:hover,
  html.ha-unified .read-more:hover {
    transform: translateY(-2px);
  }

  html.ha-unified .ha-magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* —— Button ripple —— */
html.ha-unified .ha-ripple-host {
  position: relative;
  overflow: hidden;
}

html.ha-unified .ha-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ha-ripple-pop 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes ha-ripple-pop {
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* —— Primary CTA pulse —— */
html.ha-unified .btn-primary,
html.ha-unified .top-action-btn a:last-child,
html.ha-unified a[href*="forms.gle"] {
  position: relative;
}

html.ha-unified .ha-cta-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(0, 115, 5, 0.35);
  animation: ha-cta-ring 2.4s ease-out infinite;
  pointer-events: none;
  opacity: 0;
}

@keyframes ha-cta-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* —— FAQ accordion motion —— */
html.ha-unified .faq-item .faq-answer,
html.ha-unified .faq-category .faq-items {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

html.ha-unified .faq-question {
  transition: background 0.2s ease, color 0.2s ease;
}

html.ha-unified .faq-question i,
html.ha-unified .faq-category-header i {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html.ha-unified .faq-item.active .faq-question i,
html.ha-unified .faq-category.active .faq-category-header i {
  transform: rotate(180deg);
}

/* —— Image reveal —— */
html.ha-unified .ha-img-reveal {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.ha-unified .ha-img-reveal.ha-img-reveal--visible {
  opacity: 1;
  transform: scale(1);
}

/* —— Nav active indicator —— */
html.ha-unified .nav-links a.ha-nav-active {
  color: var(--primary-green, #007305) !important;
}

html.ha-unified .nav-links a.ha-nav-active::after {
  width: 100% !important;
}

/* Dot indicator disabled — underline from header-premium.css is sufficient */
html.ha-unified .nav-links a.ha-nav-active::before {
  display: none !important;
}

/* —— Links —— */
html.ha-unified main a:not(.btn):not(.btn-card):not(.read-more):not(.nav-links a):not(.nav-logo):not(.programs-quick-nav a):not(.program-quick-nav a):not(.about-quick-nav a):not(.infra-quick-nav a):not(.hwt-quick-nav a):not(.ins-quick-nav a):not(.con-quick-nav a):not(.con-action-btn):not(.con-help-link):not(.ha-mobile-enroll-dock__btn) {
  color: var(--primary-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

html.ha-unified main a:not(.btn):not(.btn-card):not(.read-more):not(.nav-links a):not(.programs-quick-nav a):not(.program-quick-nav a):not(.about-quick-nav a):not(.infra-quick-nav a):not(.hwt-quick-nav a):not(.ins-quick-nav a):not(.con-quick-nav a):not(.con-action-btn):not(.con-help-link):not(.ha-mobile-enroll-dock__btn):hover {
  color: var(--primary-hover);
}

/* —— Filter chips —— */
html.ha-unified .filter-btn,
html.ha-unified .gallery-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  min-height: 0;
  height: auto;
  line-height: 1.25;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

html.ha-unified .category-filters {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 10px;
}

html.ha-unified .filter-btn:hover,
html.ha-unified .gallery-filter:hover {
  transform: translateY(-1px);
}

html.ha-unified .filter-btn.is-active,
html.ha-unified .gallery-filter.is-active {
  box-shadow: 0 8px 22px rgba(0, 115, 5, 0.22);
  transform: translateY(-1px);
}

html.ha-unified :focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 3px;
}

html.ha-unified main section,
html.ha-unified main .section-padding {
  scroll-margin-top: calc(var(--site-fixed-header-offset, 120px) + 12px);
}

html.ha-unified .global-cta,
html.ha-unified .bottom-cta,
html.ha-unified .soft-cta,
html.ha-unified .cta-section {
  border-radius: 20px;
}

/* —— Stagger grid —— */
html.ha-unified .ha-stagger-item {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

html.ha-unified .ha-stagger-item.ha-stagger-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Counter stat pop —— */
html.ha-unified .ha-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html.ha-unified .ha-counter.ha-counter--done {
  transform: scale(1.02);
}

/* —— Hero fallback: gradient only when page has no photo slider —— */
html.ha-unified section.hero:not(:has(.hero-bg-slider)) {
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(0, 115, 5, 0.3) 0%, transparent 68%),
    linear-gradient(165deg, #003d03 0%, #004b04 45%, #002a02 100%);
}

html.ha-unified .program-hero::before,
html.ha-unified .programs-hero::before {
  background-image: none !important;
  background: linear-gradient(165deg, #003d03 0%, #004b04 48%, #002a02 100%) !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

html.ha-unified .page-blog-hero__bg {
  background-image: none !important;
  background: linear-gradient(165deg, #003d03 0%, #004b04 48%, #002a02 100%) !important;
  filter: none !important;
}

/* =============================================================================
   Runtime-injected styles (formerly injectCSS in common-interactive.js)
   ============================================================================= */

.js-interactive-reveal-target {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js-interactive-reveal-target.js-interactive-reveal-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .js-interactive-reveal-target {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.vd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.vd-modal-overlay.vd-open { display: flex; }

.vd-modal-dialog {
  width: min(920px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 115, 5, 0.15);
  overflow: hidden;
}

.vd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
  background: linear-gradient(135deg, rgba(0, 130, 36, 0.10) 0%, rgba(0, 121, 198, 0.08) 100%);
}

.vd-modal-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  color: #004b04;
  font-size: 1.6rem;
  line-height: 1.2;
}

.vd-modal-close {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  color: #004b04;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vd-modal-body {
  padding: 14px 18px 18px;
  color: #1f2937;
}

.vd-modal-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.vd-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 115, 5, 0.08);
  border: 1px solid rgba(0, 115, 5, 0.16);
  color: #004b04;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.vd-modal-desc {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 115, 5, 0.10);
  border-radius: 14px;
  padding: 14px;
  line-height: 1.7;
  color: #4b5563;
}

.vd-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-top: 16px;
}

.vd-modal-details-hidden { display: none !important; }

.vd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 0.95rem;
  border: 2px solid transparent;
}

.vd-btn-primary {
  background: #007305;
  color: #fff;
  border-color: #007305;
  box-shadow: 0 10px 25px rgba(0, 115, 5, 0.18);
}

.vd-btn-outline {
  background: transparent;
  color: #007305;
  border-color: rgba(0, 115, 5, 0.4);
}

.vd-btn svg { flex: 0 0 auto; }

.faq-answer-inner,
.faq-answer-inner p {
  color: #334155 !important;
  text-align: left !important;
  line-height: 1.65 !important;
}

.article-card .card-body h3 {
  text-align: left;
  word-break: break-word;
  hyphens: auto;
}

.calendar-promo-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c2d12;
  background: linear-gradient(135deg, #ffedd5 0%, #fdba74 100%);
  border: 1px solid rgba(234, 88, 12, 0.35);
}

/* 30-day promo modal — permanently disabled (offer ended) */
.ha-30day-promo-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ha-30day-promo-open {
  overflow: auto !important;
}

.ha-30day-promo-overlay.is-legacy-disabled {
  display: none !important;
}

.ha-30day-promo-card-wrap { position: relative; width: min(440px, 100%); }

.ha-30day-promo-card {
  width: 100%;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 75, 4, 0.22);
  border: 1px solid rgba(0, 115, 5, 0.14);
  overflow: hidden;
}

.ha-30day-promo-head {
  padding: 16px 18px 12px;
  background: linear-gradient(135deg, rgba(0, 115, 5, 0.12) 0%, rgba(0, 121, 198, 0.1) 100%);
}

.ha-30day-promo-head h2 {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.25;
  color: #004b04;
}

.ha-30day-promo-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font: 800 0.9rem/1.2 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c2d12;
  background: linear-gradient(135deg, #ffedd5, #fdba74);
  border: 1px solid rgba(234, 88, 12, 0.4);
}

.ha-30day-promo-body { padding: 14px 18px 18px; color: #334155; font-size: 0.95rem; line-height: 1.55; }
.ha-30day-promo-dates { margin-top: 6px; font-weight: 600; color: #004b04; }
.ha-30day-promo-date-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }

.ha-30day-promo-date-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 75, 4, 0.12);
}

.ha-30day-promo-date-row:first-child { border-top: 0; padding-top: 0; }

.ha-30day-promo-dt {
  font: 800 0.68rem/1.2 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #004b04;
}

.ha-30day-promo-dd { font-weight: 700; font-size: 0.98rem; color: #004b04; text-align: right; }

@media (max-width: 480px) {
  .ha-30day-promo-date-row { flex-direction: column; align-items: flex-start; }
  .ha-30day-promo-dd { text-align: left; }
}

.ha-30day-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.ha-30day-promo-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
}

.ha-30day-promo-primary {
  background: #007305;
  color: #fff;
  border-color: #007305;
  box-shadow: 0 8px 20px rgba(0, 115, 5, 0.25);
}

.ha-30day-promo-primary:hover { filter: brightness(1.05); color: #fff; }

.ha-30day-promo-outline {
  background: transparent;
  color: #007305;
  border-color: rgba(0, 115, 5, 0.45);
}

.ha-30day-promo-outline:hover { background: rgba(0, 115, 5, 0.06); }

.ha-30day-promo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: #004b04;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#calendar .home-upcoming-enroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  background: #007305;
  color: #fff !important;
  border: 2px solid #007305;
  white-space: nowrap;
}

#calendar .home-upcoming-enroll-btn:hover { filter: brightness(1.06); color: #fff !important; }

.ha-book-counselling {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  max-width: 100%;
  min-width: 0;
}

.ha-counselling-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid rgba(0, 115, 5, 0.35);
  background: #ffffff;
  color: var(--dark-green, #004b04) !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ha-counselling-trigger i {
  font-size: 1rem;
  color: inherit;
  flex-shrink: 0;
}

.ha-counselling-trigger:hover,
.ha-counselling-trigger:focus-visible {
  background: #f0fdf4;
  border-color: var(--primary-green, #007305);
  color: var(--dark-green, #004b04) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 115, 5, 0.14);
  outline: none;
}

/* Dark hero bands + home CTA */
[class*='-hero-cta'] .ha-counselling-trigger,
.cta-section .ha-counselling-trigger,
.programs-power-cta .ha-counselling-trigger,
.programs-cta-band .ha-counselling-trigger,
.program-hero-cta .ha-counselling-trigger,
.program-power-cta .ha-counselling-trigger,
.programs-hero-cta .ha-counselling-trigger {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff !important;
  box-shadow: none;
}

[class*='-hero-cta'] .ha-counselling-trigger:hover,
[class*='-hero-cta'] .ha-counselling-trigger:focus-visible,
.cta-section .ha-counselling-trigger:hover,
.cta-section .ha-counselling-trigger:focus-visible,
.programs-power-cta .ha-counselling-trigger:hover,
.programs-power-cta .ha-counselling-trigger:focus-visible,
.programs-cta-band .ha-counselling-trigger:hover,
.programs-cta-band .ha-counselling-trigger:focus-visible,
.program-hero-cta .ha-counselling-trigger:hover,
.program-hero-cta .ha-counselling-trigger:focus-visible,
.program-power-cta .ha-counselling-trigger:hover,
.program-power-cta .ha-counselling-trigger:focus-visible,
.programs-hero-cta .ha-counselling-trigger:hover,
.programs-hero-cta .ha-counselling-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Primary emphasis on light program sidebars */
body.page-programs .programs-spotlight-cta .ha-counselling-trigger {
  width: 100%;
  background: var(--primary-green, #007305);
  border-color: var(--primary-green, #007305);
  color: #ffffff !important;
}

body.page-programs .programs-spotlight-cta .ha-counselling-trigger:hover,
body.page-programs .programs-spotlight-cta .ha-counselling-trigger:focus-visible {
  background: var(--primary-hover, #005a04);
  border-color: var(--primary-hover, #005a04);
  color: #ffffff !important;
}

/* Booking modal */
body.ha-counselling-modal-open {
  overflow: hidden;
}

.ha-counselling-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
}

.ha-counselling-modal[hidden] {
  display: none !important;
}

.ha-counselling-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 22, 8, 0.72);
  backdrop-filter: blur(4px);
}

.ha-counselling-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(94vh, 820px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 115, 5, 0.12);
  animation: ha-counselling-modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ha-counselling-modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ha-counselling-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  background: linear-gradient(165deg, #004b04 0%, #007305 100%);
  color: #ffffff;
}

html.ha-unified .ha-counselling-modal__head h2,
.ha-counselling-modal__head h2 {
  margin: 0 0 4px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: #ffffff !important;
  -webkit-text-fill-color: currentColor !important;
  background: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  line-height: 1.2;
}

html.ha-unified .ha-counselling-modal__head p,
.ha-counselling-modal__head p {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92) !important;
  -webkit-text-fill-color: currentColor !important;
}

.ha-counselling-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ha-counselling-modal__close:hover,
.ha-counselling-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  outline: none;
}

.ha-counselling-modal__frame-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fcf9;
}

.ha-counselling-modal__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, #f8fcf9 0%, #ffffff 100%);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ha-counselling-modal__frame-wrap.is-loaded .ha-counselling-modal__loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ha-counselling-modal__loader-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 115, 5, 0.12);
  color: var(--primary-green, #007305);
  font-size: 1.4rem;
  animation: ha-counselling-pulse 1.4s ease-in-out infinite;
}

.ha-counselling-modal__loader-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark-green, #004b04);
}

@keyframes ha-counselling-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

.ha-counselling-modal__frame {
  display: block;
  width: 100%;
  height: min(72vh, 680px);
  min-height: 520px;
  border: 0;
  background: #fff;
}

.ha-counselling-modal__footer {
  flex-shrink: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(0, 115, 5, 0.12);
  background: linear-gradient(180deg, #f6fbf7 0%, #ffffff 100%);
}

.ha-counselling-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #007a05 0%, #004b04 100%);
  color: #ffffff !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow:
    0 8px 22px rgba(0, 75, 4, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    background 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.ha-counselling-modal__cta i {
  font-size: 1.05rem;
}

.ha-counselling-modal__cta:hover,
.ha-counselling-modal__cta:focus-visible {
  background: linear-gradient(135deg, #008806 0%, #005805 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(0, 75, 4, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  outline: none;
}

.ha-counselling-modal__cta:active {
  transform: translateY(0) scale(0.98);
}

.ha-counselling-modal__hint {
  margin: 10px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
  color: #6b7280;
}

.cta-buttons .ha-book-counselling,
.programs-cta-row .ha-book-counselling,
.cta-btn-row .ha-book-counselling,
.program-hero-cta .ha-book-counselling {
  flex: 0 1 auto;
}

@media (max-width: 768px) {
  .ha-counselling-trigger {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .ha-counselling-modal {
    padding: 0;
    align-items: flex-end;
  }

  .ha-counselling-modal__dialog {
    width: 100%;
    max-height: min(96vh, 900px);
    border-radius: 18px 18px 0 0;
  }

  .ha-counselling-modal__head {
    padding: 14px 16px 12px;
  }

  .ha-counselling-modal__frame-wrap {
    max-height: none;
  }

  .ha-counselling-modal__frame {
    min-height: 560px;
    height: calc(96vh - 200px);
    max-height: 640px;
  }

  .ha-counselling-modal__footer {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* Enroll dock removed — hide legacy markup if present */
html.ha-unified .ha-mobile-enroll-dock {
  display: none !important;
}

/* =============================================================================
   Sticky side admission tab (vertical CTA)
   ============================================================================= */
@keyframes ha-side-tab-in {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@keyframes ha-side-tab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

@keyframes ha-side-tab-in-phone {
  from { opacity: 0; }
  to { opacity: 1; }
}

html.ha-unified .ha-admission-side-tab {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 10055;
  display: flex;
  align-items: stretch;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

html.ha-unified .ha-admission-side-tab.is-ready {
  opacity: 1;
  pointer-events: auto;
  animation: ha-side-tab-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.ha-unified .ha-admission-side-tab__btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 20px 11px;
  border: none;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #006b04 0%, #004b04 52%, #003208 100%);
  color: #fff;
  cursor: pointer;
  text-transform: none;
  font-size: inherit;
  letter-spacing: normal;
  line-height: 1;
  box-shadow:
    -5px 0 20px rgba(0, 0, 0, 0.28),
    inset 1px 0 0 rgba(255, 255, 255, 0.14);
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.24s ease,
    box-shadow 0.24s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  animation: ha-side-tab-pulse 2.8s ease-in-out infinite;
}

html.ha-unified .ha-admission-side-tab__btn:hover,
html.ha-unified .ha-admission-side-tab__btn:focus-visible {
  transform: translateX(-5px);
  background: linear-gradient(180deg, #007a05 0%, #005805 55%, #003d08 100%);
  outline: none;
}

html.ha-unified .ha-admission-side-tab.is-open .ha-admission-side-tab__btn {
  animation: none;
  background: linear-gradient(180deg, #007a05 0%, #005805 100%);
  box-shadow: -6px 0 24px rgba(0, 75, 4, 0.35);
}

html.ha-unified .ha-admission-side-tab__text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

html.ha-unified .ha-admission-side-tab__backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 20, 4, 0.38);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

html.ha-unified .ha-admission-side-tab__backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

html.ha-unified .ha-admission-side-tab__backdrop[hidden] {
  display: none !important;
}

html.ha-unified body.ha-admission-side-open {
  overflow: hidden;
}

html.ha-unified .ha-admission-side-panel {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(12px);
  width: min(240px, calc(100vw - 72px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px 0 0 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 115, 5, 0.14);
  box-shadow: -12px 8px 36px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

html.ha-unified .ha-admission-side-panel.is-open {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

html.ha-unified .ha-admission-side-panel[hidden] {
  display: none !important;
}

html.ha-unified .ha-admission-side-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 6px;
  border-bottom: 1px solid rgba(0, 115, 5, 0.1);
  margin-bottom: 2px;
}

html.ha-unified .ha-admission-side-panel__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #004b04;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html.ha-unified .ha-admission-side-panel__close {
  appearance: none;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 115, 5, 0.08);
  color: #004b04;
  cursor: pointer;
  transition: background 0.2s ease;
}

html.ha-unified .ha-admission-side-panel__close:hover,
html.ha-unified .ha-admission-side-panel__close:focus-visible {
  background: rgba(0, 115, 5, 0.16);
  outline: none;
}

@keyframes ha-side-panel-link-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

html.ha-unified .ha-admission-side-panel__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6fbf7;
  border: 1px solid rgba(0, 115, 5, 0.1);
  color: #004b04;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
  opacity: 0;
}

html.ha-unified .ha-admission-side-panel.is-open .ha-admission-side-panel__link {
  animation: ha-side-panel-link-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.03s + (var(--side-i, 0) * 0.05s));
}

html.ha-unified .ha-admission-side-panel__link:hover,
html.ha-unified .ha-admission-side-panel__link:focus-visible {
  background: #ecfdf5;
  border-color: rgba(0, 115, 5, 0.28);
  transform: translateX(-3px);
  outline: none;
}

html.ha-unified .ha-admission-side-panel__link i {
  width: 18px;
  color: #007305;
  text-align: center;
}

html.ha-unified .ha-admission-side-panel__link--cta {
  background: linear-gradient(135deg, #006b04 0%, #004b04 100%);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

html.ha-unified .ha-admission-side-panel__link--cta i {
  color: #bbf7d0;
}

html.ha-unified .ha-admission-side-panel__link--cta:hover,
html.ha-unified .ha-admission-side-panel__link--cta:focus-visible {
  background: linear-gradient(135deg, #007a05 0%, #005805 100%);
  color: #fff;
}

/* Phone — Admission Open side tab (right edge, above bottom nav) */
@media (max-width: 640px) {
  html.ha-unified .ha-admission-side-tab {
    top: auto;
    bottom: calc(var(--ha-mobile-bottom-nav-h, 84px) + 110px);
    right: 0;
    transform: none;
    z-index: 10055;
  }

  html.ha-unified .ha-admission-side-tab.is-open {
    z-index: 10110;
  }

  html.ha-unified .ha-admission-side-tab.is-open .ha-admission-side-tab__backdrop.is-visible {
    z-index: 10105;
  }

  html.ha-unified .ha-admission-side-tab.is-ready {
    animation: ha-side-tab-in-phone 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform: none;
  }

  html.ha-unified .ha-admission-side-tab__btn {
    min-width: 40px;
    padding: 16px 9px;
    border-radius: 12px 0 0 12px;
  }

  html.ha-unified .ha-admission-side-tab__text {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  html.ha-unified .ha-admission-side-panel {
    right: calc(100% + 8px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) translateX(12px);
    width: min(240px, calc(100vw - 64px));
    max-height: min(70vh, 420px);
    overflow-y: auto;
    border-radius: 14px 0 0 14px;
  }

  html.ha-unified .ha-admission-side-panel.is-open {
    position: fixed;
    right: 48px;
    top: auto;
    bottom: calc(var(--ha-mobile-bottom-nav-h, 84px) + 16px);
    transform: none;
    width: min(280px, calc(100vw - 56px));
    max-height: min(72vh, 460px);
    z-index: 10112;
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
  }

  html.ha-unified .ha-admission-side-tab.is-mobile-dock .ha-admission-side-panel.is-open {
    bottom: calc(var(--ha-mobile-bottom-nav-h, 84px) + 16px);
    transform: none;
  }

  html.ha-unified .ha-admission-side-panel__link {
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 115, 5, 0.12);
    touch-action: manipulation;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  html.ha-unified .ha-admission-side-tab {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    transform: none;
    animation: none;
  }

  html.ha-unified .ha-admission-side-tab.is-ready {
    animation: none;
    transform: none;
  }

  html.ha-unified .ha-admission-side-tab.is-mobile-dock {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  }

  html.ha-unified .ha-admission-side-tab__btn {
    min-width: 36px;
    padding: 14px 8px;
    border-radius: 8px 0 0 8px;
  }

  html.ha-unified .ha-admission-side-tab__text {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }

  html.ha-unified .ha-admission-side-panel {
    right: calc(100% + 6px);
    top: auto;
    bottom: 0;
    transform: translateY(0) translateX(12px);
    width: min(220px, calc(100vw - 56px));
    border-radius: 12px 0 0 12px;
  }

  html.ha-unified .ha-admission-side-panel.is-open {
    transform: translateY(0) translateX(0);
  }
}

@media (max-width: 380px) {
  html.ha-unified .ha-admission-side-tab__text {
    font-size: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.ha-unified .ha-admission-side-tab.is-ready,
  html.ha-unified .ha-admission-side-tab__btn,
  html.ha-unified .ha-admission-side-panel__link {
    animation: none !important;
  }
}
