/* Portfolio Index Page */
.portfolio-index-section {
    padding: 60px 0;
    direction: rtl;
}

.portfolio-header {
    max-width: 640px;
    margin: 0 auto 40px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #6b7280;
    font-size: 15px;
}

/* Client logo strip */
.brand-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 20px 0 40px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.brand-logo img {
    max-height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: .7;
    transition: .2s;
}

.brand-logo img:hover {
    filter: none;
    opacity: 1;
}

/* Category filter tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.category-tabs .tab {
    padding: 8px 20px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    transition: .2s;
}

.category-tabs .tab:hover {
    background: #e5e7eb;
}

.category-tabs .tab.active {
    background: #2e6e9e;
    color: #fff;
}

/* Search */
.portfolio-search {
    max-width: 420px;
    margin: 0 auto 40px;
    display: flex;
    gap: 8px;
}

.portfolio-search input[type=text] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.portfolio-search button {
    padding: 10px 18px;
    background: #2e6e9e;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Grid & cards */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

@media (max-width: 992px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

.portfolio-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.1);
}

.card-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.portfolio-card:hover .card-thumb img {
    transform: scale(1.05);
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eef2f7, #dfe7ef);
}

.card-body {
    padding: 18px 20px 22px;
}

.card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #2e6e9e;
    background: #eaf2fa;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
}

.card-title a {
    color: #111827;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tag-pill {
    font-size: 11px;
    background: #f3f4f6;
    color: #4b5563;
    padding: 3px 9px;
    border-radius: 999px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-link {
    font-size: 13px;
    font-weight: 700;
    color: #2e6e9e;
}

.card-external {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
}

.no-result {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    padding: 60px 0;
}

.pagination-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
