/* Background Slider */
.background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 1;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.3);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.animate-title {
    animation: fadeInDown 0.1s ease;
}

.animate-text {
    opacity: 0;
    animation: fadeInUp 0.11s ease forwards;
}

.animate-text:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-text:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-text:nth-child(3) {
    animation-delay: 0.2s;
}

.animate-btn {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.2s;
}

.country-card {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
}

.country-card:nth-child(1) { animation-delay: 0.1s; }
.country-card:nth-child(2) { animation-delay: 0.2s; }
.country-card:nth-child(3) { animation-delay: 0.3s; }
.country-card:nth-child(4) { animation-delay: 0.4s; }
.country-card:nth-child(5) { animation-delay: 0.5s; }
.country-card:nth-child(6) { animation-delay: 0.6s; }
.country-card:nth-child(7) { animation-delay: 0.7s; }
.country-card:nth-child(8) { animation-delay: 0.8s; }
.country-card:nth-child(9) { animation-delay: 0.9s; }
.country-card:nth-child(10) { animation-delay: 1.0s; }

.form-section {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

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

.service-card {
    animation: scaleIn 0.5s ease forwards;
    opacity: 0;
}

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

.feature-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

/* Hover Animations */
.hover-pulse:hover {
    animation: pulse 0.5s ease;
}

.hover-bounce:hover {
    animation: bounce 0.5s ease;
}

.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    animation: float 0.1s ease-in-out infinite;
}

.hover-rotate:hover {
    animation: rotateIn 0.5s ease;
}

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #d41f1f;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar Animation */
.progress-bar {
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    animation: progress 2s ease-in-out forwards;
}

@keyframes progress {
    to { width: 100%; }
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: revealText 1s ease forwards;
}

@keyframes revealText {
    to {
        left: 100%;
    }
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% {
        transform: translateX(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--secondary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--secondary-color) }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 30% 0); }
    100% { clip-path: inset(50% 0 10% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(30% 0 20% 0); }
    100% { clip-path: inset(10% 0 40% 0); }
}