/* ============================================
  .animations - Powerful Site Animations
   ============================================ */

/* === Scroll Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.reveal-rotate {
  opacity: 0;
  transform: rotate(-10deg) scale(0.9);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-rotate.active {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* === Stagger Delay Classes === */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }

/* === Page Hero Animation === */
.page-hero {
  animation: heroSlideDown 0.8s ease-out;
}

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

.page-hero h1 {
  animation: heroTitleFade 1s ease-out 0.3s both;
}

.page-hero p {
  animation: heroTitleFade 1s ease-out 0.5s both;
}

.page-hero .breadcrumb {
  animation: heroTitleFade 1s ease-out 0.7s both;
}

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

/* === Section Title Animation === */
.section-title {
  animation: sectionTitleReveal 0.8s ease-out;
}

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

.section-title .title-underline {
  animation: underlineExpand 0.8s ease-out 0.3s both;
}

@keyframes underlineExpand {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 80px;
    opacity: 1;
  }
}

/* === Card Hover Effects === */
.document-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.document-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(34, 94, 120, 0.05), rgba(216, 180, 74, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.document-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(34, 94, 120, 0.15);
}

.document-card:hover::before {
  opacity: 1;
}

.document-card:hover .doc-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary);
  color: var(--white);
}

.document-card .doc-icon {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Button Animations === */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(34, 94, 120, 0.3);
}

.btn:active {
  transform: translateY(-1px);
}

/* === View Button Animation === */
.doc-btn-view {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-btn-view:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.doc-btn-view i {
  transition: transform 0.3s ease;
}

.doc-btn-view:hover i {
  transform: scale(1.2);
}

/* === Download Button Animation === */
.doc-btn-download,
.btn-primary {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-btn-download:hover,
.btn-primary:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(34, 94, 120, 0.4);
}

/* === Accordion Animation === */
.accordion-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item:hover {
  transform: translateX(-5px);
}

.accordion-header {
  transition: all 0.3s ease;
}

.accordion-header:hover {
  padding-right: 30px;
}

.accordion-header h3 i {
  transition: transform 0.3s ease;
}

.accordion-header:hover h3 i {
  transform: scale(1.2);
  color: var(--gold);
}

/* === Team Card Animation === */
.team-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(34, 94, 120, 0.2);
}

.team-card:hover .team-avatar {
  transform: scale(1.1);
  border-color: var(--gold);
}

.team-card .team-avatar {
  transition: all 0.4s ease;
}

/* === Stat Counter Animation === */
.stat-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(34, 94, 120, 0.2);
}

.stat-item:hover .stat-number {
  color: var(--gold);
  transform: scale(1.1);
}

.stat-item .stat-number {
  transition: all 0.4s ease;
}

/* === Navigation Animations === */
.nav-menu > li > a {
  position: relative;
  transition: all 0.3s ease;
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-menu > li > a:hover::after,
.nav-menu > li.active > a::after {
  width: 100%;
}

.nav-menu > li > a:hover {
  color: var(--primary);
}

/* === Dropdown Animation === */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu > li:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.nav-menu > li:hover > .dropdown-menu li {
  opacity: 1;
  transform: translateX(0);
}

.nav-menu > li:hover > .dropdown-menu li:nth-child(1) { transition-delay: 0.05s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(2) { transition-delay: 0.1s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(3) { transition-delay: 0.15s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(4) { transition-delay: 0.2s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(5) { transition-delay: 0.25s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(6) { transition-delay: 0.3s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(7) { transition-delay: 0.35s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(8) { transition-delay: 0.4s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(9) { transition-delay: 0.45s; }
.nav-menu > li:hover > .dropdown-menu li:nth-child(10) { transition-delay: 0.5s; }

/* === Side Social Bar Animation === */
.side-social-bar {
  animation: sideBarSlide 0.8s ease-out 1s both;
}

@keyframes sideBarSlide {
  from {
    opacity: 0;
    transform: translateX(-100%) translateY(-50%);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
  }
}

.side-social-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-social-link:hover {
  transform: translateX(5px);
}

/* === Footer Animation === */
.footer-col {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-col.active {
  opacity: 1;
  transform: translateY(0);
}

.footer-links li {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s ease;
}

.footer-links li.active {
  opacity: 1;
  transform: translateX(0);
}

/* === Loading Spinner === */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-spinner.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--bg-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === Pulse Animation === */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* === Float Animation === */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* === Glow Animation === */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(34, 94, 120, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(34, 94, 120, 0.4);
  }
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

/* === Text Gradient Animation === */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* === Hover Scale === */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* === Hover Lift === */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* === Border Animation === */
.border-animate {
  position: relative;
  overflow: hidden;
}

.border-animate::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 0.4s ease;
}

.border-animate:hover::before {
  width: 100%;
}

/* === Icon Bounce === */
.icon-bounce:hover i {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-3px);
  }
}

/* === Ripple Effect === */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--primary) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}

.ripple:active::after {
  transform: scale(0, 0);
  opacity: .3;
  transition: 0s;
}

/* === Content Section Animation === */
.content-section {
  animation: sectionFadeIn 0.8s ease-out;
}

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

/* === Main Header Animation === */
.main-header {
  animation: headerSlideDown 0.6s ease-out;
}

@keyframes headerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Back to Top Animation === */
.back-to-top {
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(34, 94, 120, 0.3);
}

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

/* === Donation Card Animation === */
.donation-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.donation-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(34, 94, 120, 0.2);
}

.donation-card:hover .donation-icon {
  transform: scale(1.2) rotate(10deg);
  background: var(--primary);
  color: var(--white);
}

.donation-card .donation-icon {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Image Hover Zoom === */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.1);
}

/* === Link Underline Animation === */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* === Counter Animation === */
.counter {
  display: inline-block;
}

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

/* === Smooth Reveal for Lists === */
.list-item {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease;
}

.list-item.active {
  opacity: 1;
  transform: translateX(0);
}

/* === Typewriter Effect === */
.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--primary);
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary);
  }
}

/* === Mobile Responsive Animations === */
@media (max-width: 768px) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    transition-duration: 0.6s;
  }
  
  .document-card:hover {
    transform: translateY(-3px);
  }
  
  .btn:hover {
    transform: translateY(-2px);
  }
}
