/* ========================================
   GLOBAL SOFT ANIMATIONS & TRANSITIONS
   Add <link rel="stylesheet" href="styles/global.css"> to any page
   ======================================== */
/* === EXCLUDE NAVIGATION AND BACKGROUND FROM FADE === */
header,
nav,
.mobile-nav-toggle,
.mobile-nav-menu,
.logo2,
#sparkle-bg,
body::before,
body::after {
  animation: none !important;
}

/* === SOFT FADE-IN FOR ALL MAIN SECTIONS === */
main,
section,
.hero-flex,
.gallery-section,
.event-card,
.lesson-card,
.form-container,
.inquiry-form,
.directory-section {
  animation: softFadeIn 0.8s ease-out;
}

@keyframes softFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SMOOTH TRANSITIONS FOR INTERACTIVE ELEMENTS === */
a,
button,
.cta-btn,
.submit-btn,
.circle-button,
nav a,
.mobile-nav-toggle {
  transition: all 0.3s ease;
}

/* === SOFT HOVER EFFECTS === */
a:hover,
button:hover,
nav a:hover {
  transition: all 0.3s ease;
}

/* === IMAGE FADE-IN === */
img {
  animation: imageFadeIn 0.8s ease-out;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes imageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* === CARD ELEMENTS SOFT ENTRANCE === */
.card,
.event-card,
.lesson-card,
.offer-card,
.circle-button,
.inquiry-form,
.form-section {
  animation: cardSlideIn 0.7s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === STAGGERED ANIMATION FOR MULTIPLE ITEMS === */
.event-card:nth-child(1),
.lesson-card:nth-child(1),
.circle-button:nth-child(1) {
  animation-delay: 0.1s;
}

.event-card:nth-child(2),
.lesson-card:nth-child(2),
.circle-button:nth-child(2) {
  animation-delay: 0.2s;
}

.event-card:nth-child(3),
.lesson-card:nth-child(3),
.circle-button:nth-child(3) {
  animation-delay: 0.3s;
}

.event-card:nth-child(4),
.lesson-card:nth-child(4) {
  animation-delay: 0.4s;
}

.event-card:nth-child(5),
.lesson-card:nth-child(5) {
  animation-delay: 0.5s;
}

/* === SMOOTH FORM INPUT TRANSITIONS === */
input,
textarea,
select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* === NAVIGATION SMOOTH TRANSITIONS === */
header {
  transition: all 0.3s ease;
}

.mobile-nav-menu {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* === GALLERY IMAGE SOFT TRANSITIONS === */
.gallery-item,
.photo-card,
.gallery img {
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.3s ease;
}

.gallery-item:hover,
.photo-card:hover {
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

/* === MODAL/POPUP SOFT ENTRANCE === */
.modal,
.popup,
.overlay {
  animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === REDUCE MOTION FOR ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === SMOOTH SCROLL BEHAVIOR === */
html {
  scroll-behavior: smooth;
}

/* === PAGE TRANSITION EFFECT (optional - for SPA-like feel) === */
.page-transition {
  animation: pageSlideIn 0.5s ease-out;
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === SOFT SHADOW TRANSITIONS === */
.card,
.event-card,
.lesson-card,
.circle,
.inquiry-form {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* === TEXT FADE-IN === */
h1,
h2,
h3,
.hero-content,
.page-header {
  animation: textFadeIn 0.8s ease-out;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === BUTTON PRESS EFFECT === */
button:active,
.cta-btn:active,
.submit-btn:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* === LOADING STATE TRANSITIONS === */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* cart modal styles */
/* Cart Modal Styles */
.cart-modal {
  display: none;
  position: fixed;
  top: 60px;
  right: 30px;
  z-index: 999;
  background: #4c3364;
  border-radius: 16px;
  box-shadow: 0 2px 16px #716cff22;
  padding: 1.2em 1.5em;
  min-width: 320px;
  max-width: 95vw;
  max-height: 80vh;
  overflow-y: auto;
}
.cart-modal-title {
  font-weight: 700;
  font-size: 1.15em;
  margin-bottom: 0.7em;
}
.cart-modal-btn {
  display: block;
  width: 100%;
  margin-top: 1em;
  padding: 0.5em 1.2em;
  font-weight: 700;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.cart-modal-btn.view {
  background: #fff;
  color: #716cff;
  border: 2px solid #716cff;
  margin-bottom: 0.5em;
}
.cart-modal-btn.view:hover {
  background: #f3f2ff;
}
.cart-modal-btn.close {
  background: #716cff;
  color: #fff;
  border: none;
}
.cart-modal-btn.close:hover {
  background: #574fd6;
}
/* Cart Icon Container */
.cart-nav {
  margin-left: 1em;
  cursor: pointer;
  position: relative;
  display: inline-block;
}

/* Cart Icon Image */
.cart-icon-img {
  height: 24px;
  vertical-align: middle;
  display: inline-block;
}

/* Cart Count Badge */
.cart-count {
  background: #ff6b6b;
  color: #fff;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 0.9em;
  position: absolute;
  top: -10px;
  right: -15px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 1px 4px #0002;
  pointer-events: none;
}