/* Premium Features Styles */

/* 1. Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation cho Why Cards */
.why-card.reveal {
    transition-delay: var(--delay, 0ms);
}

/* 2. Floating Math Elements */
@keyframes floatMath {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-20px) rotate(15deg);
    }
}

.math-symbol {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 1;
    font-weight: 800;
}

/* 3. Image Reveal Animation */
.feedback-slide img {
    clip-path: inset(100% 2px 2px 2px round 20px);
    transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.feedback-slide.swiper-slide-visible img,
.feedback-slide.swiper-slide-active img {
    clip-path: inset(2px round 20px);
}

/* 4. Zalo Modal Scale-In */
#zalo-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zalo-modal-content {
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 5. FAQ Upgrade */
.faq-a {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.faq-item.open .faq-a {
    max-height: 500px;
    padding-bottom: 16px !important;
    opacity: 1;
}

/* 6. Standardize Badges */
.hero-badge, .tl-month-badge, .mentor-badge, .feedback-badge, .section-tag, .tag {
    border-radius: 50px !important;
}

/* 7. Button Active States */
button:active, .reg-btn:active, .social-btn:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease !important;
}

/* 8. Hero Subtext Opacity */
.hero-sub, .detail-hero p {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* 9. Footer Brand Color */
.footer-logo span {
    color: #FFD87A !important;
}

/* 10. Liquid Glass Breathing */
@keyframes glassBreathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.nav-liquid > div, .bottom-liquid > div {
    animation: glassBreathe 4s ease-in-out infinite;
    will-change: transform;
}

/* 11. Fix Extra White Space at Bottom */
body {
    padding-bottom: 0 !important;
}
footer {
    padding-bottom: 72px !important;
}

/* 12. Blur Reveal & Stagger Effects */
.blur-reveal {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.blur-reveal.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.blur-stagger li {
    opacity: 0;
    filter: blur(12px);
    transform: translateX(-15px);
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.blur-stagger.active li {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}
.blur-stagger.active li:nth-child(1) { transition-delay: 0ms; }
.blur-stagger.active li:nth-child(2) { transition-delay: 150ms; }
.blur-stagger.active li:nth-child(3) { transition-delay: 300ms; }
.blur-stagger.active li:nth-child(4) { transition-delay: 450ms; }

/* 13. Fix Feedback Image Corners (Moved to section 3) */


/* ============================================
   16. Floating Social Buttons
   ============================================ */
.floating-socials {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99999;
}

.floating-social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.floating-social-btn.float-fb {
    animation: messengerFloat 3s ease-in-out infinite 0.5s;
    box-shadow: 0 6px 16px rgba(0, 106, 255, 0.25);
}

.floating-social-btn.float-fb svg {
    transform: scale(1.2); /* Phóng to vừa phải để cân bằng với đuôi của Messenger */
}

.floating-social-btn.float-mess {
    animation: messengerFloat 3s ease-in-out infinite;
    box-shadow: 0 6px 16px rgba(0, 106, 255, 0.25);
}

.floating-social-btn:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    animation: none;
}

.floating-social-btn.float-fb:hover,
.floating-social-btn.float-mess:hover {
    box-shadow: 0 10px 24px rgba(0, 106, 255, 0.35);
}

.floating-social-btn svg {
    width: 34px;
    height: 34px;
}

@keyframes messengerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media(max-width: 600px) {
    .floating-socials {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    .floating-social-btn {
        width: 44px;
        height: 44px;
    }
    .floating-social-btn svg {
        width: 30px;
        height: 30px;
    }
}


/* ============================================
   17. Timeline Effects
   ============================================ */
.tl-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.tl-item.active {
    opacity: 1;
    transform: translateX(0);
}

.tl-item:nth-child(1) { transition-delay: 0s; }
.tl-item:nth-child(2) { transition-delay: 0.15s; }
.tl-item:nth-child(3) { transition-delay: 0.3s; }
.tl-item:nth-child(4) { transition-delay: 0.45s; }
.tl-item:nth-child(5) { transition-delay: 0.6s; }
.tl-item:nth-child(6) { transition-delay: 0.75s; }
.tl-item:nth-child(7) { transition-delay: 0.9s; }
.tl-item:nth-child(8) { transition-delay: 1.05s; }


/* Glow effects for Timeline Dots */
.tl-dot::after {
    content: "";
    position: absolute;
    top: -2.5px; left: -2.5px; right: -2.5px; bottom: -2.5px; /* Cover border */
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    opacity: 0;
}
@keyframes tlDotGlow {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}
.tl-item.active .tl-dot::after {
    animation: tlDotGlow 1.5s ease-out infinite;
    animation-fill-mode: both;
}
.tl-item:nth-child(1).active .tl-dot::after { animation-delay: 0.7s; }
.tl-item:nth-child(2).active .tl-dot::after { animation-delay: 0.85s; }
.tl-item:nth-child(3).active .tl-dot::after { animation-delay: 1.0s; }
.tl-item:nth-child(4).active .tl-dot::after { animation-delay: 1.15s; }
.tl-item:nth-child(5).active .tl-dot::after { animation-delay: 1.3s; }
.tl-item:nth-child(6).active .tl-dot::after { animation-delay: 1.45s; }
.tl-item:nth-child(7).active .tl-dot::after { animation-delay: 1.6s; }
.tl-item:nth-child(8).active .tl-dot::after { animation-delay: 1.75s; }



@media (max-width: 768px) {
    .floating-socials { display: none !important; }
}


/* Remove black shadow line below top nav */
.top-nav:not(.scrolled) {
    box-shadow: none !important;
}


/* ---------------------------------------------------
   LIQUID GOOEY BLOB & GLASSMOVE EFFECT
   --------------------------------------------------- */
.gooey-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: url(#liquid);
    border-radius: inherit;
    background: rgba(200, 25, 43, 0.05);
}
.register-cta {
    position: relative;
    z-index: 1;
}
.register-cta .gooey-wrapper {
    border-radius: 0;
}
.register-box {
    position: relative;
    z-index: 1;
    background: transparent !important;
}
.gooey-blob {
    position: absolute;
    background: var(--red);
    border-radius: 50%;
    filter: blur(12px);
    animation: blobMove 8s infinite alternate ease-in-out;
    opacity: 0.8;
}
.gooey-blob.b1 { width: 150px; height: 150px; top: -30px; left: -30px; animation-duration: 9s; background: #C8192B; }
.gooey-blob.b2 { width: 180px; height: 180px; bottom: -50px; right: 5%; animation-duration: 11s; animation-direction: alternate-reverse; background: #7A0010; }
.gooey-blob.b3 { width: 120px; height: 120px; top: 30%; left: 40%; animation-duration: 13s; background: #FF3B30; }

@keyframes blobMove {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 50px) scale(1.1); }
    100% { transform: translate(-30px, 30px) scale(0.9); }
}

.glass-overlay { background-size: 200% 200%;
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    backdrop-filter: blur(16px); will-change: transform, backdrop-filter;
    -webkit-backdrop-filter: blur(16px); will-change: transform, backdrop-filter;
    animation: glassMove 12s ease-in-out infinite;
    border-radius: inherit;
}
/* Ensure text and buttons stay on top */
.register-cta > *:not(.gooey-wrapper), .register-box > *:not(.gooey-wrapper) {
    position: relative;
    z-index: 2;
}



html { scroll-behavior: smooth; }

.text-gradient-anim {
    background: linear-gradient(90deg, #FF3B30, #FF9500, #FFCC00, #FF3B30);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 3s ease infinite;
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-cta {
    transition: all 0.3s ease;
}
.nav-cta:hover {
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.6);
    transform: translateY(-2px);
}

.footer-social a {
    display: inline-block;
    transition: transform 0.5s ease, color 0.3s ease;
}
.footer-social a:hover {
    transform: rotate(360deg) scale(1.1);
}

.floating-social-btn.float-fb svg {
    fill: #1877F2 !important;
    width: 34px !important;
    height: 34px !important;
    transform: none !important;
}

.course-card {
    transition: transform 0.3s ease;
}
.course-card:hover {
    transform: translateY(-5px);
}
/* Ensure course images fit nicely */
.course-card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.count-up { display: inline-block; font-variant-numeric: tabular-nums; }
