/* ============================================
   HORIZIA LIMITED - ANIMATIONS
   Modern, sleek, and professional animations
   ============================================ */

/* ===== FADE IN ANIMATIONS ===== */
@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);
    }
}

/* ===== SCALE ANIMATIONS ===== */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* ===== SLIDE ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ===== ROTATE ANIMATIONS ===== */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* ===== BOUNCE ANIMATIONS ===== */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== SHIMMER EFFECT ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== GLOW PULSE ===== */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(26, 35, 126, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(26, 35, 126, 0.8), 0 0 30px rgba(26, 35, 126, 0.6);
    }
}

/* ===== ANIMATION UTILITY CLASSES ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

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

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
}

/* ===== SCROLL ANIMATIONS (Initially Hidden) ===== */
.scroll-animate {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate--fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate--fade-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate--fade-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate--scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate--visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ===== STAGGER ANIMATIONS ===== */
.stagger-animate > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animate > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animate > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animate > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animate > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animate > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animate > *:nth-child(6) { animation-delay: 0.6s; }

/* ===== ENHANCED HEADER ANIMATIONS ===== */
.header {
    animation: fadeInDown 0.6s ease-out;
}

.header__logo {
    transition: transform 0.3s ease;
}

.header__logo:hover {
    transform: scale(1.05);
}

.nav__link {
    position: relative;
    overflow: hidden;
}

.nav__link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav__link:hover::before,
.nav__link--active::before {
    width: 100%;
}

.nav__dropdown {
    animation: fadeInDown 0.3s ease-out;
}

/* ===== HERO CAROUSEL ENHANCEMENTS ===== */
.hero-carousel__slide {
    animation: fadeIn 0.8s ease-in-out;
}

.hero-carousel__slide--active {
    animation: fadeIn 0.8s ease-in-out;
}

.hero__heading {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero__description {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero__cta {
    animation: fadeInUp 1s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
}

.hero__cta::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;
}

.hero__cta:hover::before {
    width: 300px;
    height: 300px;
}

.hero__visual {
    animation: fadeInRight 1.2s ease-out 0.3s both;
}

.hero__brain-graphic {
    animation: pulse 6s ease-in-out infinite, glowPulse 4s ease-in-out infinite;
}

/* ===== CARD ANIMATIONS ===== */
.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card__title {
    transition: color 0.3s ease;
}

.card:hover .card__title {
    color: var(--color-primary);
}

/* ===== BUTTON ANIMATIONS ===== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after {
    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:hover::after {
    width: 300px;
    height: 300px;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(26, 35, 126, 0.4);
}

.btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(26, 35, 126, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* ===== FORM ANIMATIONS ===== */
.form__input,
.form__textarea,
.form__select {
    transition: all 0.3s ease;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.15);
}

.form__error {
    animation: fadeInDown 0.3s ease-out;
}

.form__success {
    animation: bounceIn 0.6s ease-out;
}

/* ===== FOOTER ANIMATIONS ===== */
.footer {
    animation: fadeInUp 0.8s ease-out;
}

.footer__link {
    position: relative;
    transition: color 0.3s ease;
}

.footer__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-bg);
    transition: width 0.3s ease;
}

.footer__link:hover::after {
    width: 100%;
}

/* ===== CHAT BUBBLE ANIMATIONS ===== */
.chat-bubble__toggle {
    animation: bounceIn 0.8s ease-out;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-bubble__toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

.chat-bubble__widget {
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-bubble__message {
    animation: fadeInLeft 0.4s ease-out;
}

/* ===== COOKIE MANAGER ANIMATIONS ===== */
.cookie-manager {
    animation: slideUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-manager__modal {
    animation: fadeIn 0.3s ease-out;
}

.cookie-manager__modal-content {
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-manager__toggle {
    transition: all 0.3s ease;
}

.cookie-manager__toggle:hover {
    transform: scale(1.1);
}

/* ===== SECTION ANIMATIONS ===== */
.section {
    animation: fadeIn 0.8s ease-out;
}

.section__header {
    animation: fadeInUp 0.8s ease-out;
}

.section__title {
    position: relative;
    display: inline-block;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--color-pink);
    border-radius: 2px;
    animation: fadeInLeft 1s ease-out 0.5s both;
}

/* ===== LOADING ANIMATIONS ===== */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-dark) 0px,
        rgba(255, 255, 255, 0.5) 40px,
        var(--color-bg-dark) 80px
    );
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
}

/* ===== IMAGE LAZY LOAD ANIMATIONS ===== */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded {
    animation: fadeIn 0.5s ease-out;
}

/* ===== NAVIGATION MOBILE MENU ===== */
.nav--open {
    animation: slideInLeft 0.3s ease-out;
}

.nav__toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__toggle:hover {
    opacity: 0.8;
}

/* ===== HERO CAROUSEL INDICATORS ===== */
.hero-carousel__indicator {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-carousel__indicator:hover {
    transform: scale(1.2);
}

.hero-carousel__indicator--active {
    animation: scaleIn 0.3s ease-out;
}

/* ===== GRID STAGGER ANIMATION ===== */
.grid > * {
    animation: fadeInUp 0.6s ease-out both;
}

.grid--2 > *:nth-child(1) { animation-delay: 0.1s; }
.grid--2 > *:nth-child(2) { animation-delay: 0.2s; }

.grid--3 > *:nth-child(1) { animation-delay: 0.1s; }
.grid--3 > *:nth-child(2) { animation-delay: 0.2s; }
.grid--3 > *:nth-child(3) { animation-delay: 0.3s; }

.grid--4 > *:nth-child(1) { animation-delay: 0.1s; }
.grid--4 > *:nth-child(2) { animation-delay: 0.2s; }
.grid--4 > *:nth-child(3) { animation-delay: 0.3s; }
.grid--4 > *:nth-child(4) { animation-delay: 0.4s; }

/* ===== TEXT REVEAL ANIMATION ===== */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-reveal {
    opacity: 0;
    animation: textReveal 0.8s ease-out forwards;
}

/* ===== SMOOTH SCROLL BEHAVIOR ===== */
html {
    scroll-behavior: smooth;
}

/* ===== REDUCED MOTION SUPPORT ===== */
@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;
    }
    
    .scroll-animate,
    .scroll-animate--fade-up,
    .scroll-animate--fade-left,
    .scroll-animate--fade-right,
    .scroll-animate--scale {
        opacity: 1;
        transform: none;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.animate-fade-in,
.animate-fade-in-up,
.animate-fade-in-down,
.card,
.btn {
    will-change: transform, opacity;
}

/* ===== ENHANCED HOVER STATES ===== */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PAGE TRANSITION EFFECT ===== */
@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageFadeIn 0.5s ease-out;
}

