/* ============================================================
   HOME PAGE — TECHNOLOGY STACK (PINNED SCROLL-STACK CARDS)
   Home-page-only variant, namespaced under "vt-tech-stack" so it never
   touches the shared .tech-tabs / .mob-tech-card styles in tech-stack.css
   (still used by the tab-based version on the service pages). Colors pull
   from this project's own design tokens (--primary/--secondary/--accent
   etc. in style.css) instead of being hard-coded.
   ============================================================ */

/* ── Stack viewport ── */
.vt-tech-stack__card-stack {
    position: relative;
    width: 100%;
    height: clamp(680px, calc(100vh - 24px), 760px);
    padding-top: 4px;
    overflow: hidden;
    border-radius: var(--radius-xl, 24px);
    box-sizing: border-box;
}

/* ── Outer card surface ── */
.vt-tech-stack__card {
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-xl, 24px);
    padding: 2rem 2.4rem 2.4rem;
    box-shadow: var(--shadow-primary), 0 0 0 1px rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
}

/* Disable CSS transitions on the elements GSAP drives directly */
.vt-tech-stack__card-stack,
.vt-tech-stack__card {
    transition: none !important;
}

@media (min-width: 992px) {
    .vt-tech-stack__card {
        position: absolute;
        top: 4px;
        left: 0;
        width: 100%;
        height: 580px;
        display: flex;
        flex-direction: column;
        will-change: transform;
        overflow: hidden;
        padding: 1.5rem 2rem;
    }

    .vt-tech-stack__inner-card {
        height: auto;
        min-height: 315px;
        flex: 1 0 auto;
        box-sizing: border-box;
        padding: 1.5rem 2rem;
    }

    #vtTechCard01 { z-index: 1; }
    #vtTechCard02 { z-index: 2; }
    #vtTechCard03 { z-index: 3; }
    #vtTechCard04 { z-index: 4; }
}

@media (max-width: 991.98px) {
    .vt-tech-stack__card-stack {
        display: flex;
        flex-direction: column;
        gap: 24px;
        height: auto;
        overflow: visible;
    }

    .vt-tech-stack__card {
        position: relative;
        width: 100%;
        height: auto;
        transform: none !important;
        padding: 1.6rem 1.4rem;
    }

    .vt-tech-stack__inner-card {
        height: auto;
        min-height: 260px;
    }
}

/* ── Card header (number + category title & subtitle) ── */
.vt-tech-stack__card-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.vt-tech-stack__number {
    font-family: var(--font-secondary);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.vt-tech-stack__category {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 2px 0;
}

.vt-tech-stack__subtitle {
    font-family: var(--font-primary);
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ── Inner technology surface ──
   No shared background here on purpose: each card sets its own
   background below (separate rule per card) so they can each point at
   a different image later without touching the others. */
.vt-tech-stack__inner-card {
    position: relative;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg, 18px);
    padding: 1.5rem 2rem;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ── Per-card backgrounds ── */
.vt-tech-stack__inner-card--mobile {
    background:
        linear-gradient(135deg, rgb(15 23 42 / 65%) 0%, rgb(95 10 135 / 42%) 100%),
        url('/Assets/Images/Technologies/tech-card-bg-mobile.jpg') center / cover no-repeat;
}

.vt-tech-stack__inner-card--frontend {
    background:
        linear-gradient(135deg, rgb(15 23 42 / 65%) 0%, rgb(95 10 135 / 42%) 100%),
        url('/Assets/Images/Technologies/tech-card-bg-mobile.jpg') center / cover no-repeat;
}

.vt-tech-stack__inner-card--database {
    background:
        linear-gradient(135deg, rgb(15 23 42 / 65%) 0%, rgb(95 10 135 / 42%) 100%),
        url('/Assets/Images/Technologies/tech-card-bg-mobile.jpg') center / cover no-repeat;
}

.vt-tech-stack__inner-card--backend {
    background:
        linear-gradient(135deg, rgb(15 23 42 / 65%) 0%, rgb(95 10 135 / 42%) 100%),
        url('/Assets/Images/Technologies/tech-card-bg-mobile.jpg') center / cover no-repeat;
}

/* ── Logo grid ── */
.vt-tech-stack__logo-grid {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.8rem 1.2rem;
    align-items: center;
    justify-items: center;
}

.vt-tech-stack__logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
}

.vt-tech-stack__logo-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.vt-tech-stack__logo-icon img {
    max-width: 34px;
    max-height: 34px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Hover — old bounce/scale style (restored from tech-stack.css) */
.vt-tech-stack__logo-item:hover .vt-tech-stack__logo-icon {
    transform: scale(1.5) translateY(-20px);
    box-shadow: rgb(0 0 0 / .5) 20px 20px 30px;
}

.vt-tech-stack__logo-item:hover .vt-tech-stack__logo-icon img {
    animation: vtTechStackBounce 0.5s 0.3s;
}

.vt-tech-stack__logo-item:hover .vt-tech-stack__logo-name {
    font-size: 10px;
}

@keyframes vtTechStackBounce {

    from,
    to {
        transform: scale(1, 1);
    }

    25% {
        transform: scale(.9, 1.1);
    }

    50% {
        transform: scale(1.1, .9);
    }

    75% {
        transform: scale(.95, 1.05);
    }
}

.vt-tech-stack__logo-name {
    font-family: var(--font-primary);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
    letter-spacing: -0.005em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: font-size 0.3s ease-in-out;
}

/* ── Responsive grid columns ── */
@media (max-width: 1199.98px) {
    .vt-tech-stack__logo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.6rem 1.2rem;
    }
}

@media (max-width: 991.98px) {
    .vt-tech-stack__logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575.98px) {
    .vt-tech-stack__logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.4rem 1rem;
    }

    .vt-tech-stack__number {
        font-size: 2.4rem;
    }
}
