﻿/* =========================================================
   Portfolio Index
   مسیر: wwwroot/TS/css/portfolio.css
========================================================= */

:root {
    --portfolio-accent: #1b3560;
    --portfolio-dark: #20202a;
    --portfolio-text: #6f6f7b;
    --portfolio-bg: #f5f5f7;
    --portfolio-border: rgba(15, 23, 42, 0.08);
    --portfolio-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.portfolio-index-page {
    background: var(--portfolio-bg);
}

.portfolio-index {
    direction: rtl;
}

    .portfolio-index *,
    .portfolio-index *::before,
    .portfolio-index *::after {
        box-sizing: border-box;
    }

    .portfolio-index a {
        text-decoration: none;
    }

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* =========================================================
   Main Section
========================================================= */

.portfolio-index-section {
    background: var(--portfolio-bg);
    padding-top: 34px !important;
    padding-bottom: 90px !important;
}

/* حذف breadcrumb قدیمی اگر از Layout یا CSS قبلی باقی مانده باشد */
.portfolio-index .site-breadcrumb {
    display: none !important;
}

/* =========================================================
   Cards Desktop
========================================================= */

.portfolio-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--portfolio-shadow);
    overflow: hidden;
    border: 1px solid var(--portfolio-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

    .portfolio-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
    }

.portfolio-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #eeeeee;
}

    .portfolio-cover img {
        width: 100%;
        height: 240px;
        object-fit: cover;
        transition: all 0.35s ease-in-out;
        display: block;
    }

.portfolio-card:hover .portfolio-cover img {
    transform: scale(1.05);
}

.portfolio-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #fff;
    color: var(--portfolio-accent);
    border: 1px solid rgba(239, 80, 70, 0.18);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.portfolio-body {
    padding: 18px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.portfolio-title {
    font-size: 18px;
    line-height: 1.8;
    font-weight: 950;
    margin: 0;
    color: var(--portfolio-dark);
}

    .portfolio-title a {
        color: var(--portfolio-dark);
        text-decoration: none;
        transition: all 0.2s ease-in-out;
    }

        .portfolio-title a:hover {
            color: var(--portfolio-accent);
        }

.portfolio-desc {
    color: var(--portfolio-text);
    margin: 0;
    font-size: 14px;
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 84px;
}

.portfolio-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(245 245 247);
    border: 1px solid rgb(34 65 115);
    color: var(--portfolio-accent);
    flex: 0 0 auto;
}

.project-chip {
    border: 1px solid rgb(27 53 96);
    padding: 5px 13px;
    border-radius: 999px;
    display: inline-block;
    transition: all 0.2s ease-in-out;
    color: var(--portfolio-accent);
    background: #f5f5f7;
    font-size: 13px;
    font-weight: 850;
    max-width: 100%;
}

    .project-chip:hover {
        background: var(--portfolio-accent);
        color: #fff;
    }

.portfolio-action-row {
    margin-top: auto !important;
}

.portfolio-detail-btn {
    min-height: 46px;
    border-radius: 16px;
    font-weight: 950;
}

.portfolio-site-btn {
    width: 56px;
    min-width: 56px;
    padding-left: 0;
    padding-right: 0;
    border-radius: 16px;
}

/* =========================================================
   Tablet
========================================================= */

