/**
 * Columbus Evolve - Premium Animation Suite
 * High-performance, hardware-accelerated animations & micro-interactions.
 */

/* ==========================================================================
   1. HERO CAROUSEL & KEN BURNS EFFECTS
   ========================================================================== */
@keyframes kenBurnsSlow {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06) translate(-0.5%, -0.5%);
    }
    100% {
        transform: scale(1.02);
    }
}

.hero-carousel-item {
    overflow: hidden;
    position: relative;
    background-size: cover !important;
    background-position: center center !important;
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-item.active.hero-carousel-item {
    animation: kenBurnsSlow 12s ease-in-out infinite alternate;
}

/* Hero Content Staggered Animations */
.carousel-item.active .hero-slide-content .badge {
    animation: heroBadgeEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.carousel-item.active .hero-slide-content h1 {
    animation: heroTitleEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    opacity: 0;
}

.carousel-item.active .hero-slide-content p.lead {
    animation: heroTextEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

.carousel-item.active .hero-slide-content .d-flex {
    animation: heroBtnEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
    opacity: 0;
}

@keyframes heroBadgeEntrance {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroTitleEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTextEntrance {
    0% {
        opacity: 0;
        transform: translateY(25px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroBtnEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Badge Glow Pulse */
@keyframes badgeGlowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(217, 119, 6, 0);
    }
}

.hero-slide-content .badge {
    animation: badgeGlowPulse 3s infinite;
}

/* Ensure primary content cards are always visible on load without waiting for scroll */
.page-card,
.sidebar-widget {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

.reveal,
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    will-change: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-property: opacity, transform;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-scale {
    transform: scale(0.92);
}

/* Active Revealed States */
.reveal.revealed,
.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

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

/* Stagger Delays */
.delay-100 { transition-delay: 0.1s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }
.delay-600 { transition-delay: 0.6s !important; }

/* ==========================================================================
   3. CARD HOVER EFFECTS & LIFT
   ========================================================================== */
.country-card-hover,
.transition-hover,
.card-hover-effect {
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.38s ease !important;
}

.country-card-hover:hover,
.transition-hover:hover,
.card-hover-effect:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 18px 36px -10px rgba(15, 23, 42, 0.15), 0 0 1px 1px rgba(217, 119, 6, 0.2) !important;
}

/* Card Image Subtle Zoom */
.country-card-hover .position-relative img,
.transition-hover img {
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.country-card-hover:hover .position-relative img,
.transition-hover:hover img {
    transform: scale(1.08) !important;
}

/* ==========================================================================
   4. BUTTON MICRO-INTERACTIONS & SHIMMER
   ========================================================================== */
.btn-shimmer,
.hero-btn-primary,
.btn-submit-counselling,
.topbar-btn-inquiry,
.btn-warning {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-shimmer::after,
.hero-btn-primary::after,
.btn-submit-counselling::after,
.topbar-btn-inquiry::after,
.btn-warning::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.32) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: none;
    pointer-events: none;
    opacity: 0;
}

.btn-shimmer:hover::after,
.hero-btn-primary:hover::after,
.btn-submit-counselling:hover::after,
.topbar-btn-inquiry:hover::after,
.btn-warning:hover::after {
    animation: buttonShimmer 0.85s ease-in-out;
    opacity: 1;
}

@keyframes buttonShimmer {
    0% {
        left: -75%;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        left: 135%;
        opacity: 0;
    }
}

/* Button Icon Nudge on Hover */
.btn i,
.hero-btn-primary i,
.hero-btn-glass i,
.btn-submit-counselling i {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover i.fa-arrow-right,
.hero-btn-primary:hover i.fa-arrow-right,
.hero-btn-glass:hover i.fa-arrow-right {
    transform: translateX(4px);
}

.btn:hover i.fa-paper-plane,
.btn-submit-counselling:hover i.fa-paper-plane {
    transform: translate(3px, -3px);
}

/* ==========================================================================
   5. STATS COUNTER BAR
   ========================================================================== */
.stats-counter-section {
    position: relative;
    background: #0f172a;
    color: #ffffff;
    padding: 55px 0 45px;
    border-top: 3px solid #d97706;
}

.stat-item {
    text-align: center;
    padding: 20px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.stat-item:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(217, 119, 6, 0.5);
}

.stat-item .stat-icon {
    font-size: 36px;
    color: #d97706;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.35s ease;
}

.stat-item:hover .stat-icon {
    transform: scale(1.15) rotate(4deg);
}

.stat-item .stat-number {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-item .stat-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

/* ==========================================================================
   6. FLOATING QUICK ACTION BUTTON WITH PULSE RING
   ========================================================================== */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 54px;
    height: 54px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.12);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: pulseRing 2.2s infinite;
    pointer-events: none;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* ==========================================================================
   7. NAVBAR STICKY SMOOTH TRANSITION
   ========================================================================== */
.header-area {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-area.header-scrolled {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* Modal Entrance Animation */
.custom-modal-overlay.active .custom-modal-box {
    animation: modalPopIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ==========================================================================
   8. IMMEDIATE VISIBILITY ENFORCEMENT FOR CONTENT PAGES
   ========================================================================== */
.page-card,
.page-card *,
.sidebar-widget,
.sidebar-widget *,
.page-content-area,
.page-body-content,
.page-breadcrumb-area {
    opacity: 1 !important;
    visibility: visible !important;
}

.page-card,
.sidebar-widget,
.page-content-area,
.page-breadcrumb-area {
    transform: none !important;
    filter: none !important;
}
