/* ── Portfolio Page Styles ── */

.port-main {
    padding-top: 110px;
    padding-bottom: 80px;
    min-height: 100vh;
}


.port-hero {
    text-align: center;
    padding: 0 8% 20px;
}

.port-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(89, 247, 228, 0.3);
    margin-bottom: 10px;
}

.port-sub {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Category Tabs (Cyan Boxes with Icons) ── */
.port-filters-wrap {
    padding: 0 6% 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.service-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.stab {
    position: relative;
    width: 140px;
    height: 100px;
    background: rgba(89, 247, 228, 0.05);
    border: 1px solid rgba(89, 247, 228, 0.2);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 15px;
}

.stab-img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.stab-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(89, 247, 228, 0.3));
}

.stab-text {
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0;
    /* Hidden by default */
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    bottom: 20px;
}

/* Hover Effect for Tabs */
.stab:hover .stab-img {
    transform: translateY(-15px) scale(0.8);
}

.stab:hover .stab-text {
    opacity: 1;
    transform: translateY(0);
}

.stab.active {
    background: rgba(89, 247, 228, 0.15);
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(89, 247, 228, 0.2);
}

.stab.active .stab-text {
    opacity: 1;
    transform: translateY(0);
}

.stab.active .stab-img {
    transform: translateY(-15px) scale(0.8);
}

/* ── Industry Pills (Ovals) ── */
.industry-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pill {
    min-height: 38px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid rgba(89, 247, 228, 0.2);
    background: rgba(5, 13, 31, 0.8);
    color: var(--muted);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pill:hover,
.pill.active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: #0d2549;
}

/* ── Category Rows (Slider) ── */
.port-sections {
    padding: 0 6%;
    display: flex;
    flex-direction: column;
    gap: 70px;
}

.category-row.hidden {
    display: none;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.category-header h2 {
    font-size: 1.8rem;
    color: var(--cyan);
    white-space: nowrap;
}

.header-line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--cyan), transparent);
    opacity: 0.2;
}

.carousel-controls {
    display: flex;
    gap: 10px;
}

.c-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(89, 247, 228, 0.3);
    background: rgba(89, 247, 228, 0.05);
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.c-btn:hover {
    background: var(--cyan);
    color: #050d1f;
}

.carousel-wrap {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.carousel-wrap::-webkit-scrollbar {
    display: none;
}

.category-grid {
    display: flex;
    gap: 25px;
    padding-bottom: 20px;
}

.port-card.hidden {
    display: none;
}

.port-card {
    flex: 0 0 280px;
    /* Square-friendly card width */
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.port-card:hover {
    transform: translateY(-8px);
    border-color: var(--cyan);
}

.port-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.port-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.port-card:hover .port-thumb img {
    transform: scale(1.1);
}

.port-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 13, 31, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.port-card:hover .port-overlay {
    opacity: 1;
}

.port-cta {
    background: var(--cyan);
    color: #050d1f;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.port-info {
    padding: 18px;
    border-top: 1px solid var(--line);
}

.port-info h3 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 4px;
}

.port-info span {
    font-size: 0.85rem;
    color: var(--muted);
}

.port-empty {
    text-align: center;
    padding: 100px 0;
    color: var(--muted);
}

/* ── Mobile Overrides ── */
@media (max-width: 768px) {
    .port-filters-wrap {
        padding: 0 0 30px; /* Remove horizontal padding from wrap to allow full-width scroll */
        gap: 15px;
        align-items: stretch; /* Allow children to take full width */
    }

    .service-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        padding: 0 6% 10px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .service-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .stab {
        flex: 0 0 auto; /* Prevent shrinking */
        width: 32px;
        height: 32px;
        padding: 4px;
        border-radius: 20%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stab-img {
        width: 22px;
        height: 22px;
        margin-bottom: 0;
    }

    .stab-text {
        display: none;
        /* Hide text on mobile for ultra-compact look */
    }

    .stab:hover .stab-img,
    .stab.active .stab-img {
        transform: scale(1.1);
    }

    .industry-pills {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding: 0 6% 5px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .industry-pills::-webkit-scrollbar {
        display: none;
    }

    .pill {
        min-height: 30px;
        padding: 0 14px;
        font-size: 0.78rem;
    }
}