/* Container wrappers */
.tech-page-wrapper {
    /* background-color: #fbfbfb; */
    padding-bottom: 50px;
}

.tech-nav-wrap {
    background-color: #f4f5f7;
    position: sticky;
    top: 56px;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Slight shadow to separate from content when sticking */
}

.tech-nav {
    display: block;
    white-space: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    /* scrollbar-width: none;
    -ms-overflow-style: none; */
    /* IE and Edge */
}

/* .tech-nav::-webkit-scrollbar {
    display: none;
} */

.tech-nav li {
    display: inline-block;
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 500;
    color: #4a4a4a;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    background: transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.tech-nav li:hover {
    color: #000;
}

.tech-nav li.active {
    border-bottom-color: #000;
    color: #000;
    font-weight: 600;
    background: #fbfbfb;
    /* Match page background so it flows down */
}

.tech-category-section {
    padding-top: 50px;
    scroll-margin-top: 150px;
    /* Offset for better scroll viewing */
}

.tech-cat-title {
    font-size: 32px;
    font-weight: 600;
    color: #111;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #111;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 15px;
}

.tech-card {
    background-color: transparent;
    border-radius: 0;
}

.tech-card.tech-full {
    width: 100%;
}

.tech-card.tech-half {
    width: calc(50% - 15px);
    height: max-content;
}

.tech-half {
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.tech-img {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Hover effect zoom image */
.tech-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tech-card:hover .tech-img img {
    transform: scale(1.05);
    /* Gentle smooth zoom */
}

/* Base aspect ratios */
.tech-full .tech-img img {
    aspect-ratio: 2.5 / 1;
}

.tech-half .tech-img img {
    aspect-ratio: 16 / 9;
}

.tech-info {
    padding: 20px 0;
}

.tech-info h3 {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.tech-info p {
    font-size: 18px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* Accordion meta styles for half card */
.tech-meta {
    padding: 0;
    background: #fff;
    padding: 0 20px;
    /* To match image width slightly and give inner padding */
    margin-top: -5px;
    /* Pull it slightly to connect if background differs, else 0 */
}

.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    cursor: pointer;
    /* border-bottom: 1px solid #e5e5e5; */
    transition: border-color 0.3s ease;
}

.tech-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.tech-half:hover .tech-header h3 {
    color: #000;
}

.tech-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #666;
}

.tech-half.is-open .tech-toggle {
    transform: rotate(180deg);
}

.tech-half.is-open .tech-header {
    border-bottom-color: transparent;
}

/* Grid based accordion animation */
.tech-desc {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease-out;
}

.tech-desc-inner {
    overflow: hidden;
}

.tech-desc-inner p {
    margin: 0;
    padding-bottom: 20px;
    font-size: 16px;
    line-height: 1.65;
    color: #555;
}

.tech-half.is-open .tech-desc {
    grid-template-rows: 1fr;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .tech-card.tech-half {
        width: 100%;
        margin-bottom: 15px;
    }

    .tech-cat-title {
        font-size: 26px;
    }

    .tech-nav li {
        padding: 15px 20px;
        font-size: 14px;
    }

    .tech-full .tech-img img {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 767px) {
    .tech-page-wrapper {
        padding-bottom: 20px;
    }

    .tech-cat-title {
        font-size: 22px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .tech-grid {
        gap: 10px;
    }

    .tech-category-section {
        padding-top: 30px;
    }

    .tech-info h3 {
        font-size: 18px;
    }

    .tech-info p {
        font-size: 16px;
    }

    .tech-header h3 {
        font-size: 17px;
    }

    .tech-desc-inner p {
        font-size: 14px;
    }
}