/*=========================================================
  HOME PAGE ANIMATIONS CSS
  Professional animations for all home page sections
  These animations trigger when elements enter viewport
=========================================================*/

/* ===========================================
   KEYFRAME ANIMATIONS
=========================================== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.6);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Blur In Animation */
@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

/* Slide In Bounce Animation */
@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    60% {
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Float Animation (continuous) */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Pulse Glow Animation (continuous) */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    }

    50% {
        box-shadow: 0 12px 32px rgba(13, 110, 253, 0.15);
    }
}

/* Shimmer Animation (for loading effects) */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Gentle Bounce */
@keyframes gentleBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* Swing Animation */
@keyframes swing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(3deg);
    }

    75% {
        transform: rotate(-3deg);
    }
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

/* ===========================================
   BASE ANIMATION CLASSES - Hidden Initially
=========================================== */

.animate-on-scroll {
    opacity: 0;
    will-change: transform, opacity;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* ===========================================
   HERO SECTION ANIMATIONS
=========================================== */

/* Hero Text Section - Fade In Left */
.heroSection .heroTextSection {
    opacity: 0;
    animation: fadeInLeft 1s ease-out 0.2s forwards;
}

.heroSection .heroTextSection h3 {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.heroSection .heroSubText {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.heroSection .btnReadMoreHero {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    transition: all 0.3s ease;
}

.heroSection .btnReadMoreHero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Hero Images - Staggered Fade In */
.heroSection .hero4Image .col-6:nth-child(1) .imageContainerHero {
    opacity: 0;
    animation: scaleIn 0.7s ease-out 0.3s forwards;
}

.heroSection .hero4Image .col-6:nth-child(2) .imageContainerHero {
    opacity: 0;
    animation: scaleIn 0.7s ease-out 0.5s forwards;
}

.heroSection .hero4Image .col-6:nth-child(3) .imageContainerHero {
    opacity: 0;
    animation: scaleIn 0.7s ease-out 0.7s forwards;
}

.heroSection .hero4Image .col-6:nth-child(4) .imageContainerHero {
    opacity: 0;
    animation: scaleIn 0.7s ease-out 0.9s forwards;
}

/* Hero Image Hover Effects */
.heroSection .imageContainerHero {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.heroSection .imageContainerHero:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.heroSection .imageContainerHero img {
    transition: transform 0.5s ease;
}

.heroSection .imageContainerHero:hover img {
    transform: scale(1.08);
}

/* ===========================================
   THREE CARDS SECTION ANIMATIONS
=========================================== */

.threeUICardHome .col-md-4:nth-child(1) .ui-card3Home {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out 0.2s forwards;
}

.threeUICardHome .col-md-4:nth-child(2) .ui-card3Home {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out 0.4s forwards;
}

.threeUICardHome .col-md-4:nth-child(3) .ui-card3Home {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out 0.6s forwards;
}

/* Card Hover Effects */
.ui-card3Home {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.ui-card3Home:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.ui-card3Home img {
    transition: all 0.4s ease;
}

.ui-card3Home:hover img {
    transform: scale(1.1) translateX(5px);
}

/* ===========================================
   PROGRAMME FILTER SECTION ANIMATIONS
=========================================== */

.programmeFilter {
    position: relative;
}

.programmeFilter .filterHeading {
    opacity: 0;
    animation: fadeInDown 0.8s ease-out 0.2s forwards;
}

.programmeFilter .filterHome {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

/* Filter Dropdown Hover Effects */
.programmeFilter .dropdown-toggle {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.programmeFilter .dropdown-toggle::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #a8b1cd;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.programmeFilter .dropdown-toggle:hover::before {
    width: 80%;
}

/* Apply Filters Button Animation */
.programmeFilter .crsFilter,
.programmeFilter .resetBtn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.programmeFilter .crsFilter:hover,
.programmeFilter .resetBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.programmeFilter .crsFilter::after,
.programmeFilter .resetBtn::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.5s ease, height 0.5s ease;
}

.programmeFilter .crsFilter:active::after,
.programmeFilter .resetBtn:active::after {
    width: 300px;
    height: 300px;
}

/* ===========================================
   PROGRAMME SLIDER SECTION ANIMATIONS
=========================================== */

.programmeSliderHome .heading-row {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out 0.2s forwards;
}

.programmeSliderHome .control-btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.programmeSliderHome .control-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.programmeSliderHome .control-btn:active {
    transform: scale(0.95);
}

/* Course Cards Animation */
.programmeSliderHome .course-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.programmeSliderHome .course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important; 
}

.programmeSliderHome .course-card img {
    transition: transform 0.5s ease;
}

.programmeSliderHome .course-card:hover img {
    transform: scale(1.08);
} 
/* Prevent overflow clipping on card image container */
.programmeSliderHome .course-card .card {
    overflow: visible;
}

/* Category Badge Animation */
.category-badge-outside {
    animation: slideInBounce 0.5s ease-out forwards;
}

/* More Programme Link Hover */
.moreProgHomrPgSlider {
    transition: all 0.3s ease;
    position: relative;
}

.moreProgHomrPgSlider::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primaryBlue);
    transition: width 0.3s ease;
}

.moreProgHomrPgSlider:hover::before {
    width: 100%;
}

.moreProgHomrPgSlider:hover i {
    animation: gentleBounce 0.5s ease infinite;
}

/* ===========================================
   FOR ORGANIZATION SECTION ANIMATIONS
=========================================== */

.forOrganizationHome .forOrgLeftPartHome h3 {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out 0.2s forwards;
}

.forOrganizationHome .ourFunDomainHomePgSec {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    /*text-align: justify;*/
}

/* Domain Pills Animation */
.domain-pill {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.domain-pill:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.domain-pill .icon-box {
    transition: all 0.3s ease;
}

.domain-pill:hover .icon-box {
    transform: rotate(5deg) scale(1.1);
}

/* Custom Programme Form Animation */
.forOrganizationHome .callback-successStoryCard,
.forOrganizationHome [class*="custom-programme"] {
    opacity: 0;
    animation: fadeInRight 0.8s ease-out 0.4s forwards;
}

/* Success Stories Section */
.successStories h5 {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

/* Success Story Cards Hover */
.review-successStoryCard .successStoryCard {
    transition: all 0.3s ease;
}

.review-successStoryCard:hover .successStoryCard {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* ===========================================
   WHAT THEY SAID SECTION ANIMATIONS
=========================================== */

.whatTheySaid .testimonialTextPartHome h3 {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out 0.2s forwards;
}

/* Testimonial Cards - Staggered Animation */
.whatTheySaid .wtsCard {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatTheySaid .wtsCard:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
    border-color: var(--primaryBlue) !important;
}

/* Video Thumbnails Animation */
.videoTestimonials .video-thumb {
    transition: all 0.4s ease;
}

.videoTestimonials .video-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.videoTestimonials .play-button {
    transition: all 0.3s ease;
}

.videoTestimonials .video-thumb:hover .play-button {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 12px 30px rgba(255, 103, 103, 0.3);
}

/* ===========================================
   CONTACT & FAQ SECTION ANIMATIONS
=========================================== */

/* Contact Section */
.contactFAQsHome .contact-sectionHome {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out 0.2s forwards;
}

.contactFAQsHome .contact-info-itemHome {
    transition: all 0.3s ease;
}

.contactFAQsHome .contact-info-itemHome:hover {
    transform: translateX(8px);
}

.contactFAQsHome .contact-icon {
    transition: all 0.3s ease;
}

.contactFAQsHome .contact-info-itemHome:hover .contact-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

/* Help Center Form Animation */
.contactFAQsHome .help-centre-sectionHome {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.contactFAQsHome .form-control,
.contactFAQsHome .form-select,
.contactFAQsHome textarea {
    transition: all 0.3s ease;
}

.contactFAQsHome .form-control:focus,
.contactFAQsHome .form-select:focus,
.contactFAQsHome textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contactFAQsHome .btnContactFAQSubmit {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contactFAQsHome .btnContactFAQSubmit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* FAQ Section Animation */
.contactFAQsHome .homeFAQs {
    opacity: 0;
    animation: fadeInRight 0.8s ease-out 0.4s forwards;
}

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

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

.contactFAQsHome .accordion-buttonFAQsectionHome:hover {
    padding-left: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.contactFAQsHome .faq-icon i {
    transition: transform 0.4s ease;
}

.contactFAQsHome .accordion-buttonFAQsectionHome:not(.collapsed) .faq-icon i {
    transform: rotate(180deg);
}

.contactFAQsHome .accordion-body {
    animation: fadeInDown 0.3s ease-out forwards;
}

/* ===========================================
   BUTTON RIPPLE EFFECT
=========================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: var(--y, 95%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

/* ===========================================
   SMOOTH SCROLL REVEAL WITH INTERSECTION OBSERVER
=========================================== */

/* Elements that will be animated on scroll */
[data-animate] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-up"] {
    transform: translateY(50px);
}

[data-animate="fade-down"] {
    transform: translateY(-50px);
}

[data-animate="fade-left"] {
    transform: translateX(-50px);
}

[data-animate="fade-right"] {
    transform: translateX(50px);
}

[data-animate="scale"] {
    transform: scale(0.85);
}

[data-animate="zoom"] {
    transform: scale(0.6);
}

[data-animate].in-view {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* ===========================================
   LOADING SKELETON ANIMATIONS
=========================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ===========================================
   REDUCED MOTION PREFERENCES
=========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .heroSection .heroTextSection,
    .heroSection .heroTextSection h3,
    .heroSection .heroSubText,
    .heroSection .btnReadMoreHero,
    .heroSection .hero4Image .imageContainerHero,
    .threeUICardHome .ui-card3Home,
    .programmeFilter .filterHeading,
    .programmeFilter .filterHome,
    .programmeSliderHome .heading-row,
    .forOrganizationHome .forOrgLeftPartHome h3,
    .forOrganizationHome .ourFunDomainHomePgSec,
    .whatTheySaid .testimonialTextPartHome h3,
    .contactFAQsHome .contact-sectionHome,
    .contactFAQsHome .help-centre-sectionHome,
    .contactFAQsHome .homeFAQs {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* ===========================================
   RESPONSIVE ANIMATION ADJUSTMENTS
=========================================== */

@media (max-width: 767.98px) {

    /* Reduce animation intensity on mobile for better performance */
    .ui-card3Home:hover,
    .domain-pill:hover,
    .wtsCard:hover {
        transform: translateY(-5px);
    }

    .heroSection .imageContainerHero:hover {
        transform: scale(1.01);
    }

    /* Simplify animations on mobile */
    .heroSection .hero4Image .col-6 .imageContainerHero {
        animation-delay: 0.3s !important;
    }

    .threeUICardHome .col-md-4 .ui-card3Home {
        animation-delay: 0.2s !important;
    }
}