/* Custom CSS for Tailwind Integration */

/* Smooth scroll behavior with padding for fixed header */
html {
    scroll-padding-top: 100px; /* Adjust this value based on your header height */
}

/* Preloader Styles */
#preloader {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Enhanced preloader animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preloader-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom bounce animation for dots */
@keyframes preloaderBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Prevent horizontal scrolling */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Remove custom styles that conflict with Tailwind */
* {
    box-sizing: border-box;
}

/* Custom styles that complement Tailwind */
.header.header-scrolled {
    background: rgba(0, 0, 0, 0.9) !important;
}

/* Video Hero Section */
.video-hero video {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* Ensure video covers the entire container on all devices */
@media (max-aspect-ratio: 16/9) {
    .video-hero video {
        width: auto;
        height: 100%;
    }
}

@media (min-aspect-ratio: 16/9) {
    .video-hero video {
        width: 100%;
        height: auto;
    }
}

/* Text shadow for better readability over video */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Enhanced button animations */
.btn-get-started {
    box-shadow: 0 4px 15px rgba(29, 191, 115, 0.3);
    transition: all 0.3s ease;
}

.btn-get-started:hover {
    box-shadow: 0 8px 25px rgba(29, 191, 115, 0.5);
    transform: translateY(-2px);
}

/* Ensure sections are visible and properly styled */
.testimonials,
.clients {
    display: block;
    visibility: visible;
}

/* Testimonial items styling */
.testimonial-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Client logo styling */
.clients-carousel img {
    filter: grayscale(100%);
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.clients-carousel img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Testimonials Carousel Styles */
.testimonials-carousel .carousel-container {
    position: relative;
    margin: 0 60px;
    /* Space for navigation arrows */
}

.testimonials-carousel .carousel-track {
    will-change: transform;
}

.testimonials-carousel .testimonial-slide {
    min-height: 300px;
    display: flex;
    align-items: center;
}

.testimonials-carousel .carousel-prev,
.testimonials-carousel .carousel-next {
    opacity: 0.9;
    backdrop-filter: blur(10px);
}

.testimonials-carousel .carousel-prev:hover,
.testimonials-carousel .carousel-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.testimonials-carousel .dot {
    cursor: pointer;
    border: 2px solid transparent;
}

.testimonials-carousel .dot:hover {
    border-color: #1dbf73;
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    .testimonials-carousel .carousel-container {
        margin: 0 40px;
    }

    .testimonials-carousel .carousel-prev,
    .testimonials-carousel .carousel-next {
        width: 40px;
        height: 40px;
    }

    .testimonials-carousel .testimonial-item {
        margin: 0 8px;
    }
}

/* Smooth transitions for all elements */
* {
    transition: all 0.3s ease;
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animation {
    animation: countUp 0.6s ease-out;
}

/* Service card hover effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1dbf73;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #16a765;
}

/* Ensure proper spacing */
.section-spacing {
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .section-spacing {
        padding: 6rem 0;
    }
}

/* Custom button styles */
.btn-custom {
    background: linear-gradient(45deg, #1dbf73, #16a765);
    transition: all 0.3s ease;
}

.btn-custom:hover {
    background: linear-gradient(45deg, #16a765, #1dbf73);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(29, 191, 115, 0.3);
}

/* Clients Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
    display: flex;
    width: 200%;
}

.clients-marquee:hover .animate-marquee {
    animation-play-state: paused;
}

.clients-marquee {
    mask: linear-gradient(90deg, transparent, white 5%, white 95%, transparent);
    -webkit-mask: linear-gradient(90deg, transparent, white 5%, white 95%, transparent);
}

.marquee-content {
    padding-left: 0;
    padding-right: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    min-width: 50%;
}

.marquee-content img {
    max-width: none;
    object-fit: contain;
    flex-shrink: 0;
}

/* Responsive marquee adjustments */
@media (max-width: 768px) {
    .animate-marquee {
        animation-duration: 20s;
    }

    .marquee-content {
        padding-left: 0;
        padding-right: 1.5rem;
        min-width: 50%;
        display: flex;
        align-items: center;
    }

    .marquee-content img {
        height: 3rem;
        max-width: none;
        object-fit: contain;
    }
}

/* Portfolio Icon Hover Effect */
.portfolio-item .ion-md-open {
    transition: color 0.3s ease;
}

.portfolio-item .ion-md-open:hover {
    color: #1dd571 !important;
}

/* Alternative selector for portfolio items */
.projects .ion-md-open {
    transition: color 0.3s ease;
}

.projects .ion-md-open:hover {
    color: #1dd571 !important;
}

/* Footer Enhancements */
.footer .copyright {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer .copyright span:last-child {
    transition: color 0.3s ease;
}

.footer .copyright span:last-child:hover {
    color: #16a765;
}

/* Remove portfolio card borders and shadows */
.projects .relative.group {
    box-shadow: none !important;
    border: none !important;
}

.projects .relative.group:hover {
    box-shadow: none !important;
    border: none !important;
}

/* Mobile Navigation Styles */
#mobile-menu {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    visibility: hidden;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.mobile-nav-link:hover {
    background-color: rgba(29, 191, 115, 0.1);
    transform: translateY(-2px);
}

/* Mobile menu button animation */
#mobile-menu-toggle {
    transition: transform 0.3s ease;
}

#mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Responsive header adjustments */
@media (max-width: 1024px) {
    .header-logo img {
        height: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
    }
    
    .header-logo img {
        height: 1.75rem;
    }
    
    /* Make mobile menu smaller on mobile devices */
    .mobile-nav-link {
        font-size: 1rem;
        padding: 0.5rem;
    }
    
    #mobile-menu .space-y-8 {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Even smaller on very small screens */
    .mobile-nav-link {
        font-size: 0.9rem;
        padding: 0.4rem;
    }
    
    #mobile-menu .space-y-8 {
        gap: 1rem;
    }
}
