/* ux-enhancer.css - EZ Bac Enhancement Layer */

:root {
    --transition-speed: 0.3s;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- GLOBAL TRANSITIONS --- */
* {
    transition: background-color var(--transition-speed) ease, 
                border-color var(--transition-speed) ease, 
                color var(--transition-speed) ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease;
}

/* --- ANIMATIONS & INTERACTIONS --- */

/* Hover Effects */
.course-card:hover, .service-card:hover, .about-card:hover, .section-card:hover, .right-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important;
}

button:hover, .btn-primary:hover, .btn-save:hover, .feilds-btn:hover {
    transform: scale(1.04);
}

button:active, .btn-primary:active, .btn-save:active {
    transform: scale(0.96);
}

.nav-item:hover img, .nav-links a:hover {
    transform: translateY(-2px);
}

/* --- REVEAL ANIMATIONS ON LOAD --- */
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- RTL OVERRIDES --- */
[dir="rtl"] {
    text-align: right !important;
}

[dir="rtl"] .nav-left, [dir="rtl"] .dashboard-container, [dir="rtl"] .hero-container, [dir="rtl"] .footer-container {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .nav-links, [dir="rtl"] .dashboard-links {
    margin-right: 40px;
    margin-left: 0;
}

[dir="rtl"] .feilds-buttons {
    justify-content: flex-start !important;
}

/* --- TOGGLE BUTTON STYLES --- */
.theme-lang-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

[dir="rtl"] .theme-lang-controls {
    margin-left: 0;
    margin-right: 20px;
}

.control-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .control-btn {
    background: #30363d;
    color: white;
}

.control-btn:hover {
    background: #e2e8f0;
}

body.dark .control-btn:hover {
    background: #484f58;
}


/* --- CINEMATIC ANIMATIONS --- */

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px rgba(187, 24, 29, 0.2); }
    50% { box-shadow: 0 0 20px rgba(187, 24, 29, 0.6); }
    100% { box-shadow: 0 0 5px rgba(187, 24, 29, 0.2); }
}

@keyframes slide-in-blurred {
    0% { transform: translateY(50px) scale(0.9); filter: blur(10px); opacity: 0; }
    100% { transform: translateY(0) scale(1); filter: blur(0); opacity: 1; }
}

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

.glow-btn {
    animation: glow-pulse 3s infinite;
}

.reveal-cinematic {
    animation: slide-in-blurred 0.8s var(--ease-out) forwards;
}

/* --- REACTIVE BUTTONS --- */
.btn-reactive {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-reactive:hover {
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.btn-reactive:active {
    transform: scale(0.92) translateY(2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Staggered Delay Helpers */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Horizontal Reveal */
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s var(--ease-out);
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s var(--ease-out);
}

/* Feedback Effects */
.correct-feedback { animation: success-pop 0.4s ease; border: 2px solid #22c55e !important; }
.wrong-feedback { animation: shake 0.4s ease; border: 2px solid #ef4444 !important; }
@keyframes success-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
