/* =====================================================
   Portfolio Showcase by iamserj.studio — Styles
   ===================================================== */

.ips-wrap { width: 100%; box-sizing: border-box; }
.ips-wrap *, .ips-wrap *::before, .ips-wrap *::after { box-sizing: border-box; }

/* ── Filter Bar ── */
.ips-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.ips-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background-color: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    white-space: nowrap;
    outline: none;
}

.ips-filter-btn:hover { background-color: #e0e0e0; transform: translateY(-1px); }
.ips-filter-btn:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.ips-filter-btn.ips-active { background-color: #1a1a1a; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.ips-filter-btn.ips-active:hover { background-color: #333; }

/* ── Grid ── */
.ips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: 100%;
}

/* ── Item ── */
.ips-item { position: relative; width: 100%; will-change: transform, opacity; }

.ips-item.ips-hide { animation: ipsFadeOut 0.3s ease forwards; pointer-events: none; }
.ips-item.ips-show { animation: ipsFadeIn 0.4s ease forwards; }
.ips-item.ips-hidden { display: none; }

@keyframes ipsFadeOut { from { opacity:1; transform:scale(1); } to { opacity:0; transform:scale(0.97); } }
@keyframes ipsFadeIn  { from { opacity:0; transform:scale(0.97); } to { opacity:1; transform:scale(1); } }

/* ── Wrapper ── */
.ips-item-wrapper {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    text-decoration: none;
    background: #e8e8e8;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* ── Image ── */
.ips-item-image {
    position: relative;
    width: 100%;
    padding-bottom: 66.66%;
    overflow: hidden;
    background: #ddd;
}

.ips-item-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.ips-item-wrapper.ips-scale:hover .ips-item-image img { transform: scale(1.06); }

/* ── Overlay ── */
.ips-overlay {
    position: absolute;
    inset: 0;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.ips-item-wrapper:hover .ips-overlay,
.ips-item-wrapper:focus-within .ips-overlay { opacity: 0.80; }

/* ── Overlay Content ── */
.ips-overlay-content {
    position: relative;
    z-index: 3;
    padding: 24px;
    text-align: center;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    width: 100%;
}

.ips-item-wrapper:hover .ips-overlay-content,
.ips-item-wrapper:focus-within .ips-overlay-content { transform: translateY(0); opacity: 1; }

/* ── Title ── */
.ips-overlay-title-wrap { display: block; width: 100%; }
.ips-overlay-title {
    margin: 0 0 8px;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    word-break: break-word;
}

/* ── Subhead ── */
.ips-overlay-subhead-wrap { display: block; width: 100%; }
.ips-overlay-subhead { display: inline-block; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.85); line-height: 1.4; }

.ips-subhead-tag {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50px;
    padding: 4px 14px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ips-subhead-line { position: relative; padding-top: 14px; }
.ips-subhead-line::before { content:''; display:block; width:40px; height:2px; background:rgba(255,255,255,0.5); margin:0 auto 10px; }

/* ── Industry ── */
.ips-overlay-industry-wrap { display: block; width: 100%; margin-top: 10px; }
.ips-overlay-industry { display: inline-block; font-size: 12px; color: rgba(255,255,255,0.65); letter-spacing: 0.04em; }
.ips-industry-label { color: rgba(255,255,255,0.38); margin-right: 3px; }

/* ── No Results ── */
.ips-no-results { width:100%; text-align:center; padding:60px 20px; color:#888; font-size:16px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .ips-grid { grid-template-columns: repeat(2, 1fr); }
    .ips-overlay-title { font-size: 18px; }
}

@media (max-width: 767px) {
    .ips-grid { grid-template-columns: 1fr; }
    .ips-filter-bar { gap: 8px; margin-bottom: 28px; }
    .ips-filter-btn { padding: 8px 16px; font-size: 13px; }
    .ips-overlay-title { font-size: 18px; }
}

@media (hover: none) {
    .ips-item-wrapper.ips-touch-active .ips-overlay { opacity: 0.80; }
    .ips-item-wrapper.ips-touch-active .ips-overlay-content { transform: translateY(0); opacity: 1; }
}
