/* ========================================================
   KRK PORTOFOLIO ENGINE - PUBLIC / FRONTEND STYLESHEET
   PT KARYA RIZKI KANOPI
======================================================== */

.krk-portfolio-public-wrap {
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}

/* 1. Bar Tab Filter Kategori */
.krk-public-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.krk-pfilter-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    outline: none;
}

.krk-pfilter-btn:hover,
.krk-pfilter-btn.active {
    background: #0052cc;
    color: #ffffff;
    border-color: #0052cc;
    box-shadow: 0 4px 14px rgba(0, 82, 204, 0.28);
    transform: translateY(-1px);
}

/* 2. Grid Galeri Portofolio */
.krk-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.krk-grid-item {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.krk-grid-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 82, 204, 0.12);
    border-color: #0052cc;
}

/* Tempat Foto Kartu */
.krk-grid-img-holder {
    width: 100%;
    height: 220px;
    position: relative;
    background: #0f172a;
    overflow: hidden;
}

.krk-grid-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.krk-grid-item:hover .krk-grid-img-holder img {
    transform: scale(1.06);
}

.krk-grid-badge-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Detail Teks Kartu */
.krk-grid-body {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.krk-grid-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.35;
    transition: color 0.25s ease;
}

.krk-grid-item:hover .krk-grid-body h3 {
    color: #0052cc;
}

/* Baris Ukuran & Lokasi (Kondisional) */
.krk-grid-meta-row {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.krk-meta-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.krk-public-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
}

/* ========================================================
   3. Modal Lightbox Resolusi Penuh
======================================================== */
.krk-lightbox-wrapper {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.krk-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 26, 0.9);
    backdrop-filter: blur(6px);
}

.krk-lightbox-card {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    max-width: 860px;
    width: 100%;
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: krkLbZoom 0.25s ease-out;
}

@keyframes krkLbZoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.krk-lightbox-btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border: none;
    font-size: 1.6rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease;
}

.krk-lightbox-btn-close:hover {
    background: #e52521;
}

.krk-lightbox-img-box {
    width: 100%;
    max-height: 65vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.krk-lightbox-img-box img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    display: block;
}

.krk-lightbox-detail-bar {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    flex-wrap: wrap;
    border-top: 1px solid #e2e8f0;
}

.krk-lb-info .lb-category-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0052cc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 3px;
}

.krk-lb-info h4 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #0f172a;
    line-height: 1.3;
}

.krk-lb-info .lb-meta-info {
    font-size: 0.86rem;
    color: #64748b;
    font-weight: 500;
}

/* Tombol WhatsApp di Lightbox */
.krk-lb-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    transition: all 0.25s ease;
}

.krk-lb-btn-wa svg {
    width: 18px !important;
    height: 18px !important;
    fill: currentColor;
}

.krk-lb-btn-wa:hover {
    background: #1eb956;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* 4. Responsive Breakpoints */
@media (max-width: 680px) {
    .krk-public-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .krk-grid-img-holder {
        height: 190px;
    }

    .krk-lightbox-detail-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .krk-lb-btn-wa {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}