/* ===== Pedagogy Builder Animations ===== */

/* --- Scroll-triggered animations --- */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.animated {
  opacity: 1;
  transform: none !important;
}

/* Fade up */
.anim-fade-up {
  transform: translateY(40px);
}

/* Fade down */
.anim-fade-down {
  transform: translateY(-40px);
}

/* Fade right (RTL: comes from left) */
.anim-fade-right {
  transform: translateX(-40px);
}

/* Fade left (RTL: comes from right) */
.anim-fade-left {
  transform: translateX(40px);
}

/* Zoom in */
.anim-zoom-in {
  transform: scale(0.85);
}

/* Zoom out */
.anim-zoom-out {
  transform: scale(1.15);
}

/* Slide up */
.anim-slide-up {
  transform: translateY(80px);
}

/* Rotate in */
.anim-rotate-in {
  transform: rotate(-5deg) scale(0.9);
}

/* Staggered children */
.anim-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-stagger.animated > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(7) { transition-delay: 0.6s; opacity: 1; transform: none; }
.anim-stagger.animated > *:nth-child(8) { transition-delay: 0.7s; opacity: 1; transform: none; }

/* --- Hover effects --- */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.hover-grow {
  transition: transform 0.3s ease;
}
.hover-grow:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(0, 136, 204, 0.3);
}

.hover-darken {
  position: relative;
  overflow: hidden;
}
.hover-darken::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}
.hover-darken:hover::after {
  background: rgba(0, 0, 0, 0.15);
}

/* --- Parallax --- */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

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

/* --- Counter animation --- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.counter-number {
  display: inline-block;
  animation: countUp 0.6s ease forwards;
}

/* --- Smooth separator --- */
.wave-separator {
  position: relative;
  overflow: hidden;
}
.wave-separator::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: 100% 60px;
}

/* --- Gradient overlays --- */
.gradient-overlay {
  position: relative;
}
.gradient-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.85), rgba(17, 149, 161, 0.85));
  z-index: 1;
}
.gradient-overlay > * {
  position: relative;
  z-index: 2;
}

/* --- Card styles --- */
.builder-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.builder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
.builder-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* --- Section spacing --- */
.builder-section {
  padding: 80px 0;
}
@media (max-width: 768px) {
  .builder-section {
    padding: 48px 0;
  }
}

/* --- Alternating section backgrounds --- */
.builder-section:nth-child(even) {
  background-color: #f8f9fa;
}

/* --- Typography for builder content --- */
.builder-content h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.builder-content h2 {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.builder-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}
.builder-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #444;
}

@media (max-width: 768px) {
  .builder-content h1 { font-size: 2rem; }
  .builder-content h2 { font-size: 1.75rem; }
  .builder-content h3 { font-size: 1.25rem; }
  .builder-content p { font-size: 1rem; }
}

/* --- Button styles --- */
.builder-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.builder-btn-primary {
  background: linear-gradient(135deg, #008bcc, #1195a1);
  color: #fff;
}
.builder-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 139, 204, 0.4);
  color: #fff;
}
.builder-btn-outline {
  background: transparent;
  border: 2px solid #008bcc;
  color: #008bcc;
}
.builder-btn-outline:hover {
  background: #008bcc;
  color: #fff;
  transform: translateY(-3px);
}

/* --- Accordion / FAQ --- */
.builder-accordion-item {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.builder-accordion-header {
  padding: 20px 24px;
  background: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.builder-accordion-header:hover {
  background: #f8f9fa;
}
.builder-accordion-header::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s;
}
.builder-accordion-item.active .builder-accordion-header::after {
  transform: rotate(45deg);
}
.builder-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
}
.builder-accordion-item.active .builder-accordion-body {
  max-height: 500px;
  padding: 0 24px 20px;
}

/* --- Image gallery grid --- */
.builder-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.builder-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.builder-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.builder-gallery-item:hover img {
  transform: scale(1.08);
}

/* --- Video embed responsive --- */
.builder-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.builder-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Testimonial carousel --- */
.builder-testimonial {
  text-align: center;
  padding: 40px;
}
.builder-testimonial-quote {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.8;
  color: #555;
  margin-bottom: 24px;
  position: relative;
}
.builder-testimonial-quote::before {
  content: '"';
  font-size: 4rem;
  color: #008bcc;
  opacity: 0.3;
  position: absolute;
  top: -20px;
  right: -10px;
  font-family: Georgia, serif;
}
.builder-testimonial-author {
  font-weight: 600;
  color: #333;
}

/* --- Stats counter --- */
.builder-stat {
  text-align: center;
  padding: 24px;
}
.builder-stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #008bcc;
  line-height: 1;
  margin-bottom: 8px;
}
.builder-stat-label {
  font-size: 1rem;
  color: #666;
}

/* --- Team member card --- */
.builder-team-card {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
}
.builder-team-card:hover {
  transform: translateY(-8px);
}
.builder-team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 4px solid #f0f0f0;
}
.builder-team-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.builder-team-role {
  font-size: 0.95rem;
  color: #888;
}
