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

/* Smooth transitions for all elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Remove transition for animations and specific elements */
*[class*="animate"], 
*[class*="animation"],
.slick-slider,
.swiper-container,
video,
iframe {
    transition: none !important;
}

/* Page content fade-in on scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth hover effects for cards */
.rbt-card,
.rbt-cat-box,
.single-course,
.course-card,
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.rbt-card:hover,
.rbt-cat-box:hover,
.single-course:hover,
.course-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Smooth button transitions */
.rbt-btn,
.btn,
button,
a.button {
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.rbt-btn:hover,
.btn:hover,
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Smooth link transitions */
a {
    transition: color 0.3s ease, opacity 0.3s ease !important;
}

/* Image smooth loading */
img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Smooth form input transitions */
input,
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease !important;
}

input:focus,
textarea:focus,
select:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

/* Smooth modal transitions */
.modal {
    transition: opacity 0.3s ease;
}

.modal.show {
    animation: modalFadeIn 0.3s ease;
}

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

/* Smooth dropdown transitions */
.dropdown-menu {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    transform-origin: top;
}

.dropdown-menu.show {
    animation: dropdownFadeIn 0.3s ease;
}

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

/* Smooth navigation transitions */
.rbt-header {
    transition: all 0.3s ease !important;
}

/* Smooth section transitions */
section {
    transition: opacity 0.5s ease;
}

/* Parallax smooth effect for hero sections */
.rbt-banner-area,
.rbt-breadcrumb,
.hero-section {
    transition: transform 0.1s ease-out;
}

/* Smooth tab transitions */
.tab-content {
    animation: tabFadeIn 0.4s ease;
}

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

/* Smooth accordion transitions */
.accordion-button {
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

.accordion-collapse {
    transition: height 0.3s ease !important;
}

/* Smooth icon animations */
i, svg {
    transition: transform 0.3s ease, color 0.3s ease !important;
}

a:hover i,
a:hover svg,
button:hover i,
button:hover svg {
    transform: scale(1.1);
}

/* Smooth progress bar animations */
.progress-bar {
    transition: width 0.6s ease !important;
}

/* Loading skeleton effect */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth tooltip transitions */
.tooltip {
    transition: opacity 0.3s ease !important;
}

/* Smooth badge animations */
.badge,
.label {
    transition: all 0.3s ease !important;
}

.badge:hover,
.label:hover {
    transform: scale(1.05);
}

/* Page transition overlay */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-transition.active {
    opacity: 1;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Performance optimization - GPU acceleration */
.rbt-card,
.single-course,
.course-card,
.rbt-btn,
.btn {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

