/* SECTION */
.tech-section {
    background: linear-gradient(135deg, #0b1220, #0a1628, #0b1220);
    color: var(--white);
    overflow: hidden;
}

/* HEADER */
.tech-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.tech-section .span-badge {
    margin-bottom: 15px;
}

.tech-section .section-header h2 {
    margin-bottom: 10px;
}

.tech-section .section-header h2 span {
    background: linear-gradient(to right, #22d3ee, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tech-section .section-header p {
    max-width: 600px;
    margin: auto;
    color: var(--para);
}

/* CARD WRAPPER */
.tech-section .card-wrapper {
    display: flex;
    gap: 14px;
    height: 520px;
}

/* CARD */
.tech-section .tech-card {
    position: relative;
    flex: 1;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s ease;
}

/* EXPAND ON HOVER */
.tech-section .tech-card:hover {
    flex: 3.5;
    transform: translateY(-6px);
}

/* IMAGE */
.tech-section .tech-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 0.7s ease, filter 0.5s ease;
    filter: brightness(0.85);
}

/* HOVER IMAGE */
.tech-section .tech-card:hover img {
    transform: scale(1.15);
    filter: brightness(1.05);
}

/* OVERLAY (LIGHT INITIAL DARK LAYER) */
.tech-section .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 100%);
    transition: all 0.5s ease;
}

/* HOVER OVERLAY (slightly lighter, NOT removed) */
.tech-section .tech-card:hover .overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.15) 100%);
}

/* BLUE TINT */
.tech-section .gradient {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.12);
}

/* CONTENT */
.tech-section .content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    z-index: 2;
}

/* TITLE ALWAYS VISIBLE */
.tech-section .content h3 {
    color: var(--white);
    margin-bottom: 8px;
    position: absolute;
    top: 20px;
    transform: rotate(0deg);
}

.tech-section .card-wrapper:hover .tech-card:not(:hover) .content h3 {
    transform: rotate(180deg);
    writing-mode: vertical-rl;
}

/* =========================
   KEEP HOVER CARD NORMAL
========================= */
.tech-section .card-wrapper:hover .tech-card:hover .content h3 {
    transform: rotate(0deg);
    opacity: 1;
}

.tech-section .desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(12px);
    transition: all 0.5s ease;
    color: var(--white);
}

.tech-section .desc .p-sm {
    margin-bottom: 16px;
}

/* SHOW ON HOVER */
.tech-section .tech-card:hover .desc {
    max-height: 160px;
    opacity: 1;
    transform: translateY(0);
}

/* LINK */
.tech-section .desc a {
    display: inline-block;
    font-size: 12px;
    padding: 8px 16px;
    font-weight: 600;
}

/* NUMBER */
.tech-section .number {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--white);
}

.tech-section .tech-card:hover .number {
    display: none;
}

/* FOOTER */
.tech-section .footer-btn {
    text-align: center;
    margin-top: 40px;
}

.tech-section .footer-btn a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border: 1px solid #3b82f666;
    color: #93c5fd;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* HOVER FIX */
.tech-section .footer-btn a:hover {
    background: rgba(37, 99, 235, 0.10);
    border-color: #60a5fa;
    color: #bfdbfe;
}


/* =========================
   responsive
========================= */



@media (max-width: 1024px) {

    .tech-section .card-wrapper {
        flex-wrap: wrap;
        height: auto;
    }

    .tech-section .tech-card {
        flex: 1 1 calc(50% - 14px);
        height: 320px;
        min-height: 320px;
    }

    .tech-section .tech-card:hover {
        flex: 1 1 calc(50% - 14px);
        transform: none;
    }

    .tech-section .card-wrapper:hover .tech-card:not(:hover) .content h3 {
        transform: rotate(0deg);
        writing-mode: unset;
    }
}


@media (max-width: 767px) {


    .tech-section .card-wrapper {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 16px;
    }

    .tech-section .tech-card {
        width: 100%;
        height: 240px;
        min-height: 240px;
        flex: none;
    }

    /* disable hover expansion (mobile fix) */
    .tech-section .tech-card:hover {
        flex: none;
        transform: none;
    }

    /* make content always visible (important for mobile UX) */
    .tech-section .desc {
        max-height: 120px;
        opacity: 1;
        transform: none;
    }

    .tech-section .number {
        display: flex;
    }
}

@media (max-width: 567px) {

    .tech-section .tech-card {
        height: 220px;
    }
}