/* ============================================================
   LITTLE STARS ACADEMY — style.css
   Custom styles, animations, and design tokens
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --sunny: #ffd93d;
  --sky: #4fc3f7;
  --coral: #ff6b6b;
  --mint: #6bcb77;
  --lavender: #a78bfa;
  --peach: #ffb347;
  --rose: #ff85a1;
  --ocean: #0ea5e9;
  --font-display: "Baloo 2", cursive;
  --font-body: "Nunito", sans-serif;
}

/* ---- Base Styles ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--coral);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rose);
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

#summercamp-popup {
  display: none;
}

#summercamp-popup.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.summercamp-popup-overlay {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.summercamp-popup-card {
  transform: scale(0.95);
  opacity: 0;
  animation: popupScaleIn 0.28s ease forwards;
}

@keyframes popupScaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.preloader-stars {
  animation: zoomOpen 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes zoomOpen {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.loader-dots span {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  animation: dotBounce 0.8s ease-in-out infinite alternate;
}
.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0% {
    transform: translateY(0);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-12px);
    opacity: 1;
  }
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  background: transparent;
  transition: all 0.4s ease;
}

#navbar.nav-scrolled {
  background: linear-gradient(135deg, #ff6b6b, #ff85a1, #ffb347) !important;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

#navbar.nav-transparent {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 107, 0.7),
    rgba(255, 133, 161, 0.6),
    rgba(79, 195, 247, 0.6)
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--sunny);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

.logo-icon {
  width: 90px !important;
  height: 48px !important;
}
@media (min-width: 640px) {
  .logo-icon {
    width: 80px !important;
    height: 60px !important;
  }
}
@media (min-width: 1024px) {
  .logo-icon {
    width: 110px !important;
    height: 60px !important;
  }
}

/* Hamburger animation */
#hamburger.open .ham-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#hamburger.open .ham-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#hamburger.open .ham-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 24px;
}

.mobile-menu-dropdown {
  background: linear-gradient(
    160deg,
    rgba(148, 25, 90, 0.97),
    rgba(5, 156, 77, 0.95),
    rgba(151, 84, 65, 0.95)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-slide-1 {
  background: url("asserts/images/slider1.jpg") center/cover no-repeat;
}
/* .hero-slide-2 {
  background: url("asserts/images/slider2.jpg") center/cover no-repeat;
} */
.hero-slide-3 {
  background: url("asserts/images/event2.jpg") center/cover no-repeat;
}
.hero-slide-4 {
  background: url("asserts/images/slider4.jpg") center/cover no-repeat;
}
.hero-slide-5 {
  background: url("asserts/images/slider5.jpg") center/cover no-repeat;
}
.hero-slide-6 {
  background: url("asserts/images/summerbg.jpg") center/cover no-repeat;
}

.hero-btn-primary {
  background: linear-gradient(135deg, var(--sunny), var(--peach));
  font-family: var(--font-display);
}
.hero-btn-primary:hover {
  background: linear-gradient(135deg, var(--peach), var(--sunny));
}

.hero-btn-secondary {
  font-family: var(--font-display);
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.1);
}

/* Swiper Hero Customization */
.hero-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: all 0.3s ease;
}
.hero-pagination .swiper-pagination-bullet-active {
  background: var(--sunny);
  width: 36px;
  border-radius: 6px;
}
.hero-next,
.hero-prev {
  color: white !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  backdrop-filter: blur(6px);
  transition: background 0.3s ease !important;
}
.hero-next:hover,
.hero-prev:hover {
  background: var(--coral) !important;
}
.hero-next::after,
.hero-prev::after {
  font-size: 14px !important;
  font-weight: bold !important;
}

/* Floating Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ============================================================
   GRADIENT TEXT UTILITIES
   ============================================================ */
