/* =========================================================
   Animations
   ========================================================= */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js [data-anim] {
    opacity: 0;
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
}
.js [data-anim="fade-up"]    { transform: translateY(50px); }
.js [data-anim="fade-down"]  { transform: translateY(-40px); }
.js [data-anim="fade-left"]  { transform: translateX(-70px); }
.js [data-anim="fade-right"] { transform: translateX(70px); }
.js [data-anim="zoom-in"]    { transform: scale(.9); }
.js [data-anim="pop"]        { transform: scale(.6); transition-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
.js [data-anim="fade"]       { transform: none; }
.js [data-anim].in-view      { opacity: 1; transform: none; }
@media (max-width: 1100px) {
    .js [data-anim="fade-left"], .js [data-anim="fade-right"] { transform: translateY(50px); }
    .js [data-anim].in-view { transform: none; }
}

/* ---------- Hero entrance ---------- */
.hero h1 .h1-line { display: block; overflow: hidden; padding-bottom: 4px; margin-bottom: -4px; }
.hero h1 .h1-line > span { display: inline-block; }
.js .hero h1 .h1-line > span { transform: translateY(105%); animation: lineUp 1s var(--ease-out) forwards; }
.js .hero h1 .h1-line:nth-child(2) > span { animation-delay: .12s; }
.js .hero h1 .h1-line:nth-child(3) > span { animation-delay: .24s; }
@keyframes lineUp { to { transform: none; } }

/* ---------- Ambient / looping ---------- */
.squiggle { animation: wiggle 4.5s ease-in-out infinite; transform-origin: 30% 70%; }
@keyframes wiggle {
    0%, 100% { transform: rotate(0) translateY(0); }
    50%      { transform: rotate(-8deg) translateY(-6px); }
}

.hero-dot-red { animation: pulseDot 2.4s ease-in-out infinite; }
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 107, 101, .45); }
    50%      { box-shadow: 0 0 0 12px rgba(242, 107, 101, 0); }
}
.search-dot { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Pulse ring on badge icons (badge itself stays still so it keeps covering the photo) */
.badge-icon { position: relative; }
.badge-icon::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary);
    animation: ring 2.4s ease-out infinite;
}
@keyframes ring {
    0%   { transform: scale(1); opacity: .6; }
    100% { transform: scale(1.6); opacity: 0; }
}
.badge-icon i { animation: tilt 3s ease-in-out infinite; }
@keyframes tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg) scale(1.08); } }

/* Video ripples */
.play-btn::before, .play-btn::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85);
    animation: ripple 2.6s ease-out infinite;
}
.play-btn::after { animation-delay: 1.3s; }
@keyframes ripple {
    0%   { transform: scale(.9); opacity: .9; }
    100% { transform: scale(2.3); opacity: 0; }
}
.play-btn { transition: transform .35s; }
.play-btn:hover { transform: translate(-50%, -50%) scale(1.06); background: transparent; }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: background .3s, transform .3s, box-shadow .3s; }
.btn::before {
    content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; z-index: -1;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg); transition: left .7s ease;
}
.btn:hover::before { left: 130%; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(82, 95, 225, .32); }
.btn i { transition: transform .3s; }
.btn:hover .ti-arrow-up-right { transform: translate(3px, -3px); }
.btn:hover .ti-send { transform: translate(4px, -4px) rotate(8deg); }

/* ---------- Cards & hovers ---------- */
.stat-card { transition: transform .35s var(--ease-out), box-shadow .35s; }
.stat-card:hover { transform: translateY(-8px); box-shadow: 0 22px 40px rgba(10, 15, 71, .1); }
.stat-icon { transition: transform .5s var(--ease-out); }
.stat-card:hover .stat-icon { transform: rotateY(360deg); }

.journey-card { transition: transform .4s var(--ease-out), box-shadow .4s; position: relative; overflow: hidden; }
.journey-card::before {
    content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out);
}
.journey-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(10, 15, 71, .1); }
.journey-card:hover::before { transform: scaleX(1); }
.journey-no { transition: transform .6s var(--ease-out); }
.journey-card:hover .journey-no { transform: rotate(360deg) scale(1.06); }

.check-list li { transition: transform .3s; }
.check-list li:hover { transform: translateX(6px); }
.check-list li i { transition: transform .3s; }
.check-list li:hover i { transform: scale(1.3); }

.pill { transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-out), box-shadow .3s; }
.pill:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(82, 95, 225, .25); }

.course-card { transition: transform .4s var(--ease-out), box-shadow .4s; }
.course-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(10, 15, 71, .1); }
.course-card:hover .stars i { animation: twinkle .6s ease both; }
.course-card:hover .stars i:nth-child(2) { animation-delay: .07s; }
.course-card:hover .stars i:nth-child(3) { animation-delay: .14s; }
.course-card:hover .stars i:nth-child(4) { animation-delay: .21s; }
.course-card:hover .stars i:nth-child(5) { animation-delay: .28s; }
@keyframes twinkle { 50% { transform: scale(1.4) rotate(15deg); } }
.course-fee { transition: background .3s, color .3s; }
.course-card:hover .course-fee { background: var(--primary); color: #fff; }

.partner-logos img { opacity: .8; transition: opacity .3s, transform .35s var(--ease-out); }
.partner-logos img:hover { opacity: 1; transform: translateY(-4px) scale(1.05); }

.instructor-card { transition: transform .4s var(--ease-out), box-shadow .4s, border-color .4s; }
.instructor-card:hover { border-color: transparent; }
.ins-img img { transition: transform .7s var(--ease-out); }
.instructor-card:hover .ins-img img { transform: scale(1.05); }
.ins-share { transition: background .3s; }
.ins-share i { transition: transform .5s; }
.ins-share:hover { background: var(--navy); }
.instructor-card:hover .ins-share i { transform: rotate(360deg); }
.instructor-card h4 { transition: color .3s; }
.instructor-card:hover h4 { color: var(--primary); }

.testi-stars span { transition: transform .3s; }
.testi-card:hover .testi-stars span { animation: twinkle .6s ease both; }
.testi-card:hover .testi-stars span:nth-child(2) { animation-delay: .07s; }
.testi-card:hover .testi-stars span:nth-child(3) { animation-delay: .14s; }
.testi-card:hover .testi-stars span:nth-child(4) { animation-delay: .21s; }
.testi-card:hover .testi-stars span:nth-child(5) { animation-delay: .28s; }
.testi-card { transition: box-shadow .4s, transform .4s var(--ease-out); }
.testi-card:hover { box-shadow: 0 25px 50px rgba(10, 15, 71, .08); transform: translateY(-6px); }
.testi-author img { transition: transform .5s; }
.testi-card:hover .testi-author img { transform: rotate(-10deg) scale(1.08); }

.blog-card { transition: transform .4s var(--ease-out), box-shadow .4s; }
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(10, 15, 71, .1); }

/* Footer */
.footer-col ul a { display: inline-block; transition: color .3s, transform .3s; }
.footer-col ul a:hover { transform: translateX(6px); }
.footer-contact li i { transition: transform .4s; }
.footer-contact li:hover i { transform: scale(1.2) rotate(-8deg); }

.to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 90; background: #fff;
    border-color: var(--primary); color: var(--primary); box-shadow: 0 10px 25px rgba(10, 15, 71, .15);
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: opacity .35s, transform .35s, visibility .35s, background .3s, color .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover i { animation: bob 1s ease-in-out infinite; }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .js [data-anim] { opacity: 1; transform: none; }
    .js .hero h1 .h1-line > span { transform: none; }
}
