/* ============================================
   TANG BUN TECH — Custom Styles
   ============================================ */

/* ---- Smooth Scroll ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #d8b4fe;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* ---- Navbar Transition ---- */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(107, 33, 168, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #1c1917 !important;
}

/* ---- Mobile Menu ---- */
.mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* ---- Mobile Menu Toggle Animation ---- */
.menu-toggle-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle-active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Program Cards ---- */
.program-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.program-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(107, 33, 168, 0.12);
}

/* ---- Testimonial Cards ---- */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ---- Scroll Reveal (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---- Form Focus Styles ---- */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ---- Selection Color ---- */
::selection {
    background: #d8b4fe;
    color: #3b0764;
}

/* ---- Print Styles ---- */
@media print {
    nav, .mobile-menu, #contact-form, #form-success {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
