/* ETute Custom Styles - Crisp, Engaging Animations */

/* ========================================
   CUSTOM GRADIENT COLORS
   ======================================== */

/* Override the primary gradient with education-friendly blue-teal gradient */
.bg-gradient-primary {
    background: linear-gradient(135deg, #1e88e5 0%, #26c6da 100%) !important;
}

/* Alternative gradient options */
.bg-gradient-education {
    background: linear-gradient(135deg, #2196f3 0%, #00bcd4 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #00acc1 0%, #26c6da 100%);
}

/* Soft primary background for headers */
.bg-soft-primary {
    background-color: rgba(33, 150, 243, 0.08) !important;
}

/* Update button colors to match new theme */
.btn-primary {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
}

.btn-primary:hover {
    background-color: #1565c0 !important;
    border-color: #1565c0 !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px rgba(30, 136, 229, 0.35) !important;
}

.btn-outline-primary {
    color: #1e88e5 !important;
    border-color: #1e88e5 !important;
}

.btn-outline-primary:hover {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #fff !important;
    transform: translateY(-2px);
}

/* Update primary text color */
.text-primary {
    color: #1e88e5 !important;
}

/* Icon backgrounds */
.btn-soft-primary {
    background-color: rgba(33, 150, 243, 0.1) !important;
    color: #1e88e5 !important;
}

.bullet-soft-primary i {
    color: #1e88e5 !important;
}

/* ========================================
   CRISP, ENGAGING ANIMATIONS
   ======================================== */

/* Hero Entrance - Crisp and Fast */
@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Up - Smooth */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(25px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In - Simple */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Scale Pop - Engaging */
@keyframes scalePop {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Smooth Bounce */
@keyframes smoothBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Gentle Pulse */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ========================================
   ELEMENT-SPECIFIC ANIMATIONS
   ======================================== */

/* Hero Section - Fast, Crisp Entrance */
.wrapper.bg-gradient-primary h1 {
    animation: heroFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wrapper.bg-gradient-primary p.lead {
    animation: heroFadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

.wrapper.bg-gradient-primary .badge {
    animation: scalePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.wrapper.bg-gradient-primary .btn {
    animation: scalePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
}

/* Buttons - Crisp Hover with Ripple */
.btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
    width: 350px;
    height: 350px;
}

.btn:active {
    transform: scale(0.96);
}

/* Cards - Smooth, Engaging Hover */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    opacity: 0;
}

.card.aos-animate {
    animation: fadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.card:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
}

.card:active {
    transform: translateY(-8px) scale(0.99);
}

/* Hover Cards - Extra Engaging */
.hover-card {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, box-shadow;
}

.hover-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 20px 50px rgba(30, 136, 229, 0.25) !important;
}

.hover-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.05), rgba(38, 198, 218, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.hover-card:hover::after {
    opacity: 1;
}

/* Staggered Card Animations with Scroll Trigger */
.card-stagger-1 { animation-delay: 0.05s; }
.card-stagger-2 { animation-delay: 0.1s; }
.card-stagger-3 { animation-delay: 0.15s; }
.card-stagger-4 { animation-delay: 0.2s; }
.card-stagger-5 { animation-delay: 0.25s; }
.card-stagger-6 { animation-delay: 0.3s; }

/* Icons - Smooth Interactions */
.icon.btn-circle {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.icon.btn-circle:hover {
    transform: scale(1.15) rotate(8deg);
}

.card:hover .icon.btn-circle {
    animation: smoothBounce 0.8s ease-in-out;
}

/* AI Badges - Pop Effect */
.badge {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.badge:hover,
.card:hover .badge {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

/* List Items - Staggered Fade In */
.icon-list li {
    opacity: 0;
}

.icon-list li.aos-animate {
    animation: slideInLeft 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.icon-list li:nth-child(1) { animation-delay: 0.05s; }
.icon-list li:nth-child(2) { animation-delay: 0.1s; }
.icon-list li:nth-child(3) { animation-delay: 0.15s; }
.icon-list li:nth-child(4) { animation-delay: 0.2s; }
.icon-list li:nth-child(5) { animation-delay: 0.25s; }
.icon-list li:nth-child(6) { animation-delay: 0.3s; }
.icon-list li:nth-child(7) { animation-delay: 0.35s; }
.icon-list li:nth-child(8) { animation-delay: 0.4s; }

/* Counter Stats - Pop In */
.counter {
    opacity: 0;
}

.counter.aos-animate {
    animation: scalePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Social Icons - Crisp Hover */
.nav.social a {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.nav.social a:hover {
    transform: translateY(-4px) scale(1.15);
}

/* Links - Smooth Underline */
a:not(.btn):not(.nav-link) {
    position: relative;
    transition: color 0.3s ease;
}

a:not(.btn):not(.nav-link)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:not(.btn):not(.nav-link):hover::after {
    width: 100%;
}

/* Form Inputs - Engaging Focus */
input:focus,
textarea:focus,
select:focus {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15) !important;
    transform: scale(1.01);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

input,
textarea,
select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Wrap (Back to Top) - Smooth */
.progress-wrap {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-wrap:hover {
    transform: scale(1.12) rotate(5deg);
}

.progress-wrap:active {
    transform: scale(1.05);
}

/* Navbar - Smooth Scroll Behavior */
.navbar {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    box-shadow: none;
}

/* Navbar when scrolled */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06) !important;
}

/* Navbar smooth entrance */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar brand/links smooth transition */
.navbar .navbar-brand,
.navbar .nav-link {
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* Section Titles - Gentle Entrance */
h2.display-3,
h2.display-4 {
    opacity: 0;
}

h2.display-3.aos-animate,
h2.display-4.aos-animate {
    animation: fadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Images - Smooth Load */
img {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
    animation-delay: 0.1s;
}

/* Accordion - Smooth Expand */
.accordion-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-right: 3rem;
}

/* Remove default Unicons ::before icon that shows unwanted characters */
.accordion-wrapper .card-header button:before {
    content: none !important;
    display: none !important;
}

/* Add Font Awesome chevron icon */
.accordion-button::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f078";
    position: absolute;
    right: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: none !important;
    width: auto;
    height: auto;
    flex-shrink: 0;
}

/* Rotate icon when expanded */
.accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(30, 136, 229, 0.08) !important;
    color: #1e88e5 !important;
    transform: scale(1.01);
}

.accordion-collapse {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Alert Boxes - Slide In */
.alert {
    animation: slideInRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Badge Pulse on Hover */
.card:hover .badge.bg-primary {
    animation: gentlePulse 1.5s ease-in-out infinite;
}

/* Shimmer Effect for Loading States */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ========================================
   SCROLL-TRIGGERED ANIMATIONS
   ======================================== */

/* Elements with scroll animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-on-scroll.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-scale.aos-animate {
    opacity: 1;
    transform: scale(1);
}

.animate-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-left.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

.animate-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-right.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Use GPU acceleration for better performance */
.card,
.btn,
.hover-card,
.icon.btn-circle,
.badge,
.nav.social a {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Subtle animations on mobile */
    .card:hover {
        transform: translateY(-6px) scale(1.005);
    }

    .hover-card:hover {
        transform: translateY(-8px) scale(1.01);
    }

    .btn:hover {
        transform: translateY(-1px) scale(1.01);
    }

    /* Reduce animation duration on mobile */
    .card,
    .hover-card,
    .btn,
    .icon.btn-circle {
        transition-duration: 0.2s;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@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;
    }
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(135deg, #1e88e5, #26c6da, #1e88e5);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Glow effect on hover for primary elements */
.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(30, 136, 229, 0.6),
                0 0 40px rgba(30, 136, 229, 0.4),
                0 0 60px rgba(30, 136, 229, 0.2);
}
