html{
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Hero Section */
.wowWork {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
    padding: 80px 0 20px;
    position: relative;
}

.info {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

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

.info h1{
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 24px;
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.info .para{
    font-size: 18px;
    line-height: 1.8;
    color: #4a5568;
    max-width: 850px;
    margin: 0 auto;
}

.info .btn1{
    background-color: #112228;
    color: #F4F4F4;
}

/* Gallery Styles */
.portfolio-gallery {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 30px;
    overflow: hidden;
}

/* Carousel Wrapper */
.carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 25px;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    padding-bottom: 8px;
}

/* Custom scrollbar for webkit browsers */
.carousel-wrapper::-webkit-scrollbar {
    height: 8px;
}

.carousel-wrapper::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.carousel-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.carousel-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: fit-content;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Carousel 1 - Moving Left */
.carousel-left .carousel-track {
    animation-name: scroll-left;
    animation-duration: 60s;
}

/* Carousel 2 - Moving Right */
.carousel-right .carousel-track {
    animation-name: scroll-right;
    animation-duration: 60s;
    transform: translateX(-50%);
}

/* Animation for left scrolling */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Animation for right scrolling */
@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Pause animation on hover */
.carousel-wrapper:hover .carousel-track {
    animation-play-state: paused;
}

/* Pause animation when manually scrolling */
.carousel-wrapper.user-scrolling .carousel-track {
    animation-play-state: paused;
}

.gallery-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    min-height: 280px;
    min-width: 300px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}


.gallery-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover::before {
    opacity: 1;
}

.gallery-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
    z-index: 10;
}

.gallery-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease, opacity 0.4s ease;
    max-height: 320px;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.gallery-card:hover .gallery-img,
.gallery-card:hover .mobile-img {
    transform: scale(1.03);
    opacity: 0.3;
}

/* Project Details Overlay */
.project-details {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(17, 34, 40, 0.95) 0%, rgba(26, 32, 44, 0.95) 100%);
    color: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    z-index: 2;
}

.gallery-card:hover .project-details {
    opacity: 1;
    transform: translateY(0);
}

.project-details h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.project-details p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    max-width: 250px;
}

.project-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.gallery-card:hover .project-tag {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Image loading state */
.gallery-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

.gallery-img[src] {
    background: none;
}

/* Mobile App Cards - Side by Side Layout */
.mobile-app-card {
    display: flex;
    gap: 15px;
    padding: 20px 15px;
    background: linear-gradient(135deg, #f7fafc 0%, #ffffff 50%, #f7fafc 100%);
}

.mobile-app-card .mobile-img {
    width: calc(50% - 7.5px);
    flex-shrink: 0;
    object-fit: contain;
    max-height: 240px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.mobile-app-card:hover .mobile-img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Ensure mobile app cards work with details overlay */
.mobile-app-card .project-details {
    padding: 18px 15px;
}

.mobile-app-card .project-details h3 {
    font-size: 1.2rem;
}

.mobile-app-card .project-details p {
    font-size: 0.8rem;
    max-width: 100%;
}

/* Responsive Adjustments */
@media (min-width: 1400px) {
    .gallery-card {
        min-width: 320px;
        min-height: 300px;
        padding: 18px;
    }
    
    .gallery-img {
        max-height: 300px;
    }
    
    .mobile-app-card .mobile-img {
        max-height: 260px;
    }
}

@media (max-width: 1200px) {
    .gallery-card {
        min-width: 280px;
        min-height: 260px;
    }
    
    .carousel-track {
        gap: 20px;
    }
    
    .gallery-img {
        max-height: 260px;
    }
}

@media (max-width: 768px) {
    .wowWork {
        padding: 60px 0 20px;
    }

    .info h1 {
        font-size: 2.5rem;
    }

    .info {
        margin-bottom: 40px;
    }

    .portfolio-gallery {
        padding: 0 0 25px;
    }

    .gallery-card {
        min-width: 240px;
        min-height: 220px;
        padding: 15px;
    }
    
    .carousel-track {
        gap: 15px;
    }
    
    .mobile-app-card {
        padding: 15px 12px;
    }
    
    .mobile-app-card .mobile-img {
        max-height: 200px;
    }
    
    .info .para {
        font-size: 16px;
    }

    .gallery-img {
        max-height: 220px;
    }
}

@media (max-width: 576px) {
    .info h1 {
        font-size: 2rem;
    }

    .gallery-card {
        min-width: 200px;
        min-height: 180px;
        padding: 12px;
    }
    
    .carousel-track {
        gap: 12px;
    }
    
    .mobile-app-card {
        gap: 10px;
        padding: 12px 10px;
    }
    
    .mobile-app-card .mobile-img {
        width: calc(50% - 5px);
        max-height: 160px;
    }
    
    .info .para {
        font-size: 15px;
        line-height: 1.7;
    }

    .gallery-img {
        max-height: 180px;
    }

    .project-details {
        padding: 15px 12px;
    }

    .project-details h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .project-details p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .project-tag {
        font-size: 0.75rem;
        padding: 5px 14px;
    }
}