@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    body.portfolio-index-page {
        padding-bottom: 94px;
        background: #f5f5f7;
    }

        /* حذف هدر، فوتر، دارک مود، رد کارت و منوی اضافه در موبایل */
        body.portfolio-index-page #siteHeader,
        body.portfolio-index-page #siteFooter,
        body.portfolio-index-page footer,
        body.portfolio-index-page #darkModeToggle,
        body.portfolio-index-page .dark-mode-toggle,
        body.portfolio-index-page #redFloatingCard,
        body.portfolio-index-page .redFloatingCard {
            display: none !important;
        }

        /* کوچک‌تر شدن Floating Button */
        body.portfolio-index-page #floatBtn {
            width: 38px;
            height: 38px;
            min-width: 38px;
            min-height: 38px;
            font-size: 0.82rem;
            bottom: 92px;
            right: 14px;
            z-index: 1035;
        }

        body.portfolio-index-page .float-contact {
            bottom: 92px;
            border-radius: 16px;
        }

    .portfolio-index-section {
        padding-top: 86px !important;
        padding-bottom: 98px !important;
    }

    /* Breadcrumb + View Toggle ثابت بالای موبایل */
    .portfolio-mobile-top-sticky {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1050;
        background: rgba(245, 245, 247, 0.98);
        backdrop-filter: blur(12px);
        padding: 10px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    }

    .portfolio-mobile-top-row {
        width: 100%;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        direction: rtl;
    }

    .portfolio-mobile-breadcrumb {
        flex: 1;
        min-width: 0;
        height: 48px;
        background: #fff;
        border: 1px solid #eeeeee;
        border-radius: 16px;
        padding: 0 12px;
        display: flex !important;
        align-items: center;
        gap: 7px;
        color: #777;
        font-size: 0.78rem;
        font-weight: 800;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
        overflow: hidden;
        white-space: nowrap;
    }

        .portfolio-mobile-breadcrumb a {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: #555;
            text-decoration: none;
            flex: 0 0 auto;
        }

        .portfolio-mobile-breadcrumb span:last-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .portfolio-mobile-breadcrumb i {
            color: #224173;
            font-size: 0.86rem;
        }

    .portfolio-mobile-view-toggle {
        flex: 0 0 auto;
        height: 48px;
        display: flex !important;
        align-items: center;
        gap: 5px;
        background: #fff;
        border-radius: 16px;
        padding: 5px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .portfolio-view-mode-btn {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: #777;
        font-family: inherit;
        cursor: pointer;
    }

        .portfolio-view-mode-btn.active {
            background: #1b3560;
            color: #fff;
        }

    .portfolio-cover img {
        height: 220px;
    }

    .portfolio-desc {
        min-height: 64px;
        -webkit-line-clamp: 2;
    }

    /* Bottom Menu مثل Blog، فقط خانه و تماس */
    .portfolio-mobile-bottom-bar {
        position: fixed;
        right: 12px;
        left: 12px;
        bottom: 12px;
        height: 66px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 24px;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
        backdrop-filter: blur(12px);
        z-index: 1040;
        padding: 8px;
        display: grid !important;
        grid-template-columns: 1fr 1.25fr;
        gap: 8px;
        direction: rtl;
    }

    .portfolio-bottom-item {
        border: none;
        background: transparent;
        color: #555;
        border-radius: 18px;
        font-family: inherit;
        font-size: 0.74rem;
        font-weight: 800;
        text-decoration: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        transition: all 0.2s ease;
    }

        .portfolio-bottom-item:hover,
        .portfolio-bottom-item:focus {
            text-decoration: none;
            color: #1b3560;
        }

        .portfolio-bottom-item.active {
            background: #f5f5f7;
            color: #1b3560;
        }

    .portfolio-bottom-icon {
        width: 28px;
        height: 28px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
    }

    .portfolio-bottom-item.active .portfolio-bottom-icon {
        background: #1b3560;
        color: #fff;
        box-shadow: 0 6px 16px rgba(239, 80, 70, 0.28);
    }

    .portfolio-call-bottom-btn {
        background: linear-gradient(135deg, #16a34a, #22c55e);
        color: #fff !important;
        box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
        flex-direction: row;
        gap: 8px;
        font-size: 0.82rem;
    }

        .portfolio-call-bottom-btn:hover,
        .portfolio-call-bottom-btn:focus {
            color: #fff !important;
            transform: translateY(-1px);
        }

    .portfolio-call-icon {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.22);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.88rem;
    }
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 767px) {
    .portfolio-index-section {
        padding-top: 84px !important;
        padding-bottom: 96px !important;
    }

    .portfolio-grid-row {
        --bs-gutter-y: 14px;
    }

    .portfolio-card {
        border-radius: 22px;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    }

        .portfolio-card:hover {
            transform: none;
            box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
        }

    .portfolio-mobile-list-view .portfolio-card {
        display: grid;
        grid-template-columns: 122px minmax(0, 1fr);
        min-height: 138px;
    }

    .portfolio-mobile-list-view .portfolio-cover {
        height: 100%;
        min-height: 138px;
        border-radius: 0;
    }

        .portfolio-mobile-list-view .portfolio-cover img {
            height: 100%;
            min-height: 138px;
        }

    .portfolio-mobile-list-view .portfolio-card:hover .portfolio-cover img {
        transform: none;
    }

    .portfolio-mobile-list-view .portfolio-badge {
        top: 9px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.13);
    }

    .portfolio-mobile-list-view .portfolio-body {
        padding: 11px 12px;
        min-width: 0;
    }

    .portfolio-mobile-list-view .portfolio-title-row {
        display: block !important;
    }

    .portfolio-mobile-list-view .portfolio-title {
        font-size: 14px;
        line-height: 1.65;
        margin-bottom: 4px;
    }

    .portfolio-mobile-list-view .portfolio-desc {
        font-size: 12px;
        line-height: 1.8;
        min-height: auto;
        height: 42px;
        -webkit-line-clamp: 2;
    }

    .portfolio-mobile-list-view .portfolio-chip-list {
        margin-top: 8px !important;
        gap: 5px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

        .portfolio-mobile-list-view .portfolio-chip-list::-webkit-scrollbar {
            display: none;
        }

    .portfolio-mobile-list-view .project-chip {
        flex: 0 0 auto;
        padding: 3px 8px;
        font-size: 10.5px;
        border-radius: 999px;
        white-space: nowrap;
    }

    .portfolio-mobile-list-view .portfolio-action-row {
        margin-top: 9px !important;
        gap: 6px !important;
    }

    .portfolio-mobile-list-view .portfolio-detail-btn {
        min-height: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 11.5px;
        padding: 0 8px;
    }

        .portfolio-mobile-list-view .portfolio-detail-btn i {
            font-size: 11px;
            margin-right: 5px !important;
        }

    .portfolio-mobile-list-view .portfolio-site-btn {
        width: 36px;
        min-width: 36px;
        height: 34px;
        min-height: 34px;
        border-radius: 12px;
        font-size: 12px;
    }

    /* حالت گرید موبایل */
    .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-cover img {
        height: 190px;
    }

    .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-body {
        padding: 14px;
    }

    .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-title {
        font-size: 15px;
    }

    .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-desc {
        font-size: 12.5px;
        min-height: 46px;
        -webkit-line-clamp: 2;
    }
}

