/* ============================================
   TaskCode Solutions - Custom Styles
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ---- Base ---- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.font-formal {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* ---- Navbar ---- */
.navbar-brand-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ---- Backdrop blur ---- */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ---- Client Carousel ---- */
.carousel-track {
    display: flex;
    animation: scroll-carousel 30s linear infinite;
    width: max-content;
}

.carousel-track-reverse {
    animation: scroll-carousel-reverse 30s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

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

@keyframes scroll-carousel-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.client-logo-card {
    position: relative;
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    margin: 0 1rem;
    border-radius: 1rem;
    background: #e5e7eb;
    padding: 1px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
}

.client-logo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 25%,
        #0056b3 35%,
        #00c6ff 45%,
        #0072ff 55%,
        #93c5fd 65%,
        transparent 75%
    );
    animation: rotate-border-light 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.client-logo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 86, 179, 0.2);
}

.client-logo-card:hover::before {
    opacity: 1;
}

@keyframes rotate-border-light {
    100% {
        transform: rotate(360deg);
    }
}

.client-logo-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: calc(1rem - 1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: background-color 0.3s ease;
}

.client-logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Always display in original color and opacity */
    filter: none;
    opacity: 1;
    transition: transform 0.3s ease;
}

.client-logo-card:hover img {
    transform: scale(1.05);
}

/* ---- Fade-in Animation ---- */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(42, 143, 193, 0.1);
}

/* ---- Responsive carousel ---- */
@media (max-width: 640px) {
    .client-logo-card {
        width: 150px;
        height: 90px;
        padding: 1px;
        margin: 0 0.5rem;
    }

    .client-logo-inner {
        padding: 1rem;
        border-radius: calc(1rem - 1px);
    }

    .carousel-track {
        animation-duration: 20s;
    }
}

/* ---- Smooth scroll ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Pulse dot animation for "Nuevo" badge ---- */
.pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ---- Gallery Grid for Mixed Aspect Ratios ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gallery-card {
    position: relative;
    height: 380px; /* Consistent height in the row */
    background: #f8fafc; /* Sleek background to fill space for different aspect ratios */
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Centers and displays full image without cropping */
    transition: transform 0.3s ease;
    padding: 0.5rem;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(42, 143, 193, 0.15);
    border-color: #5bb8e8;
}

.gallery-card:hover img {
    transform: scale(1.03);
}