/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.loading-logo span {
    color: #93c5fd;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loading-progress {
    width: 0;
    height: 100%;
    background: #93c5fd;
    border-radius: 2px;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Particles Animation */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.particle:nth-child(1) {
    width: 30px;
    height: 30px;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 20px;
    height: 20px;
    top: 20%;
    left: 80%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 25px;
    height: 25px;
    top: 60%;
    left: 15%;
    animation-duration: 22s;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 15px;
    height: 15px;
    top: 80%;
    left: 70%;
    animation-duration: 18s;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    width: 30px;
    height: 30px;
    top: 40%;
    left: 85%;
    animation-duration: 24s;
    animation-delay: 1s;
}

.particle:nth-child(6) {
    width: 20px;
    height: 20px;
    top: 70%;
    left: 25%;
    animation-duration: 19s;
    animation-delay: 3s;
}

.particle:nth-child(7) {
    width: 25px;
    height: 25px;
    top: 15%;
    left: 50%;
    animation-duration: 21s;
    animation-delay: 5s;
}

.particle:nth-child(8) {
    width: 15px;
    height: 15px;
    top: 85%;
    left: 40%;
    animation-duration: 17s;
    animation-delay: 7s;
}

.particle:nth-child(9) {
    width: 30px;
    height: 30px;
    top: 50%;
    left: 60%;
    animation-duration: 23s;
    animation-delay: 0.5s;
}

.particle:nth-child(10) {
    width: 20px;
    height: 20px;
    top: 30%;
    left: 30%;
    animation-duration: 20s;
    animation-delay: 2.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(90deg);
    }
    50% {
        transform: translateY(0) translateX(20px) rotate(180deg);
    }
    75% {
        transform: translateY(20px) translateX(10px) rotate(270deg);
    }
}

/* Hero Animations */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.9) 0%, rgba(26, 54, 93, 0.8) 100%);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(147, 197, 253, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(26, 54, 93, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.animate-title {
    overflow: hidden;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

.title-line:first-child {
    animation-delay: 0.3s;
}

.title-line:nth-child(2) {
    animation-delay: 0.6s;
}

.title-line.highlight {
    color: #93c5fd;
    position: relative;
    display: inline-block;
}

.title-line.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    animation: underline 1s ease 1s forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes underline {
    to {
        width: 100%;
    }
}

.animate-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease 0.9s forwards;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease 1.2s forwards;
}

.pulse-animation {
    position: relative;
    overflow: hidden;
}

.pulse-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.hero-visual {
    position: relative;
    height: 300px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.floating-card i {
    font-size: 2.5rem;
    color: #93c5fd;
    margin-bottom: 10px;
}

.floating-card h4 {
    font-size: 0.9rem;
    color: white;
}

.card1 {
    top: 20%;
    left: 10%;
    animation-delay: 1.5s;
    animation: floatCard 6s ease-in-out infinite;
}

.card2 {
    top: 10%;
    right: 15%;
    animation-delay: 1.8s;
    animation: floatCard 7s ease-in-out infinite 0.5s;
}

.card3 {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 2.1s;
    animation: floatCard 5s ease-in-out infinite 1s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 0.8s ease 2.5s forwards;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    position: relative;
    margin: 0 auto 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.arrow span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(45deg);
    margin: -5px auto;
    animation: scrollArrow 2s infinite;
}

.arrow span:nth-child(2) {
    animation-delay: -0.2s;
}

.arrow span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

/* Stats Animation */
.stats-section {
    background: var(--light-color);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s ease;
}

.stat-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Card Animations */
.animate-card {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s ease;
}

.animate-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.card-icon {
    position: relative;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #2d4a8a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.icon-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.card-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.card-link:hover i {
    transform: translateX(5px);
}

/* Service Card Animations */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.6s ease;
}

.service-card.visible {
    transform: scale(1);
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.service-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
}

.icon-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: rotateRing 10s linear infinite;
}

@keyframes rotateRing {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-features li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.service-features i {
    color: #10b981;
    margin-right: 8px;
    font-size: 0.9rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.service-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.service-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

.view-all-button {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.view-all-button:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.view-all-button i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.view-all-button:hover i {
    transform: translateX(5px);
}

/* Client Showcase Animations */
.client-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem 0;
}

.client-logo {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.client-logo.visible {
    opacity: 1;
    transform: scale(1);
}

.client-logo:hover {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.client-logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.client-logo span {
    font-weight: bold;
    color: var(--text-color);
}

/* Testimonial Slider */
.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial {
    display: none;
    animation: fadeInOut 1s ease;
}

.testimonial.active {
    display: block;
}

@keyframes fadeInOut {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-content {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 2rem;
}

.testimonial-content i:first-child {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--accent-color);
    font-size: 1.5rem;
    opacity: 0.3;
}

.testimonial-content i:last-child {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: var(--accent-color);
    font-size: 1.5rem;
    opacity: 0.3;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.author-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.author-info p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-controls button:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.testimonial-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    background: #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

/* CTA Section Animation */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), #2d4a8a);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(147, 197, 253, 0.1) 0%, transparent 50%);
    animation: ctaBgMove 20s ease-in-out infinite alternate;
}

@keyframes ctaBgMove {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.primary-cta {
    background: white;
    color: var(--primary-color);
    border: none;
}

.secondary-cta {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.primary-cta:hover {
    background: #f3f4f6;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.secondary-cta:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Text Center Utility */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 4rem;
}