/* Filter bar */
.pc-portfolio {
    width: 100%;
}

.pc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.pc-filter-btn {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 99px;
    border: 1.5px solid #e0e0e0;
    background: transparent;
    color: #555555;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    line-height: 1.4;
}

.pc-filter-btn:hover {
    border-color: #aaaaaa;
    color: #111111;
}

.pc-filter-btn.is-active {
    background: var(--pc-tag-bg, #111111);
    color: var(--pc-tag-fg, #ffffff);
    border-color: transparent;
}

.pc-filter-btn[data-filter="*"].is-active {
    background: #111111;
    color: #ffffff;
    border-color: transparent;
}

/* Card hidden state */
.pc-card.is-hidden {
    display: none;
}

.pc-no-results {
    color: #999999;
    font-size: 14px;
    padding: 1rem 0;
}

/* Grid */
.pc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 2rem 0;
}

.pc-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
    text-align: left;
}

.pc-card:hover {
    border-color: #aaaaaa;
    transform: translateY(-3px);
}

.pc-card__thumb {
    width: calc(100% + 2.5rem);
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    height: 140px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.pc-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pc-card__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #111111;
}

.pc-card__desc {
    font-size: 13px;
    color: #555555;
    margin: 0 0 14px;
    line-height: 1.6;
}

.pc-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pc-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    display: inline-block;
}

.pc-card__cta {
    font-size: 12px;
    color: #999999;
    margin: 14px 0 0;
}

/* Overlay */
.pc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pc-overlay.is-open {
    display: flex;
}

.pc-modal {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 0;
    max-width: 560px;
    width: 100%;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.pc-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 16px;
    background: rgba(255,255,255,0.85);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
}

.pc-modal__close:hover {
    background: #f0f0f0;
}

/* Banner image */
.pc-modal__image-wrap {
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    max-height: 320px;
}

.pc-modal__image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Modal body */
.pc-modal__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #111111;
    padding: 20px 24px 0;
    line-height: 1.3;
}

.pc-modal__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding: 0 24px;
}

.pc-modal__body {
    font-size: 15px;
    color: #444444;
    line-height: 1.75;
    margin: 0;
    padding: 0 24px;
}

/* Rich text formatting inside modal */
.pc-modal__body h1,
.pc-modal__body h2,
.pc-modal__body h3 {
    color: #111111;
    font-weight: 700;
    margin: 1.2em 0 0.4em;
    line-height: 1.3;
}
.pc-modal__body h1 { font-size: 22px; }
.pc-modal__body h2 { font-size: 18px; }
.pc-modal__body h3 { font-size: 15px; }

.pc-modal__body p {
    margin: 0 0 0.9em;
}
.pc-modal__body p:last-child {
    margin-bottom: 0;
}

.pc-modal__body strong, .pc-modal__body b { font-weight: 700; color: #111; }
.pc-modal__body em, .pc-modal__body i { font-style: italic; }
.pc-modal__body u { text-decoration: underline; }
.pc-modal__body s { text-decoration: line-through; }

.pc-modal__body a {
    color: #0073aa;
    text-decoration: underline;
}
.pc-modal__body a:hover { color: #005177; }

.pc-modal__body ul,
.pc-modal__body ol {
    margin: 0 0 0.9em 1.4em;
    padding: 0;
}
.pc-modal__body li { margin-bottom: 0.3em; }

.pc-modal__body .alignleft  { text-align: left; }
.pc-modal__body .aligncenter { text-align: center; }
.pc-modal__body .alignright { text-align: right; }

.pc-modal__body blockquote {
    border-left: 3px solid #e0e0e0;
    margin: 1em 0;
    padding: 0.4em 1em;
    color: #666;
    font-style: italic;
}

.pc-modal__body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin: 0.75em 0;
}

/* Link button — top (below banner) and bottom */
.pc-modal__footer-top {
    padding: 16px 24px 0;
}

.pc-modal__footer {
    padding: 20px 24px 24px;
}

.pc-modal__link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 20px;
    background: #111111;
    color: #ffffff !important;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.pc-modal__link:hover {
    background: #333333;
}
