/* ─── Portfolio Grid ─────────────────────────────────────── */

.psc-portfolio-widget {
    width: 100%;
}

/* ─── Filter Bar ─── */

.psc-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
}

.psc-filter__item {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 8px 20px;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    transition: color 0.2s, border-color 0.2s;
}

.psc-filter__item:hover {
    opacity: 0.8;
}

.psc-filter__item--active {
    border-bottom-color: currentColor;
    font-weight: 600;
}

/* ─── Grid Layout ─── */

.psc-grid {
    --psc-col-gap: 20px;
    --psc-row-gap: 20px;
    display: grid;
    column-gap: var(--psc-col-gap);
    row-gap: var(--psc-row-gap);
}

.psc-grid--cols-1 { grid-template-columns: repeat(1, 1fr); }
.psc-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.psc-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.psc-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.psc-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }

/* When Isotope takes over, it uses absolute positioning. Disable CSS grid. */
.psc-grid--masonry.psc-isotope-ready {
    display: block;
}

/* Isotope item sizing + vertical spacing via margin (Isotope reads outerHeight) */
.psc-grid--masonry .psc-card {
    box-sizing: border-box;
    margin-bottom: var(--psc-row-gap);
}

/* ─── Card ─── */

.psc-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ─── Card: Image ─── */

.psc-card__image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.psc-card__image {
    display: block;
    position: relative;
    overflow: hidden;
}

/* Ratio via padding-bottom (set inline by template) */
.psc-card__image[style*="padding-bottom"] {
    height: 0;
}

.psc-card__image[style*="padding-bottom"] .psc-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.psc-card__img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Overlay */
.psc-card__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ─── Hover Effects ─── */

.psc-hover--zoom .psc-card:hover .psc-card__img {
    transform: scale(1.05);
}

.psc-hover--overlay .psc-card:hover .psc-card__overlay {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.4);
}

.psc-hover--lift .psc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.psc-hover--lift .psc-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ─── Plus Icon (sharp white square) ─── */

/* Plus icon link wrapper (eigenständiger Link) */
.psc-card__plus-link {
    position: absolute;
    bottom: var(--psc-icon-offset-y, 0px);
    right: var(--psc-icon-offset-x, 0px);
    z-index: 3;
    text-decoration: none;
    line-height: 0;
}

.psc-card__plus {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #222;
    border-radius: 0;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    text-indent: 0.5px;
    padding-bottom: 1px;
    transition: background-color 0.2s;
}

.psc-card__plus-link:hover .psc-card__plus {
    background: #f0f0f0;
}

/* ─── Card: Content ─── */

.psc-card__content {
    padding: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ─── Tags (button style) ─── */

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

.psc-card__tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 0;
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

a.psc-card__tag:hover {
    background: #e0e0e0;
    color: #333;
}

.psc-card__tag--primary {
    background: #2271b1;
    color: #fff;
}

a.psc-card__tag--primary:hover {
    background: #135e96;
    color: #fff;
}

/* ─── Title ─── */

.psc-card__title {
    margin: 15px 0 5px;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2; /* default, overridden by Elementor responsive control */
}

.psc-card__title a {
    color: inherit;
    text-decoration: none;
}

.psc-card__title a:hover {
    text-decoration: underline;
}

/* ─── Short Text ─── */

.psc-card__text {
    margin: 0 0 20px;
    font-size: 0.92em;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3; /* default, overridden by Elementor responsive control */
}

/* ─── Button ─── */

.psc-card__button {
    align-self: flex-start;
    display: inline-block;
    margin-top: 2px;
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    border-radius: 0;
    transition: background-color 0.2s, color 0.2s;
}

.psc-card__button:hover {
    background: #fff;
    color: #000;
    opacity: 1;
}

/* ─── Load More ─── */

.psc-load-more-wrap {
    text-align: center;
    margin-top: 30px;
}

.psc-load-more {
    display: inline-block;
    padding: 12px 32px;
    background: none;
    border: 2px solid currentColor;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    transition: background-color 0.2s, color 0.2s;
}

.psc-load-more:hover {
    opacity: 0.8;
}

.psc-load-more:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ─── Infinite Scroll Trigger ─── */

.psc-infinite-trigger {
    height: 1px;
}

.psc-loading-spinner {
    text-align: center;
    padding: 20px;
}

.psc-loading-spinner span {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: psc-spin 0.6s linear infinite;
}

@keyframes psc-spin {
    to { transform: rotate(360deg); }
}

/* ─── Animations ─── */

.psc-anim-fade-in {
    animation: psc-fadeIn 0.4s ease both;
}

.psc-anim-slide-up {
    animation: psc-slideUp 0.4s ease both;
}

@keyframes psc-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes psc-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── No Results ─── */

.psc-no-results {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.6;
}

/* ─── Responsive (Elementor handles this via responsive controls, but set basic fallbacks) ─── */

@media (max-width: 767px) {
    .psc-grid {
        grid-template-columns: 1fr !important;
    }
}