.text-gradient-coral {
  background: linear-gradient(135deg, var(--coral), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-sky {
  background: linear-gradient(135deg, var(--sky), var(--ocean));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-mint {
  background: linear-gradient(135deg, var(--mint), #2dd4bf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-lavender {
  background: linear-gradient(135deg, var(--lavender), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-peach {
  background: linear-gradient(135deg, var(--peach), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   STAT CARDS COUNTER ANIMATION
   ============================================================ */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  opacity: 0.1;
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
}
.stat-card:hover::before {
  transform: scale(8);
  opacity: 0.05;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-img-card {
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.5s ease;
}
.about-img-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.mv-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   PROGRAMS SECTION
   ============================================================ */
.program-card {
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease;
  opacity: 1 !important;
}

/* ============================================================
   ACTIVITIES SECTION
   ============================================================ */
.activity-card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 1 !important;
}
.act-icon {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tag {
  transition: all 0.2s ease;
}
.tag:hover {
  transform: scale(1.05);
}

/* ============================================================
   WHY CHOOSE US SECTION
   ============================================================ */
.why-us-section {
  position: relative;
}
.why-pattern {
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
}

.why-card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 1 !important;
  transform: none;
}
.why-icon {
  display: inline-block;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  opacity: 1;
}
.gallery-card img {
  transition: transform 0.5s ease;
  opacity: 1;
}
.gallery-card:hover img {
  transform: scale(1.1);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 107, 107, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

/* Gallery Filter Animation */
.gallery-item {
  transition: all 0.4s ease;
}
.gallery-item.hidden-item {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  display: none;
}

/* Lightbox */
#lightbox {
  backdrop-filter: blur(8px);
}
#lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================================
   TESTIMONIALS SECTION
   ============================================================ */
.testi-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.testimonial-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #d1d5db;
  opacity: 1;
  transition: all 0.3s ease;
}
.testimonial-swiper .swiper-pagination-bullet-active {
  background: var(--mint);
  width: 30px;
  border-radius: 5px;
}

/* ============================================================
   MEMORY CARD GAME
   ============================================================ */
.memory-card {
  width: 80px;
  height: 80px;
  perspective: 1000px;
  cursor: pointer;
  border-radius: 16px;
}

@media (max-width: 640px) {
  .memory-card {
    width: 60px;
    height: 60px;
  }
}

.memory-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 16px;
}
.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}
.memory-card.matched .card-front {
  background: linear-gradient(135deg, var(--mint), #2dd4bf) !important;
  box-shadow: 0 0 20px rgba(107, 203, 119, 0.5);
}
.memory-card.shake {
  animation: cardShake 0.4s ease;
}
@keyframes cardShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: 2rem;
}
.card-back {
  background: linear-gradient(135deg, var(--coral), var(--rose));
  color: white;
  font-size: 1.5rem;
}
.card-front {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  box-shadow: inset 0 0 0 2px rgba(255, 217, 61, 0.4);
}

/* ============================================================
   ADMISSIONS SECTION
   ============================================================ */
.admissions-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.3'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-info-card {
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
}
.contact-info-card p {
  word-break: break-all;
  overflow-wrap: anywhere;
}
.map-dots-bg {
  background-image: radial-gradient(
    circle,
    rgba(79, 195, 247, 0.3) 1.5px,
    transparent 1.5px
  );
  background-size: 20px 20px;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.15);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-dots-bg {
  background-image: radial-gradient(circle, white 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#back-to-top {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) !important;
}
#back-to-top:hover {
  box-shadow: 0 12px 24px rgba(255, 107, 107, 0.4);
}

#call-btn {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: phonePulse 2s ease-in-out infinite;
}
#call-btn.visible {
  opacity: 1;
  transform: translateY(0) !important;
}
#call-btn:hover {
  box-shadow: 0 12px 24px rgba(5, 156, 77, 0.4);
  animation: none;
}
@keyframes phonePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(5, 156, 77, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(5, 156, 77, 0);
  }
}

/* ============================================================
   GSAP ANIMATION INITIAL STATES
   ============================================================ */
.gsap-fade-up {
  opacity: 0;
  transform: translateY(50px);
}
.gsap-fade-in {
  opacity: 0;
}
.gsap-scale-in {
  opacity: 0;
  transform: scale(0.8);
}
.gsap-slide-left {
  opacity: 0;
  transform: translateX(-60px);
}
.gsap-slide-right {
  opacity: 0;
  transform: translateX(60px);
}

/* ============================================================
   SECTION BADGE
   ============================================================ */
.section-badge {
  border: 2px solid currentColor;
  transition: transform 0.3s ease;
}
.section-badge:hover {
  transform: scale(1.05);
}

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */
@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 107, 107, 0);
  }
}

/* Smooth hover transitions everywhere */
a,
button,
input,
select,
textarea {
  transition-property:
    color, background-color, border-color, box-shadow, transform, opacity;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
  .hero-swiper .swiper-button-next,
  .hero-swiper .swiper-button-prev {
    display: none;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.5rem !important;
  }
  h2 {
    font-size: 2rem !important;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   COOKIE NOTICE / TOAST (for form submission)
   ============================================================ */
#toast {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 9990;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}