/* =========================================================
   Small Mobile
========================================================= */

@media (max-width: 420px) {
    .portfolio-mobile-breadcrumb {
        height: 46px;
        font-size: 0.74rem;
        padding: 0 10px;
    }

    .portfolio-mobile-view-toggle {
        height: 46px;
    }

    .portfolio-view-mode-btn {
        width: 34px;
        height: 34px;
    }

    .portfolio-mobile-list-view .portfolio-card {
        grid-template-columns: 108px minmax(0, 1fr);
        min-height: 132px;
    }

    .portfolio-mobile-list-view .portfolio-cover {
        min-height: 132px;
    }

        .portfolio-mobile-list-view .portfolio-cover img {
            min-height: 132px;
        }

    .portfolio-mobile-list-view .portfolio-body {
        padding: 10px;
    }

    .portfolio-mobile-list-view .portfolio-title {
        font-size: 13.5px;
    }

    .portfolio-mobile-list-view .portfolio-desc {
        height: 39px;
    }

    .portfolio-mobile-bottom-bar {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
}

/* =========================================================
   Portfolio Index With Global Mobile Topbar
========================================================= */

@media (max-width: 991px) {
    body.portfolio-index-page .portfolio-index-section {
        padding-top: 74px !important;
    }

    body.portfolio-index-page .portfolio-mobile-tools-sticky {
        position: fixed;
        top: 58px;
        right: 10px;
        left: 10px;
        z-index: 1045;
        display: flex !important;
        justify-content: flex-end;
        pointer-events: none;
    }

    body.portfolio-index-page .portfolio-mobile-view-toggle {
        pointer-events: auto;
        height: 42px;
        padding: 4px;
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(34, 65, 115, 0.09);
        box-shadow: 0 10px 24px rgba(34, 65, 115, 0.07);
        backdrop-filter: blur(12px);
    }

    body.portfolio-index-page .portfolio-view-mode-btn {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

        body.portfolio-index-page .portfolio-view-mode-btn.active {
            background: linear-gradient(135deg, #224173, #1b3560) !important;
            color: #fff !important;
            box-shadow: 0 7px 16px rgba(34, 65, 115, 0.22);
        }

    body.portfolio-index-page .portfolio-badge,
    body.portfolio-index-page .project-chip:hover {
        background: linear-gradient(135deg, #224173, #1b3560) !important;
        color: #fff !important;
        border-color: #224173 !important;
    }

    body.portfolio-index-page .portfolio-title a:hover,
    body.portfolio-index-page .portfolio-icon,
    body.portfolio-index-page .project-chip,
    body.portfolio-index-page .portfolio-bottom-item.active {
        color: #224173 !important;
    }

    body.portfolio-index-page .portfolio-icon,
    body.portfolio-index-page .project-chip,
    body.portfolio-index-page .portfolio-bottom-item.active {
        background: rgba(34, 65, 115, 0.08) !important;
        border-color: rgba(34, 65, 115, 0.14) !important;
    }

        body.portfolio-index-page .portfolio-bottom-item.active .portfolio-bottom-icon,
        body.portfolio-index-page .portfolio-call-bottom-btn {
            background: linear-gradient(135deg, #224173, #1b3560) !important;
            color: #fff !important;
            box-shadow: 0 8px 20px rgba(34, 65, 115, 0.32) !important;
        }
}

/*new style*/
/* =========================================================
   Portfolio Index Redesign - Append Override
========================================================= */

.portfolio-redesign {
    --portfolio-accent: #1b3560;
    --portfolio-accent-2: #224173;
    --portfolio-soft: #eef3fb;
    --portfolio-dark: #162033;
    --portfolio-text: #667085;
    --portfolio-bg: #f6f8fb;
    --portfolio-border: rgba(27, 53, 96, 0.10);
    --portfolio-shadow: 0 22px 55px rgba(16, 24, 40, 0.09);
    background: var(--portfolio-bg);
}

body.portfolio-index-page {
    background: var(--portfolio-bg);
}

.portfolio-redesign .portfolio-index-section {
    background: radial-gradient(circle at top right, rgba(34, 65, 115, 0.08), transparent 34%), linear-gradient(180deg, #f7f9fc 0%, #ffffff 45%, #f6f8fb 100%);
    padding-top: 38px !important;
    padding-bottom: 110px !important;
}

/* Hero Desktop */

.portfolio-redesign .portfolio-hero {
    padding: 38px 0 8px;
    background: var(--portfolio-bg);
}

.portfolio-redesign .portfolio-hero-box {
    position: relative;
    overflow: hidden;
    min-height: 295px;
    border-radius: 34px;
    border: 1px solid rgba(27, 53, 96, 0.10);
    background: linear-gradient(135deg, rgba(27, 53, 96, 0.96), rgba(34, 65, 115, 0.88)), radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.35), transparent 28%);
    box-shadow: 0 26px 70px rgba(27, 53, 96, 0.18);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 0.75fr;
    align-items: center;
    gap: 26px;
    padding: 42px;
}

    .portfolio-redesign .portfolio-hero-box::before {
        content: "";
        position: absolute;
        width: 390px;
        height: 390px;
        left: -115px;
        top: -130px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.09);
    }

    .portfolio-redesign .portfolio-hero-box::after {
        content: "";
        position: absolute;
        width: 230px;
        height: 230px;
        right: 45%;
        bottom: -135px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.075);
    }

.portfolio-redesign .portfolio-hero-content,
.portfolio-redesign .portfolio-hero-visual {
    position: relative;
    z-index: 2;
}

.portfolio-redesign .portfolio-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 18px;
}

.portfolio-redesign .portfolio-hero h1 {
    color: #fff;
    font-size: 35px;
    line-height: 1.65;
    font-weight: 950;
    margin: 0 0 12px;
    max-width: 760px;
}

.portfolio-redesign .portfolio-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 2.1;
    margin: 0;
    max-width: 690px;
}

