/* -- ZenBuilder Centralized Styles -- */
/* This file is loaded in both the editor and the frontend */

/* -- Testimonials -- */
.testimonial-bubble {
  position: relative;
  border-radius: 40px;
  padding: 2.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.testimonial-tail {
  position: absolute;
  bottom: -35px;
  left: 2.5rem;
  width: 5rem;
  height: 3rem;
  z-index: 10;
}

.testimonial-bubble-container {
  padding-bottom: 3.5rem;
}

.zb-testimonials-slider {
  position: relative;
  padding-left: 3.5rem;
  padding-right: 3.5rem;
}

@media (min-width: 768px) {
  .zb-testimonials-slider {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

.testimonial-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 40;
  transition: all 0.3s;
}

@media (min-width: 768px) {
  .testimonial-slider-arrow {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.testimonial-slider-arrow:hover {
  background: #f8fafc;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.testimonial-slider-arrow.prev {
  left: 0.5rem;
}
.testimonial-slider-arrow.next {
  right: 0.5rem;
}

@media (min-width: 768px) {
  .testimonial-slider-arrow.prev {
    left: -0.5rem;
  }
  .testimonial-slider-arrow.next {
    right: -0.5rem;
  }
}

/* -- Centralized Slider Navigation (Hero & Others) -- */
.zb-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  transition: all 0.3s;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slider-arrow-color, rgba(255, 255, 255, 0.6));
}

.zb-slider-arrow:hover {
  color: var(--slider-arrow-hover, rgba(255, 255, 255, 1));
  transform: translateY(-50%) scale(1.1);
}

.zb-slider-arrow svg {
  width: 2.5rem;
  height: 2.5rem;
}

@media (min-width: 768px) {
  .zb-slider-arrow svg {
    width: 4rem;
    height: 4rem;
  }
}

.zb-slider-arrow.zb-prev {
  left: 0.5rem;
}
.zb-slider-arrow.zb-next {
  right: 0.5rem;
}

@media (min-width: 768px) {
  .zb-slider-arrow.zb-prev {
    left: 0.75rem;
  }
  .zb-slider-arrow.zb-next {
    right: 0.75rem;
  }

  /* Symmetrical repositioning for Hero Slider Arrows */
  .zb-hero-slider .zb-next {
    right: 5.5rem;
    z-index: 10000;
  }
  .zb-hero-slider .zb-prev {
    left: 5.5rem;
    z-index: 10000;
  }
}

/* -- Slider Dot Touch Targets (Accessibility) -- */
/* Visual size stays 10px; clickable area expanded to ~44px for WCAG 2.5.5 */
.zb-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px; /* expands tap target without changing visual */
  margin: -17px; /* pull it back so layout is unaffected */
  background-clip: content-box;
  box-sizing: content-box;
  border: none;
  cursor: pointer;
}

/* -- Animations -- */
/* ── Entrance Animations ────────────────────────────────────────────────── */
.zb-ani-prepared {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

/* Base Types */
[data-zb-ani="fade-up"].zb-ani-prepared { transform: translateY(40px); }
[data-zb-ani="fade-down"].zb-ani-prepared { transform: translateY(-40px); }
[data-zb-ani="fade-left"].zb-ani-prepared { transform: translateX(40px); }
[data-zb-ani="fade-right"].zb-ani-prepared { transform: translateX(-40px); }
[data-zb-ani="zoom-in"].zb-ani-prepared { transform: scale(0.9); }
[data-zb-ani="zoom-out"].zb-ani-prepared { transform: scale(1.1); }

/* Active State */
.zb-ani-active {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

/* Durations */
[data-zb-ani-duration="fast"] { transition-duration: 0.4s; }
[data-zb-ani-duration="slow"] { transition-duration: 1.2s; }

/* ── Existing Animations ────────────────────────────────────────────────── */
@keyframes zb-float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes zb-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes zb-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes zb-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.zb-ani-float {
  animation: zb-float 4s ease-in-out infinite;
}
.zb-ani-pulse {
  animation: zb-pulse 3s ease-in-out infinite;
}
.zb-ani-spin {
  animation: zb-spin 10s linear infinite;
}
.zb-ani-bounce {
  animation: zb-bounce 2s ease-in-out infinite;
}

/* Hide on mobile utility */
@media (max-width: 767px) {
  .zb-hide-mobile {
    display: none !important;
  }
}

/* ── Standard Container ────────────────────────────── */
.sk-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .sk-container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}


/* Text Color Variable System */
:root {
  --sb-title-color: #064e3b; /* Default Emerald-950 */
  --sb-body-color: #334155;  /* Default Slate-700 */
}

[data-sb-text="white"] {
  --sb-title-color: #ffffff;
  --sb-body-color: rgba(255, 255, 255, 0.85);
}

[data-sb-text="primary"] {
  --sb-title-color: #064e3b;
  --sb-body-color: #334155;
}

[data-sb-text="muted"] {
  --sb-body-color: #475569;
}

/* Apply variables broadly but safely */
[data-sb-text] h1, h1[data-sb-text], h1[data-sb-text], [data-sb-text] h2, h2[data-sb-text], h2[data-sb-text], [data-sb-text] h3, h3[data-sb-text], h3[data-sb-text], 
[data-sb-text] h4:not(.testi-name), h4[data-sb-text]:not(.testi-name), [data-sb-text] h5, h5[data-sb-text], [data-sb-text] h6, h6[data-sb-text] {
  color: var(--sb-title-color) !important;
}

[data-sb-text] p:not(.zb-preserve-colors *), p[data-sb-text]:not(.zb-preserve-colors *), [data-sb-text] span:not(.sk-btn *):not(.badge-container *):not(.slide-badge *):not(.zb-preserve-colors *), 
[data-sb-text] li:not(.zb-preserve-colors *), li[data-sb-text]:not(.zb-preserve-colors *), [data-sb-text] div:not(.slide-badge):not(.slide-badge *):not(.zb-preserve-colors *), div[data-sb-text]:not(.slide-badge):not(.zb-preserve-colors *) {
  color: var(--sb-body-color) !important;
}

/* Support direct class overrides from Tailwind but allow variables to win if explicitly set */
[data-sb-text] [class*="text-gray-"], 
[data-sb-text] [class*="text-slate-"], 
[data-sb-text] [class*="text-primary-"] {
  color: var(--sb-body-color) !important;
}

/* Improve visibility for white text over image backgrounds in Hero Slider */
.zb-hero-slider h1[data-sb-text="white"],
.zb-hero-slider p[data-sb-text="white"],
.zb-hero-slider [data-sb-text="white"] h1,
.zb-hero-slider [data-sb-text="white"] p,
.zb-hero-slider .slide-sub[data-sb-text="white"],
.zb-hero-slider [data-sb-text="white"] .slide-sub {
  color: #ffffff !important;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.zb-hero-slider .slide-badge {
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ── Testimonial card elements: always dark regardless of section text color ── */
.testi-name { color: #1e293b !important; }
.testi-role { color: #475569 !important; }
.testi-quote { color: #1e293b !important; }
.testi-avatar { color: #10b981 !important; }
.testi-quote-icon { color: #1e293b !important; opacity: 0.2; }
/* ==========================================================
   ZenBuilder Dynamic Spacing Overrides
   Bypassing Tailwind Purge CSS for dynamically generated padding/margin
   ========================================================== */

/* Spacing Top */
.pt-8 { padding-top: 2rem !important; }
.pt-12 { padding-top: 3rem !important; }
.pt-20 { padding-top: 5rem !important; }
.pt-32 { padding-top: 8rem !important; }
.pt-40 { padding-top: 10rem !important; }

/* Spacing Bottom */
.pb-8 { padding-bottom: 2rem !important; }
.pb-12 { padding-bottom: 3rem !important; }
.pb-20 { padding-bottom: 5rem !important; }
.pb-32 { padding-bottom: 8rem !important; }
.pb-40 { padding-bottom: 10rem !important; }

/* Margin Top */
.mt-8 { margin-top: 2rem !important; }
.mt-12 { margin-top: 3rem !important; }
.mt-20 { margin-top: 5rem !important; }
.mt-32 { margin-top: 8rem !important; }
.mt-40 { margin-top: 10rem !important; }

/* Margin Bottom */
.mb-8 { margin-bottom: 2rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mb-20 { margin-bottom: 5rem !important; }
.mb-32 { margin-bottom: 8rem !important; }
.mb-40 { margin-bottom: 10rem !important; }

/* Responsive Medium */
@media (min-width: 768px) {
  .md\:pt-8 { padding-top: 2rem !important; }
  .md\:pt-12 { padding-top: 3rem !important; }
  .md\:pt-20 { padding-top: 5rem !important; }
  .md\:pt-32 { padding-top: 8rem !important; }
  .md\:pt-40 { padding-top: 10rem !important; }

  .md\:pb-8 { padding-bottom: 2rem !important; }
  .md\:pb-12 { padding-bottom: 3rem !important; }
  .md\:pb-20 { padding-bottom: 5rem !important; }
  .md\:pb-32 { padding-bottom: 8rem !important; }
  .md\:pb-40 { padding-bottom: 10rem !important; }

  .md\:mt-8 { margin-top: 2rem !important; }
  .md\:mt-12 { margin-top: 3rem !important; }
  .md\:mt-20 { margin-top: 5rem !important; }
  .md\:mt-32 { margin-top: 8rem !important; }
  .md\:mt-40 { margin-top: 10rem !important; }

  .md\:mb-8 { margin-bottom: 2rem !important; }
  .md\:mb-12 { margin-bottom: 3rem !important; }
  .md\:mb-20 { margin-bottom: 5rem !important; }
  .md\:mb-32 { margin-bottom: 8rem !important; }
  .md\:mb-40 { margin-bottom: 10rem !important; }
}


/* Text Color Overrides for Frontend */
[data-sb-text="white"],
[data-sb-text="white"] h1,
[data-sb-text="white"] h2,
[data-sb-text="white"] h3,
[data-sb-text="white"] h4,
[data-sb-text="white"] h5,
[data-sb-text="white"] h6 {
  color: #ffffff;
}

[data-sb-text="white"] p:not(.zb-preserve-colors *),
[data-sb-text="white"] span:not(.sk-btn-primary span):not(.zb-preserve-colors *),
[data-sb-text="white"] .text-slate-600:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-gray-600:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-gray-500:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-gray-400:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-slate-500:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-gray-900:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-gray-950:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-slate-900:not(.zb-preserve-colors *),
[data-sb-text="white"] .text-slate-700:not(.zb-preserve-colors *),
[data-sb-text="white"] [class*="text-primary-900"]:not(.zb-preserve-colors *),
[data-sb-text="white"] [class*="text-gray-"]:not(.zb-preserve-colors *),
[data-sb-text="white"] [class*="text-slate-"]:not(.zb-preserve-colors *) {
  color: rgba(255, 255, 255, 0.85);
}

[data-sb-text="primary"],
[data-sb-text="primary"] h1,
[data-sb-text="primary"] h2,
[data-sb-text="primary"] h3,
[data-sb-text="primary"] h4,
[data-sb-text="primary"] h5,
[data-sb-text="primary"] h6,
[data-sb-text="primary"] .text-gray-950,
[data-sb-text="primary"] .text-gray-900,
[data-sb-text="primary"] .text-slate-900,
[data-sb-text="primary"] .text-primary-950 {
  color: #064e3b !important; /* emerald-950 */
}

[data-sb-text="primary"] p:not(.zb-preserve-colors *),
[data-sb-text="primary"] span:not(.sk-btn-primary span):not(.zb-preserve-colors *),
[data-sb-text="primary"] .text-slate-600:not(.zb-preserve-colors *),
[data-sb-text="primary"] .text-gray-600:not(.zb-preserve-colors *),
[data-sb-text="primary"] .text-gray-500:not(.zb-preserve-colors *),
[data-sb-text="primary"] .text-slate-500:not(.zb-preserve-colors *) {
  color: #334155 !important; /* slate-700 */
}
/* -- Features Grid -- */
.zb-features .zb-feature-card {
  display: flex;
  flex-direction: column;
}

.zb-feature-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  margin-bottom: 2rem;
  transition: all 0.5s;
  flex-shrink: 0;
  /* Use CSS variable for the accent color */
  background-color: color-mix(in srgb, var(--feature-accent, #10b981) 15%, transparent);
  color: var(--feature-accent, #10b981);
}

.zb-feature-card:hover .zb-feature-icon {
  transform: rotate(12deg) scale(1.1);
}

/* -- Programs Grid -- */
.zb-programs-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(12px);
  background-color: color-mix(in srgb, var(--program-accent, #10b981) 85%, transparent);
}

.zb-programs-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s;
  color: var(--program-accent, #10b981);
}

.zb-programs-link:hover {
  gap: 1.25rem;
}

.zb-programs-link span {
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.125rem;
}
/* ── Premium Polish ───────────────────────────────────────────────────────── */

/* Button Shimmer Effect */
.sk-btn-primary, 
.zb-cta-banner a,
.zb-contact-section button[type="submit"],
.zb-admissions button[type="submit"] {
    position: relative;
    overflow: hidden;
}

.sk-btn-primary::after,
.zb-cta-banner a::after,
.zb-contact-section button[type="submit"]::after,
.zb-admissions button[type="submit"]::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: none;
    pointer-events: none;
    animation: zb-shimmer 4s infinite linear;
}

@keyframes zb-shimmer {
    0% { left: -60%; }
    20% { left: 120%; }
    100% { left: 120%; }
}

/* Enhanced Card Hover */
.zb-feature-item,
.zb-programs-grid .group,
.zb-testi-item,
.zb-gallery-grid .group,
.zb-team-item,
.zb-faq-item {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.zb-feature-item:hover,
.zb-programs-grid .group:hover,
.zb-gallery-grid .group:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12) !important;
}

/* Back to Top Button */
.zb-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #fff;
    color: #065f46;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.zb-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.zb-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.zb-back-to-top .chevron {
    width: 22px;
    height: 22px;
    z-index: 2;
}

.zb-back-to-top .progress-circle {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.zb-back-to-top .progress-circle circle {
    fill: none;
    stroke: #065f46;
    stroke-width: 4;
    stroke-dasharray: 301.59; /* 2 * PI * 48 */
    stroke-dashoffset: 301.59;
    transition: stroke-dashoffset 0.1s linear;
}

/* Header Scrolled State */
#main-header.header-scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

#main-header.header-scrolled .header-nav-wrap {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

#main-header.header-scrolled .logo-img-wrap img {
    height: 50px;
}

/* Floating Star Shape */
.sk-star-shape {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.zb-floating-shapes .blur-2xl-lg {
    filter: blur(40px);
}

@media (min-width: 1024px) {
    .zb-floating-shapes .blur-2xl-lg {
        filter: blur(80px);
    }
}
