/**
 * Dawaac Enhanced Styles
 * Beautiful animations and smooth scrolling
 */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

/* Snap sections for smooth scrolling */
section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Enhanced Header with Glassmorphism */
header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Stagger animations for children */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-children > *:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-children > *:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-children > *:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-children > *:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-children > *:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-children > *:nth-child(6) {
    animation-delay: 0.6s;
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1bd1bb 0%, #1facbd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating animation */
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse-slow {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Enhanced button styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::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.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Smooth section transitions */
section {
    transition: opacity 0.3s ease-in-out;
}

/* Enhanced mobile menu */
#mobileMenu {
    transition: all 0.3s ease-in-out;
}

#mobileMenu.menu-closed {
    display: none !important;
    max-height: 0;
    opacity: 0;
}

#mobileMenu.menu-open {
    display: block !important;
    max-height: 1000px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Legacy support */
#mobileMenu.hidden {
    display: none !important;
}

#mobileMenu:not(.hidden) {
    display: block !important;
}

/* Loading skeleton */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1bd1bb 0%, #1facbd 100%);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

/* Enhanced focus states */
*:focus-visible {
    outline: 2px solid #1facbd;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
select,
textarea {
    transition: all 0.2s ease;
}

/* Enhanced shadows */
.shadow-glow {
    box-shadow: 0 0 20px rgba(31, 172, 189, 0.3);
}

.shadow-glow-hover:hover {
    box-shadow: 0 0 30px rgba(31, 172, 189, 0.5);
}

/* Parallax effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Section dividers */
.section-divider {
    position: relative;
    overflow: hidden;
}

.section-divider::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #1facbd, transparent);
}

/* Responsive animations */
@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;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Compare Page Specific Styles */
#emptyState.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#tableWrapper.hidden {
    display: none !important;
    visibility: hidden !important;
}

#tableContainer.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure only one state is visible at a time */
.hidden {
    display: none !important;
}

#clearSearchBtn {
    transition: all 0.3s ease;
}

#clearSearchBtn:hover {
    transform: scale(1.1) translateY(-50%);
}

/* Ensure clear button is visible on red background */
#clearSearchBtn {
    z-index: 10;
}