.portfolio-redesign .portfolio-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

    .portfolio-redesign .portfolio-hero-stats div {
        min-width: 138px;
        padding: 13px 16px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.14);
        backdrop-filter: blur(10px);
    }

    .portfolio-redesign .portfolio-hero-stats strong {
        display: block;
        color: #fff;
        font-size: 25px;
        font-weight: 950;
        line-height: 1.1;
    }

    .portfolio-redesign .portfolio-hero-stats span {
        display: block;
        color: rgba(255, 255, 255, 0.75);
        font-size: 12px;
        font-weight: 800;
        margin-top: 7px;
    }

.portfolio-redesign .portfolio-hero-visual {
    min-height: 230px;
}

.portfolio-redesign .portfolio-hero-circle {
    position: absolute;
    left: 32px;
    top: 18px;
    width: 178px;
    height: 178px;
    border-radius: 50%;
    border: 34px solid rgba(255, 255, 255, 0.12);
}

.portfolio-redesign .portfolio-hero-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 185px;
    padding: 18px 20px;
    border-radius: 26px;
    color: #1b3560;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    font-weight: 950;
}

    .portfolio-redesign .portfolio-hero-card i {
        width: 42px;
        height: 42px;
        border-radius: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eef3fb;
        color: #224173;
    }

.portfolio-redesign .portfolio-hero-card-main {
    top: 36px;
    right: 34px;
}

.portfolio-redesign .portfolio-hero-card-second {
    left: 26px;
    bottom: 42px;
}

/* Desktop Head */

.portfolio-redesign .portfolio-desktop-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

.portfolio-redesign .portfolio-section-label {
    display: inline-block;
    color: #224173;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.portfolio-redesign .portfolio-desktop-head h2 {
    color: #162033;
    font-size: 25px;
    font-weight: 950;
    margin: 0;
}

.portfolio-redesign .portfolio-category-pills {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

    .portfolio-redesign .portfolio-category-pills span {
        height: 38px;
        display: inline-flex;
        align-items: center;
        padding: 0 15px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid rgba(27, 53, 96, 0.10);
        color: #667085;
        font-size: 13px;
        font-weight: 850;
    }

        .portfolio-redesign .portfolio-category-pills span.active {
            background: #1b3560;
            border-color: #1b3560;
            color: #fff;
        }

/* Cards */

.portfolio-redesign .portfolio-card {
    position: relative;
    border: 1px solid rgba(27, 53, 96, 0.10);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 46px rgba(16, 24, 40, 0.08);
    overflow: hidden;
    isolation: isolate;
}

    .portfolio-redesign .portfolio-card::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        background: linear-gradient(145deg, rgba(34, 65, 115, 0.10), transparent 38%);
        opacity: 0;
        transition: opacity 0.25s ease;
        z-index: 1;
    }

    .portfolio-redesign .portfolio-card:hover {
        transform: translateY(-7px);
        box-shadow: 0 28px 70px rgba(16, 24, 40, 0.14);
    }

        .portfolio-redesign .portfolio-card:hover::before {
            opacity: 1;
        }

.portfolio-redesign .portfolio-cover {
    height: 238px;
    border-radius: 0 0 28px 28px;
    background: #e9eef7;
}

    .portfolio-redesign .portfolio-cover img {
        height: 100%;
        object-fit: cover;
    }

.portfolio-redesign .portfolio-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 32, 51, 0.02), rgba(22, 32, 51, 0.42));
    opacity: 0.9;
}

.portfolio-redesign .portfolio-badge {
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 32px);
    background: rgba(255, 255, 255, 0.94);
    color: #1b3560;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.portfolio-redesign .portfolio-card-arrow {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1b3560;
    color: #fff;
    box-shadow: 0 14px 30px rgba(27, 53, 96, 0.26);
    transform: translateX(-8px);
    opacity: 0;
    transition: all 0.25s ease;
}

.portfolio-redesign .portfolio-card:hover .portfolio-card-arrow {
    transform: translateX(0);
    opacity: 1;
}

