/* পিওর সিএসএস গ্রিড লেআউট */
.portfolio-grid-container {
    display: grid;
    gap: 24px;
    width: 100%;
}

/* ইন্ডিভিজুয়াল কার্ড ডিজাইন */
.portfolio-grid-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background-color: #fcfcfc;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    aspect-ratio: 4 / 3;
}

.portfolio-card-img-holder {
    width: 100%;
    height: 100%;
    position: relative;
}

.portfolio-card-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.portfolio-grid-card:hover .portfolio-card-img-holder img {
    transform: scale(1.04);
}

/* ডার্ক গ্রাডিয়েন্ট হোভার ওভারলে */
.portfolio-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-grid-card:hover .portfolio-card-overlay {
    opacity: 1;
}

/* ওভারলে সাব-টাইটেল স্টাইল (Manrope Font) */
.portfolio-hover-subtitle {
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    padding: 0 15px;
    letter-spacing: 0.3px;
}

/* MODAL LIGHTBOX DESIGN */
.portfolio-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 20px;
}
.portfolio-modal-overlay.open { opacity: 1; pointer-events: auto; }

.portfolio-modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 750px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.93);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    font-family: 'Manrope', sans-serif;
}
.portfolio-modal-overlay.open .portfolio-modal-content { transform: scale(1); }

.portfolio-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 12;
    transition: background 0.2s;
}
.portfolio-modal-close-btn:hover { background: rgba(0, 0, 0, 0.8); }

.portfolio-modal-scroll { overflow-y: auto; width: 100%; }

.portfolio-modal-img-wrapper {
    width: 100%;
    height: 420px;
    background-color: #f9f9f9;
}
.portfolio-modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

/* পপআপ গ্যালারি থাম্বনেইল */
.portfolio-modal-thumbs {
    display: flex;
    gap: 10px;
    padding: 15px 30px 0 30px;
    overflow-x: auto;
}
.p-thumb-img {
    width: 75px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.p-thumb-img.active, .p-thumb-img:hover {
    opacity: 1;
    border-color: #111111;
}

/* হেডার এরিয়া ও কন্ডিশনাল বাটন */
.portfolio-modal-body { padding: 25px 30px 35px 30px; }
.portfolio-modal-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}
.portfolio-modal-title { font-size: 1.5rem; font-weight: 700; color: #111; margin: 0; }

/* ব্রাউজ প্রডাক্ট বাটন স্টাইল */
.portfolio-browse-btn {
    background-color: #111111;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s;
}
.portfolio-browse-btn:hover {
    background-color: #333333;
    transform: translateY(-1px);
}
.portfolio-modal-desc { font-size: 0.95rem; color: #444; line-height: 1.6; margin: 0; }

/* মোবাইল ও ট্যাব রেসপন্সিভনেস */
@media (max-width: 768px) {
    .portfolio-modal-img-wrapper { height: 280px; }
    .portfolio-modal-header-flex { flex-direction: column; align-items: flex-start; gap: 12px; }
    .portfolio-modal-body { padding: 20px; }
    .portfolio-modal-thumbs { padding: 12px 20px 0 20px; }
    .portfolio-modal-title { font-size: 1.3rem; }
}