/* Custom Animations and Styles */

/* Keyframe Animations */
@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);
    }
}

/* fadeInRight animation removed */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(30, 64, 175, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(30, 64, 175, 0.6), 0 0 40px rgba(30, 64, 175, 0.4);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

/* animate-fade-in-right class removed */

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.animate-rotate-in {
    animation: rotateIn 0.6s ease-out;
}

.animate-slide-left {
    animation: slideLeft 30s linear infinite;
}

.animate-slide-right {
    animation: slideRight 25s linear infinite;
}

/* Hover Effects */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Button Hover Effects */
.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;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Navigation Hover Effects */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e40af, #1e3a8a);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Card Hover Effects */
.stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15);
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
}

/* Form Focus Effects */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    transform: translateY(-2px);
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(30, 64, 175, 0.3);
    border-radius: 50%;
    border-top-color: #1e40af;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(45deg, #1e40af, #1e3a8a, #3b82f6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    90% {
        transform: translateX(-100%);
    }
    95% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-100%);
    }
    90% {
        transform: translateX(0);
    }
    95% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(0.5deg);
    }
    50% {
        transform: translateY(-4px) rotate(0deg);
    }
    75% {
        transform: translateY(-2px) rotate(-0.5deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 128, 128, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 128, 128, 0.6), 0 0 40px rgba(0, 128, 128, 0.4);
    }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    /* Hint the browser this element will be transformed on scroll */
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Improve compositor isolation for gallery/carousel animations */
.gallery-slider-track,
.slider-track,
.slider-track-2,
.slider-track-3 {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.gallery-item,
.gallery-item-slider {
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.gallery-item-slider img,
.logo-item img,
.service-card img {
    will-change: transform;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-slide-left,
    .animate-slide-right,
    .animate-glow,
    .animate-bounce-in,
    .logo-slider .slider-track,
    .gallery-slider-track,
    .slider-track,
    .slider-track-2,
    .slider-track-3 {
        animation: none !important;
        transition: none !important;
    }

    .parallax,
    .hero-background,
    .gallery-item,
    .gallery-item-slider {
        transform: none !important;
    }
}

/* Mobile Menu Animation */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.show {
    max-height: 500px;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Enhanced Service Cards */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 128, 128, 0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.service-card:hover::before {
    left: 100%;
}

.service-card img {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1);
}

.service-card:hover img {
    filter: brightness(1.05) contrast(1.02);
}

.service-card .card-icon {
    transition: all 0.3s ease;
    transform-origin: center;
}

.service-card:hover .card-icon {
    transform: scale(1.2) rotate(360deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e40af, #1e3a8a);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e3a8a, #1e40af);
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .gradient-text {
        -webkit-text-fill-color: #1e40af;
        background: none;
    }
}

/* Logo Slider Styles */
.logo-slider {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.slider-track {
    display: flex;
    gap: 2rem;
    animation: slideLeft 30s ease-in-out infinite;
}

.slider-track-2 {
    animation: slideRight 35s ease-in-out infinite;
}

.slider-track-3 {
    animation: slideLeft 40s ease-in-out infinite;
}

.logo-item {
    flex-shrink: 0;
    width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(245, 130, 31, 0.1);
}

.logo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 130, 31, 0.2);
    border-color: rgba(245, 130, 31, 0.3);
}

.logo-item img {
    max-width: 100px;
    max-height: 50px;
    width: auto;
    height: auto;
}

/* Pause animation on hover */
.slider-track:hover {
    animation-play-state: paused;
}

.logo-item:hover img {
    transform: scale(1.05);
}