.portfolio-redesign .portfolio-body {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.portfolio-redesign .portfolio-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.portfolio-redesign .portfolio-title-wrap {
    min-width: 0;
}

.portfolio-redesign .portfolio-card-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1b3560;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.portfolio-redesign .portfolio-title {
    font-size: 18px;
    line-height: 1.75;
    font-weight: 950;
}

    .portfolio-redesign .portfolio-title a {
        color: #162033;
    }

        .portfolio-redesign .portfolio-title a:hover {
            color: #224173;
        }

.portfolio-redesign .portfolio-icon {
    background: #eef3fb;
    border-color: rgba(34, 65, 115, 0.12);
    color: #224173;
}

.portfolio-redesign .portfolio-desc {
    margin-top: 10px;
    color: #667085;
    font-size: 13.5px;
    line-height: 2.05;
    min-height: 84px;
}

.portfolio-redesign .portfolio-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.portfolio-redesign .project-chip {
    background: #f3f6fb;
    border-color: rgba(34, 65, 115, 0.12);
    color: #224173;
    font-size: 12px;
    font-weight: 850;
    padding: 5px 11px;
}

    .portfolio-redesign .project-chip:hover {
        background: #1b3560;
        border-color: #1b3560;
        color: #fff;
    }

.portfolio-redesign .portfolio-action-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px !important;
}

    .portfolio-redesign .portfolio-action-row hr {
        display: none;
    }

.portfolio-redesign .portfolio-detail-btn {
    flex: 1 1 auto;
    min-height: 48px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 950;
}

.portfolio-redesign .portfolio-site-btn {
    width: 50px;
    min-width: 50px;
    height: 48px;
    min-height: 48px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Empty */

.portfolio-redesign .portfolio-empty-state {
    max-width: 560px;
    margin: 35px auto;
    padding: 44px 26px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid rgba(27, 53, 96, 0.10);
    box-shadow: 0 20px 55px rgba(16, 24, 40, 0.08);
    text-align: center;
}

.portfolio-redesign .portfolio-empty-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef3fb;
    color: #224173;
    font-size: 28px;
}

.portfolio-redesign .portfolio-empty-state h2 {
    font-size: 21px;
    font-weight: 950;
    color: #162033;
    margin: 0 0 10px;
}

.portfolio-redesign .portfolio-empty-state p {
    color: #667085;
    line-height: 2;
    margin: 0;
}

/* Mobile Content Only - top/bottom menu untouched */

