/* ========================================
   PREMIUM ANIMATION SYSTEM
   ======================================== */

/* ========== SMOOTH PAGE TRANSITIONS ========== */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-content {
    animation: pageEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ========== SCROLL REVEAL ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.reveal {
    opacity: 0;
}

.reveal.in-view {
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal-down.in-view {
    animation: fadeInDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal-left.in-view {
    animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal-right.in-view {
    animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal-scale.in-view {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Stagger delays */
.reveal-stagger:nth-child(1).in-view { animation-delay: 0s; }
.reveal-stagger:nth-child(2).in-view { animation-delay: 0.1s; }
.reveal-stagger:nth-child(3).in-view { animation-delay: 0.2s; }
.reveal-stagger:nth-child(4).in-view { animation-delay: 0.3s; }
.reveal-stagger:nth-child(5).in-view { animation-delay: 0.4s; }
.reveal-stagger:nth-child(6).in-view { animation-delay: 0.5s; }

/* ========== CARD HOVER EFFECTS ========== */
.card-premium,
.course-card,
.feat-item,
.ccard,
.cert-tile,
.lab-item,
.achievement-card,
.info-card,
.benefit-card,
.contact-quick-info,
.cred-card,
.pricing-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-premium:hover,
.course-card:hover,
.feat-item:hover,
.ccard:hover,
.cert-tile:hover,
.lab-item:hover,
.achievement-card:hover,
.info-card:hover,
.benefit-card:hover,
.contact-quick-info:hover,
.cred-card:hover,
.pricing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 212, 255, 0.25) !important;
}

/* Premium card glow on hover */
@keyframes cardGlow {
    0%, 100% {
        box-shadow: 0 20px 50px rgba(0, 212, 255, 0.25);
    }
    50% {
        box-shadow: 0 25px 60px rgba(0, 212, 255, 0.35);
    }
}

.card-premium.glow:hover,
.course-card.glow:hover,
.ccard.glow:hover {
    animation: cardGlow 1.5s ease-in-out;
}

/* ========== BUTTON HOVER EFFECTS ========== */
.nbtn,
.btn,
button,
.form-submit,
.whatsapp-btn,
.nav-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* Gradient background animation on hover */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nbtn:hover,
.btn:hover,
button:hover,
.form-submit:hover,
.whatsapp-btn:hover,
.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

/* Button pulse effect */
@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
}

.nbtn.pulse:hover,
.btn.pulse:hover {
    animation: buttonPulse 0.6s ease-out;
}

/* ========== NAVBAR ANIMATIONS ========== */
.nav-links a {
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links a:hover::after,
.nav-links a.act::after {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* Sticky navbar reveal */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(10, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ========== LINK HOVER EFFECTS ========== */
a {
    transition: all 0.3s ease;
}

a:not(.nbtn):not(.btn):not(.nav-links a):hover {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    color: var(--c2);
}

/* ========== INPUT FOCUS EFFECTS ========== */
input,
textarea,
select {
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    transform: scale(1.02);
}

input::placeholder,
textarea::placeholder {
    transition: color 0.3s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: var(--c);
    opacity: 0.7;
}

/* ========== SECTION ENTRANCE ANIMATIONS ========== */
.section {
    opacity: 0;
}

.section.in-view {
    animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ========== LOADING ANIMATION ========== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(
        90deg,
        rgba(0, 212, 255, 0.1) 0%,
        rgba(0, 212, 255, 0.2) 50%,
        rgba(0, 212, 255, 0.1) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========== SCROLL PROGRESS ========== */
#scroll-progress {
    transition: width 0.1s linear;
    background: linear-gradient(90deg, var(--c), var(--c2));
}

/* ========== CUSTOM CURSOR ENHANCEMENTS ========== */
#cursor {
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 9999;
}

#cursor-ring {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 9999;
}

#cursor.cursor-hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

#cursor-ring.cursor-ring-hover {
    box-shadow: inset 0 0 15px rgba(0, 212, 255, 0.3);
}

/* ========== TEXT REVEAL ANIMATION ========== */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: textReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.float-delay-1 { animation-delay: 0s; }
.float-delay-2 { animation-delay: 0.5s; }
.float-delay-3 { animation-delay: 1s; }

/* ========== RIPPLE EFFECT ========== */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(0, 212, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ========== BOUNCE ANIMATION ========== */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

/* ========== GRADIENT ANIMATION ========== */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-flow {
    background-size: 200% 200%;
    animation: gradientFlow 3s ease infinite;
}

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

/* ========== TRANSFORM ORIGIN OPTIMIZATION ========== */
.card-premium,
.course-card,
.nbtn,
.btn {
    transform-origin: center center;
}

/* ========== PERFORMANCE OPTIMIZATION ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== 3D PERSPECTIVE ========== */
.perspective-container {
    perspective: 1000px;
}

.perspective-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.perspective-card:hover {
    transform: rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* ========== DARK THEME SPECIFIC ANIMATIONS ========== */
[data-theme="dark"] .card-premium:hover,
[data-theme="dark"] .course-card:hover {
    box-shadow: 0 20px 50px rgba(0, 212, 255, 0.3);
}

/* ========== LIGHT THEME SPECIFIC ANIMATIONS ========== */
[data-theme="light"] .card-premium:hover,
[data-theme="light"] .course-card:hover {
    box-shadow: 0 20px 50px rgba(0, 98, 204, 0.2);
}

/* ========== FOCUS VISIBLE (ACCESSIBILITY) ========== */
*:focus-visible {
    outline: 2px solid var(--c);
    outline-offset: 2px;
}

/* ========== UNDERLINE ANIMATION ========== */
@keyframes underlineExpand {
    from {
        width: 0;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0;
    }
}

.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -4px;
    height: 2px;
    background: var(--c);
    width: 0;
    transition: width 0.3s ease, left 0.3s ease;
}

.underline-animate:hover::after {
    animation: underlineExpand 0.3s ease forwards;
}

/* ========== GLASSMORPHISM UTILITIES ========== */
.glass {
    background: rgba(10, 21, 37, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-light {
    background: rgba(10, 21, 37, 0.95);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ========== PREMIUM CARD HOVER ========== */
@keyframes cardLiftSmooth {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-2px);
    }
}

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

.card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 32px rgba(0, 0, 0, 0.4);
}
