/* =============================================================
   Masalaweds — Animations & Transitions
   ============================================================= */

/* ── Keyframes ── */
@keyframes mw-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mw-fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mw-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mw-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes mw-slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes mw-pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

/* ── Entrance classes (triggered by JS IntersectionObserver) ── */
.mw-animate {
  opacity: 0;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.mw-animate.mw-fade-up {
  transform: translateY(30px);
}
.mw-animate.mw-fade-down {
  transform: translateY(-20px);
}
.mw-animate.mw-fade-left {
  transform: translateX(-30px);
}
.mw-animate.mw-fade-right {
  transform: translateX(30px);
}
.mw-animate.mw-scale-in {
  transform: scale(0.94);
}
.mw-animate.mw-fade {
  transform: none;
}

.mw-animate.mw-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delay helpers */
.mw-delay-1 {
  transition-delay: 0.08s;
}
.mw-delay-2 {
  transition-delay: 0.16s;
}
.mw-delay-3 {
  transition-delay: 0.24s;
}
.mw-delay-4 {
  transition-delay: 0.32s;
}
.mw-delay-5 {
  transition-delay: 0.4s;
}
.mw-delay-6 {
  transition-delay: 0.48s;
}
.mw-delay-7 {
  transition-delay: 0.56s;
}
.mw-delay-8 {
  transition-delay: 0.64s;
}

/* =============================================================
   Header nav menu
   ============================================================= */
.site-header {
  transition:
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.navbar-nav .nav-link {
  transition: color 0.25s ease;
  position: relative;
}
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--mw-primary);
  transition:
    left 0.3s ease,
    right 0.3s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  left: 0.85rem;
  right: 0.85rem;
}

/* Dropdown menu — smooth open + close */
.navbar-nav .dropdown-menu {
  display: block !important;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0s linear 0.22s;
}
.navbar-nav .dropdown-menu.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0s linear 0s;
}
.navbar-nav .dropdown-item {
  transition:
    background 0.2s ease,
    color 0.2s ease,
    padding-left 0.2s ease;
}
.navbar-nav .dropdown-item:hover {
  padding-left: 1.6rem;
}

/* FA icon in nav links */
.navbar-nav .nav-link i {
  transition: transform 0.25s ease;
}

/* =============================================================
   Topbar links & icons
   ============================================================= */
.site-topbar a {
  transition: color 0.25s ease;
  position: relative;
}
.site-topbar a i {
  transition:
    transform 0.3s ease,
    color 0.25s ease;
}
.site-topbar a:hover i {
  transform: scale(1.2);
}

.topbar-social a {
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}
.topbar-social a:hover {
  transform: translateY(-2px);
}

/* Hero carousel — slow fade */
#heroCarousel .carousel-item {
  transition: opacity 2.5s ease !important;
}

/* =============================================================
   Hero carousel arrows — scoped to #heroCarousel only
   ============================================================= */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 56px;
  height: 56px;
  top: calc(50% - 2.25rem);
  transform: translateY(-50%);
  opacity: 0.7;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  border-radius: 50%;
}
#heroCarousel .carousel-control-prev {
  left: 1.25rem;
}
#heroCarousel .carousel-control-next {
  right: 1.25rem;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.12);
  top: calc(50% - 2.25rem);
}

#heroCarousel .carousel-control-prev i,
#heroCarousel .carousel-control-next i {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}
#heroCarousel .carousel-control-prev:hover i {
  transform: translateX(-3px);
}
#heroCarousel .carousel-control-next:hover i {
  transform: translateX(3px);
}

/* Carousel indicators — hero only */
#heroCarousel .carousel-indicators button {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.55) !important;
  border: none !important;
  transition:
    background 0.3s ease,
    transform 0.3s ease !important;
}
#heroCarousel .carousel-indicators button.active {
  background: var(--mw-primary) !important;
  transform: scale(1.35);
}

/* =============================================================
   Footer links & icons
   ============================================================= */
.site-footer a {
  transition: color 0.25s ease;
}
.social-links a {
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}
.social-links a:hover {
  transform: translateY(-3px) scale(1.08);
}

.footer-widgets ul:not(.social-links) li a {
  position: relative;
  padding-left: 0;
  transition:
    color 0.25s ease,
    padding-left 0.25s ease;
}
.footer-widgets ul:not(.social-links) li a::before {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.55rem;
  margin-right: 6px;
  color: var(--mw-primary);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.footer-widgets ul:not(.social-links) li a:hover {
  padding-left: 14px;
  color: var(--mw-primary);
}
.footer-widgets ul:not(.social-links) li a:hover::before {
  opacity: 1;
}

/* =============================================================
   Buttons — all variants
   ============================================================= */

/* Base shared */
.btn-mw-primary,
.btn-mw-outline,
.btn-mw-ghost,
.btn-mw-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--mw-font-body);
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--mw-radius-pill);
  padding: 0.6rem 1.75rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-mw-primary:hover,
.btn-mw-outline:hover,
.btn-mw-ghost:hover,
.btn-mw-gold:hover {
  transform: translateY(-2px);
}
.btn-mw-primary:active,
.btn-mw-outline:active,
.btn-mw-ghost:active,
.btn-mw-gold:active {
  transform: translateY(0);
}

/* Primary */
.btn-mw-primary {
  background: var(--mw-primary);
  color: #fff;
  border-color: var(--mw-primary);
  box-shadow: 0 4px 14px rgba(196, 137, 106, 0.3);
}
.btn-mw-primary:hover {
  background: var(--mw-primary-dark);
  border-color: var(--mw-primary-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(196, 137, 106, 0.45);
}

/* Outline */
.btn-mw-outline {
  background: transparent;
  color: var(--mw-primary);
  border-color: var(--mw-primary);
}
.btn-mw-outline:hover {
  background: var(--mw-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196, 137, 106, 0.3);
}

/* Ghost (text only, subtle bg on hover) */
.btn-mw-ghost {
  background: transparent;
  color: var(--mw-text-muted);
  border-color: transparent;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.btn-mw-ghost:hover {
  background: var(--mw-primary-light);
  color: var(--mw-primary-dark);
}

/* Gold accent */
.btn-mw-gold {
  background: var(--mw-accent);
  color: var(--mw-secondary);
  border-color: var(--mw-accent);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}
.btn-mw-gold:hover {
  background: #b8960e;
  border-color: #b8960e;
  color: #fff;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Sizes */
.btn-mw-sm {
  padding: 0.4rem 1.1rem;
  font-size: var(--mw-fs-sm);
}
.btn-mw-lg {
  padding: 0.85rem 2.5rem;
  font-size: var(--mw-fs-lg);
}

/* Icon-only circle button */
.btn-mw-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--mw-border);
  background: transparent;
  color: var(--mw-text-muted);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-mw-icon:hover {
  border-color: var(--mw-primary);
  color: var(--mw-primary);
  transform: scale(1.08);
}

/* Bootstrap btn overrides to match theme */
.btn-primary {
  --bs-btn-bg: var(--mw-primary);
  --bs-btn-border-color: var(--mw-primary);
  --bs-btn-hover-bg: var(--mw-primary-dark);
  --bs-btn-hover-border-color: var(--mw-primary-dark);
  --bs-btn-active-bg: var(--mw-primary-dark);
  border-radius: var(--mw-radius-pill);
  font-weight: 600;
  transition: all 0.28s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(196, 137, 106, 0.35);
}