@media (max-width: 991px) {
    .portfolio-redesign .portfolio-index-section {
        padding-top: 86px !important;
        padding-bottom: 104px !important;
    }

    .portfolio-redesign .portfolio-card:hover {
        transform: none;
    }

    .portfolio-redesign .portfolio-card-arrow {
        display: none;
    }

    .portfolio-redesign .portfolio-badge {
        font-size: 10.5px;
        padding: 5px 9px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 767px) {
    .portfolio-redesign .portfolio-grid-row {
        --bs-gutter-y: 14px;
    }

    .portfolio-redesign .portfolio-card {
        border-radius: 22px;
        box-shadow: 0 12px 30px rgba(16, 24, 40, 0.075);
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        min-height: 142px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-cover {
        height: 100%;
        min-height: 142px;
        border-radius: 0;
    }

        .portfolio-redesign .portfolio-mobile-list-view .portfolio-cover img {
            height: 100%;
            min-height: 142px;
        }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-body {
        padding: 11px 12px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-title-row {
        display: block;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-card-eyebrow {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-title {
        font-size: 13.5px;
        line-height: 1.7;
        margin: 0;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-desc {
        height: 41px;
        min-height: auto;
        margin-top: 4px;
        font-size: 11.5px;
        line-height: 1.8;
        -webkit-line-clamp: 2;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-chip-list {
        margin-top: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

        .portfolio-redesign .portfolio-mobile-list-view .portfolio-chip-list::-webkit-scrollbar {
            display: none;
        }

    .portfolio-redesign .portfolio-mobile-list-view .project-chip {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 10px;
        padding: 3px 8px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-action-row {
        margin-top: 8px !important;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-detail-btn {
        min-height: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 11px;
        padding: 0 9px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-site-btn {
        width: 36px;
        min-width: 36px;
        height: 34px;
        min-height: 34px;
        border-radius: 12px;
    }

    .portfolio-redesign .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-cover {
        height: 188px;
    }

        .portfolio-redesign .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-cover img {
            height: 100%;
        }

    .portfolio-redesign .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-body {
        padding: 15px;
    }

    .portfolio-redesign .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-title {
        font-size: 15px;
    }

    .portfolio-redesign .portfolio-grid-row:not(.portfolio-mobile-list-view) .portfolio-desc {
        min-height: 45px;
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 420px) {
    .portfolio-redesign .portfolio-mobile-list-view .portfolio-card {
        grid-template-columns: 106px minmax(0, 1fr);
        min-height: 136px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-cover,
    .portfolio-redesign .portfolio-mobile-list-view .portfolio-cover img {
        min-height: 136px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-body {
        padding: 10px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-title {
        font-size: 13px;
    }

    .portfolio-redesign .portfolio-mobile-list-view .portfolio-desc {
        height: 38px;
    }
}



/* =========================================================
   Portfolio Index Mobile Font Scale
   هماهنگ با فونت‌های مودال محصولات
========================================================= */

@media (max-width: 991px) {

    body.portfolio-index-page {
        font-size: 14px !important;
    }

        /* Top Breadcrumb / Toggle */
        body.portfolio-index-page .portfolio-mobile-breadcrumb {
            font-size: 0.78rem !important;
            font-weight: 800 !important;
        }

            body.portfolio-index-page .portfolio-mobile-breadcrumb i {
                font-size: 0.86rem !important;
            }

        body.portfolio-index-page .portfolio-view-mode-btn {
            font-size: 0.82rem !important;
        }

        /* Badge / Category */
        body.portfolio-index-page .portfolio-badge,
        body.portfolio-index-page .portfolio-redesign .portfolio-badge {
            font-size: 0.72rem !important;
            font-weight: 800 !important;
        }

        /* Card Title */
        body.portfolio-index-page .portfolio-title,
        body.portfolio-index-page .portfolio-redesign .portfolio-title {
            font-size: 0.88rem !important;
            line-height: 1.75 !important;
            font-weight: 900 !important;
        }

            body.portfolio-index-page .portfolio-title a {
                font-size: inherit !important;
            }

        /* Eyebrow / Small Label */
        body.portfolio-index-page .portfolio-card-eyebrow,
        body.portfolio-index-page .portfolio-redesign .portfolio-card-eyebrow {
            font-size: 0.72rem !important;
            font-weight: 800 !important;
        }

        /* Description */
        body.portfolio-index-page .portfolio-desc,
        body.portfolio-index-page .portfolio-redesign .portfolio-desc {
            font-size: 0.78rem !important;
            line-height: 1.9 !important;
        }

        /* Chips */
        body.portfolio-index-page .project-chip,
        body.portfolio-index-page .portfolio-redesign .project-chip {
            font-size: 0.72rem !important;
            font-weight: 800 !important;
        }

        /* Icons */
        body.portfolio-index-page .portfolio-icon {
            font-size: 0.88rem !important;
        }

        /* Action Buttons */
        body.portfolio-index-page .portfolio-detail-btn,
        body.portfolio-index-page .portfolio-redesign .portfolio-detail-btn {
            font-size: 0.78rem !important;
            font-weight: 900 !important;
        }

        body.portfolio-index-page .portfolio-site-btn,
        body.portfolio-index-page .portfolio-redesign .portfolio-site-btn {
            font-size: 0.82rem !important;
        }

        /* Empty State */
        body.portfolio-index-page .portfolio-empty-state h2,
        body.portfolio-index-page .portfolio-redesign .portfolio-empty-state h2 {
            font-size: 1rem !important;
            font-weight: 900 !important;
        }

        body.portfolio-index-page .portfolio-empty-state p,
        body.portfolio-index-page .portfolio-redesign .portfolio-empty-state p {
            font-size: 0.82rem !important;
            line-height: 2 !important;
        }

        body.portfolio-index-page .portfolio-empty-icon {
            font-size: 1.6rem !important;
        }

        /* Bottom Bar */
        body.portfolio-index-page .portfolio-bottom-item {
            font-size: 0.74rem !important;
            font-weight: 800 !important;
        }

        body.portfolio-index-page .portfolio-call-bottom-btn {
            font-size: 0.82rem !important;
            font-weight: 900 !important;
        }

        body.portfolio-index-page .portfolio-bottom-icon,
        body.portfolio-index-page .portfolio-call-icon {
            font-size: 0.88rem !important;
        }
}

/* موبایل‌های متوسط */
@media (max-width: 767px) {

    body.portfolio-index-page .portfolio-title,
    body.portfolio-index-page .portfolio-redesign .portfolio-title {
        font-size: 0.86rem !important;
    }

    body.portfolio-index-page .portfolio-desc,
    body.portfolio-index-page .portfolio-redesign .portfolio-desc {
        font-size: 0.76rem !important;
        line-height: 1.85 !important;
    }

    body.portfolio-index-page .portfolio-detail-btn,
    body.portfolio-index-page .portfolio-redesign .portfolio-detail-btn {
        font-size: 0.76rem !important;
    }

    body.portfolio-index-page .portfolio-site-btn,
    body.portfolio-index-page .portfolio-redesign .portfolio-site-btn {
        font-size: 0.78rem !important;
    }

    body.portfolio-index-page .portfolio-mobile-list-view .portfolio-title,
    body.portfolio-index-page .portfolio-redesign .portfolio-mobile-list-view .portfolio-title {
        font-size: 0.82rem !important;
        line-height: 1.7 !important;
    }

    body.portfolio-index-page .portfolio-mobile-list-view .portfolio-desc,
    body.portfolio-index-page .portfolio-redesign .portfolio-mobile-list-view .portfolio-desc {
        font-size: 0.74rem !important;
        line-height: 1.8 !important;
    }

    body.portfolio-index-page .portfolio-mobile-list-view .project-chip,
    body.portfolio-index-page .portfolio-redesign .portfolio-mobile-list-view .project-chip {
        font-size: 0.7rem !important;
    }

    body.portfolio-index-page .portfolio-mobile-list-view .portfolio-detail-btn,
    body.portfolio-index-page .portfolio-redesign .portfolio-mobile-list-view .portfolio-detail-btn {
        font-size: 0.72rem !important;
    }
}

/* موبایل‌های کوچک */
@media (max-width: 420px) {

    body.portfolio-index-page .portfolio-mobile-breadcrumb {
        font-size: 0.72rem !important;
    }

    body.portfolio-index-page .portfolio-view-mode-btn {
        font-size: 0.78rem !important;
    }

    body.portfolio-index-page .portfolio-title,
    body.portfolio-index-page .portfolio-redesign .portfolio-title {
        font-size: 0.8rem !important;
        line-height: 1.7 !important;
    }

    body.portfolio-index-page .portfolio-desc,
    body.portfolio-index-page .portfolio-redesign .portfolio-desc {
        font-size: 0.72rem !important;
        line-height: 1.75 !important;
    }

    body.portfolio-index-page .portfolio-card-eyebrow,
    body.portfolio-index-page .portfolio-redesign .portfolio-card-eyebrow {
        font-size: 0.68rem !important;
    }

    body.portfolio-index-page .portfolio-badge,
    body.portfolio-index-page .portfolio-redesign .portfolio-badge,
    body.portfolio-index-page .project-chip,
    body.portfolio-index-page .portfolio-redesign .project-chip {
        font-size: 0.68rem !important;
    }

    body.portfolio-index-page .portfolio-detail-btn,
    body.portfolio-index-page .portfolio-redesign .portfolio-detail-btn {
        font-size: 0.7rem !important;
    }

    body.portfolio-index-page .portfolio-bottom-item {
        font-size: 0.72rem !important;
    }

    body.portfolio-index-page .portfolio-call-bottom-btn {
        font-size: 0.78rem !important;
    }

    body.portfolio-index-page .portfolio-bottom-icon,
    body.portfolio-index-page .portfolio-call-icon {
        font-size: 0.78rem !important;
    }
}

/* =========================================================
   Portfolio Index - Desktop 2 Columns + Filters + Mobile Sheet
   Append this block at the END of: wwwroot/TS/css/portfolio.css
========================================================= */

.portfolio-redesign .portfolio-desktop-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 72%;
}

.portfolio-redesign .portfolio-category-pills {
    gap: 8px;
}

    .portfolio-redesign .portfolio-category-pills button,
    .portfolio-redesign .portfolio-filter-btn {
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 15px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid rgba(27, 53, 96, 0.10);
        color: #667085;
        font-family: inherit;
        font-size: 13px;
        font-weight: 850;
        cursor: pointer;
        transition: all 0.22s ease;
    }

        .portfolio-redesign .portfolio-category-pills button:hover,
        .portfolio-redesign .portfolio-filter-btn:hover,
        .portfolio-redesign .portfolio-filter-btn.active {
            background: #1b3560;
            border-color: #1b3560;
            color: #fff;
            box-shadow: 0 10px 24px rgba(27, 53, 96, 0.18);
        }

.portfolio-redesign .portfolio-desktop-view-toggle {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid rgba(27, 53, 96, 0.10);
    border-radius: 16px;
    padding: 5px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
}

.portfolio-redesign .portfolio-desktop-mode-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #667085;
}

    .portfolio-redesign .portfolio-desktop-mode-btn.active {
        background: linear-gradient(135deg, #224173, #1b3560) !important;
        color: #fff !important;
        box-shadow: 0 7px 16px rgba(34, 65, 115, 0.22);
    }

.portfolio-filter-hidden {
    display: none !important;
}

.portfolio-redesign .portfolio-no-filter-result {
    max-width: 560px;
    margin: 35px auto;
    padding: 44px 26px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid rgba(27, 53, 96, 0.10);
    box-shadow: 0 20px 55px rgba(16, 24, 40, 0.08);
    text-align: center;
}

    .portfolio-redesign .portfolio-no-filter-result h2 {
        font-size: 21px;
        font-weight: 950;
        color: #162033;
        margin: 0 0 10px;
    }

    .portfolio-redesign .portfolio-no-filter-result p {
        color: #667085;
        line-height: 2;
        margin: 0;
    }

@media (min-width: 992px) {
    .portfolio-redesign .portfolio-grid-row > .portfolio-grid-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view > .portfolio-grid-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view .portfolio-card {
        display: grid;
        grid-template-columns: 360px minmax(0, 1fr);
        min-height: 255px;
    }

    .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view .portfolio-cover {
        height: 100%;
        min-height: 255px;
        border-radius: 0;
    }

        .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view .portfolio-cover img {
            height: 100%;
        }

    .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view .portfolio-body {
        padding: 24px;
    }

    .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view .portfolio-desc {
        min-height: 0;
        -webkit-line-clamp: 4;
    }

    .portfolio-redesign .portfolio-grid-row.portfolio-desktop-list-view .portfolio-card-arrow {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .portfolio-redesign .portfolio-desktop-tools {
        max-width: 100%;
    }

    .portfolio-redesign .portfolio-desktop-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 991px) {
    body.portfolio-index-page .portfolio-mobile-top-row {
        align-items: center;
    }

    body.portfolio-index-page .portfolio-mobile-filter-trigger {
        flex: 0 0 auto;
        height: 48px;
        border: 0;
        border-radius: 16px;
        background: linear-gradient(135deg, #224173, #1b3560);
        color: #fff;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        font-family: inherit;
        font-size: 0.78rem;
        font-weight: 900;
        box-shadow: 0 10px 24px rgba(34, 65, 115, 0.18);
        cursor: pointer;
        white-space: nowrap;
    }

        body.portfolio-index-page .portfolio-mobile-filter-trigger i {
            font-size: 0.86rem;
        }

    body.portfolio-index-page .portfolio-mobile-page-title {
        display: block !important;
        margin: 0 0 14px;
        padding: 0 2px;
    }

        body.portfolio-index-page .portfolio-mobile-page-title h1 {
            margin: 0;
            color: #162033;
            font-size: 1.16rem;
            line-height: 1.9;
            font-weight: 950;
            letter-spacing: -0.2px;
        }

    body.portfolio-filter-sheet-open {
        overflow: hidden !important;
        touch-action: none;
    }

        body.portfolio-filter-sheet-open .mobile-bottom-bar,
        body.portfolio-filter-sheet-open .portfolio-mobile-bottom-bar {
            opacity: 0 !important;
            pointer-events: none !important;
        }

    .portfolio-filter-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1140;
        background: rgba(0, 0, 0, 0.58);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        backdrop-filter: blur(2px);
        transition: all 0.22s ease;
    }

        .portfolio-filter-sheet-backdrop.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

    .portfolio-filter-sheet {
        position: fixed;
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 1150;
        height: var(--portfolio-sheet-height, 74vh);
        height: var(--portfolio-sheet-height, 74dvh);
        max-height: 100vh;
        max-height: 100dvh;
        background: #fff;
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.24);
        transform: translateY(105%);
        transition: transform 0.28s ease, height 0.22s ease, border-radius 0.22s ease;
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
        direction: rtl;
    }

        .portfolio-filter-sheet.active {
            transform: translateY(0);
        }

        .portfolio-filter-sheet.is-compact {
            height: 52vh;
            height: 52dvh;
        }

        .portfolio-filter-sheet.is-expanded {
            height: 74vh;
            height: 74dvh;
        }

        .portfolio-filter-sheet.is-fullscreen {
            height: 100vh;
            height: 100dvh;
            border-radius: 0;
        }

        .portfolio-filter-sheet.is-dragging {
            transition: none;
        }

    .portfolio-filter-sheet-header {
        position: relative;
        flex: 0 0 auto;
        min-height: 62px;
        padding: 20px 54px 14px;
        border-bottom: 1px solid rgba(27, 53, 96, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: none;
        user-select: none;
        background: #fff;
    }

    .portfolio-filter-sheet-handle {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 48px;
        height: 5px;
        border-radius: 999px;
        background: #cfd6e2;
        cursor: grab;
    }

    .portfolio-filter-sheet.is-dragging .portfolio-filter-sheet-handle {
        cursor: grabbing;
    }

    .portfolio-filter-sheet-header h3 {
        width: 100%;
        text-align: center;
        margin: 0;
        color: #162033;
        font-size: 1rem;
        line-height: 1.8;
        font-weight: 950;
    }

    .portfolio-filter-sheet-close {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 34px;
        height: 34px;
        border: 1px solid rgba(239, 80, 70, 0.16);
        border-radius: 50%;
        background: #fff2f1;
        color: #ef5046;
        font-size: 1.35rem;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .portfolio-filter-sheet-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 14px 14px 105px;
        touch-action: pan-y;
    }

    .portfolio-mobile-filter-option {
        width: 100%;
        min-height: 54px;
        border: 1px solid rgba(27, 53, 96, 0.09);
        border-radius: 18px;
        background: #f7f9fc;
        color: #162033;
        padding: 10px 13px;
        margin-bottom: 9px;
        font-family: inherit;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .portfolio-mobile-filter-option span {
            min-width: 0;
            display: inline-flex;
            align-items: center;
            gap: 9px;
            font-size: 0.86rem;
            font-weight: 900;
            text-align: right;
        }

        .portfolio-mobile-filter-option i {
            color: #224173;
        }

        .portfolio-mobile-filter-option strong {
            min-width: 30px;
            height: 30px;
            border-radius: 999px;
            background: #fff;
            color: #224173;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            font-weight: 950;
            border: 1px solid rgba(27, 53, 96, 0.08);
        }

        .portfolio-mobile-filter-option.active {
            background: linear-gradient(135deg, #224173, #1b3560);
            color: #fff;
            border-color: #1b3560;
            box-shadow: 0 12px 28px rgba(27, 53, 96, 0.20);
        }

            .portfolio-mobile-filter-option.active i,
            .portfolio-mobile-filter-option.active strong {
                color: #1b3560;
            }

    .portfolio-filter-sheet-footer {
        position: absolute;
        right: 0;
        left: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: 1fr 1.25fr;
        gap: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(255,255,255,0.74), #fff 38%);
        border-top: 1px solid rgba(27, 53, 96, 0.08);
    }

    .portfolio-filter-sheet-reset,
    .portfolio-filter-sheet-done {
        height: 48px;
        border: 0;
        border-radius: 17px;
        font-family: inherit;
        font-size: 0.84rem;
        font-weight: 950;
        cursor: pointer;
    }

    .portfolio-filter-sheet-reset {
        background: #eef3fb;
        color: #224173;
    }

    .portfolio-filter-sheet-done {
        background: linear-gradient(135deg, #224173, #1b3560);
        color: #fff;
        box-shadow: 0 10px 24px rgba(27, 53, 96, 0.22);
    }
}

@media (max-width: 420px) {
    body.portfolio-index-page .portfolio-mobile-filter-trigger {
        width: 44px;
        padding: 0;
    }

        body.portfolio-index-page .portfolio-mobile-filter-trigger span {
            display: none;
        }

    body.portfolio-index-page .portfolio-mobile-breadcrumb {
        padding: 0 10px;
    }
}

/* Desktop portfolio title: always one line */
