/* Animations CSS */

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(0, 181, 217, 0.5), 0 0 10px rgba(0, 181, 217, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 181, 217, 0.8), 0 0 30px rgba(0, 181, 217, 0.5);
    }
    100% {
        text-shadow: 0 0 5px rgba(0, 181, 217, 0.5), 0 0 10px rgba(0, 181, 217, 0.3);
    }
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        box-shadow: 0 0 5px #00b5d9, 0 0 10px #00b5d9, 0 0 15px #00b5d9, 0 0 20px #00b5d9;
    }
    20%, 24%, 55% {
        box-shadow: none;
    }
}

@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Applied Animations */
.animated-text {
    animation: glow 3s infinite;
}

.hero-buttons .btn {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-buttons .btn:nth-child(1) {
    animation-delay: 0.3s;
}

.hero-buttons .btn:nth-child(2) {
    animation-delay: 0.6s;
}

.feature-item {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.feature-icon {
    animation: float 3s ease-in-out infinite;
}

.promo-image {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.promo-content {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.section-title {
    animation: glow 3s infinite;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease;
}

.animate-on-scroll.animate-fade-in {
    opacity: 1;
}

.animate-on-scroll.animate-fade-up {
    transform: translateY(50px);
}

.animate-on-scroll.animate-fade-up.animate-active {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.animate-fade-down {
    transform: translateY(-50px);
}

.animate-on-scroll.animate-fade-down.animate-active {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.animate-fade-left {
    transform: translateX(-50px);
}

.animate-on-scroll.animate-fade-left.animate-active {
    opacity: 1;
    transform: translateX(0);
}

.animate-on-scroll.animate-fade-right {
    transform: translateX(50px);
}

.animate-on-scroll.animate-fade-right.animate-active {
    opacity: 1;
    transform: translateX(0);
}

/* Neon Button Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.btn:hover::before {
    left: 100%;
}

/* Text Gradient Animation */
.text-gradient {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-primary));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    animation: gradientBackground 5s ease infinite;
}

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 181, 217, 0.2);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gallery Lightbox Animation */
.gallery-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 0, 51, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gallery-lightbox-overlay.active .gallery-lightbox-content {
    transform: scale(1);
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--color-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-lightbox-close:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

/* Mobile Navigation Animation */
.menu-toggle .hamburger-icon {
    transition: all 0.3s ease;
}

.menu-toggle.active .hamburger-icon {
    background-color: transparent;
}

.menu-toggle.active .hamburger-icon:before {
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger-icon:after {
    transform: rotate(-45deg);
}

.main-navigation ul {
    transition: all 0.3s ease;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease;
}

/* Neon Border Animation */
.neon-border {
    position: relative;
}

.neon-border::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: calc(var(--border-radius-md) + 3px);
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-primary));
    background-size: 400% 400%;
    animation: gradientBackground 5s ease infinite;
    z-index: -1;
}

/* Curved Wave Animation */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
    transform: rotateY(180deg);
}

.wave-divider .shape-fill {
    fill: var(--color-dark-light);
}

/* Dotted Background Animation */
.dotted-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -1;
}

/* Counter Animation */
.counter-number {
    display: inline-block;
}

.counter-item {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.counter-item .count-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.counter-item .count-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-light);
}

/* Logo Animation */
.logo-animation {
    position: relative;
    display: inline-block;
}

.logo-animation::before,
.logo-animation::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.logo-animation::before {
    color: var(--color-accent);
    z-index: -1;
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.logo-animation::after {
    color: var(--color-primary);
    z-index: -2;
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(70% 0 12% 0);
        transform: translate(-2px, -2px);
    }
    20% {
        clip-path: inset(29% 0 55% 0);
        transform: translate(2px, 2px);
    }
    40% {
        clip-path: inset(53% 0 36% 0);
        transform: translate(-1px, 1px);
    }
    60% {
        clip-path: inset(15% 0 69% 0);
        transform: translate(1px, -1px);
    }
    80% {
        clip-path: inset(87% 0 5% 0);
        transform: translate(1px, -2px);
    }
    100% {
        clip-path: inset(90% 0 3% 0);
        transform: translate(-2px, 2px);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(15% 0 49% 0);
        transform: translate(2px, 2px);
    }
    20% {
        clip-path: inset(35% 0 79% 0);
        transform: translate(-2px, -2px);
    }
    40% {
        clip-path: inset(63% 0 6% 0);
        transform: translate(1px, -1px);
    }
    60% {
        clip-path: inset(17% 0 58% 0);
        transform: translate(-1px, 1px);
    }
    80% {
        clip-path: inset(10% 0 33% 0);
        transform: translate(2px, -2px);
    }
    100% {
        clip-path: inset(71% 0 21% 0);
        transform: translate(-2px, 2px);
    }
}