/* =====================================================
   PARIMAH THEME - PORTFOLIO PAGE
   -----------------------------------------------------
   01. Gallery + filters
   02. Lightbox
   03. Call to action (also used on the about page)
===================================================== */

.portfolio-page,
.about-page {
    --portfolio-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    background: #FCF9F3;
    direction: rtl;
}


/* =====================================================
   01. GALLERY + FILTERS
===================================================== */

.portfolio-gallery {
    padding: 40px 20px 30px;
}

.portfolio-gallery__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.portfolio-gallery__intro {
    max-width: 820px;
    margin: 0 auto 24px;
    color: #4C5540;
    font-size: 14.5px;
    line-height: 2.1;
    text-align: center;
}

/* Filter tabs */

.portfolio-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 26px;
}

.portfolio-gallery__filter {
    padding: 10px 20px;
    border: 1px solid #E3D3B4;
    border-radius: 9999px;
    background: #ffffff;
    color: #4C5540;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.35s var(--portfolio-ease),
        border-color 0.35s var(--portfolio-ease),
        color 0.35s var(--portfolio-ease);
}

.portfolio-gallery__filter:hover {
    border-color: #C6A052;
}

.portfolio-gallery__filter--active,
.portfolio-gallery__filter--active:hover {
    border-color: #4C5540;
    background: #4C5540;
    color: #ffffff;
}

/* Masonry grid (CSS columns keeps the photos' own ratio) */

.portfolio-gallery__grid {
    columns: 4 260px;
    column-gap: 16px;
}

.portfolio-gallery__item {
    position: relative;
    display: block;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 18px;
    background: #F2E5CB;
    box-shadow: 0 8px 22px rgba(76, 85, 64, 0.07);
    break-inside: avoid;
    transition:
        transform 0.5s var(--portfolio-ease),
        box-shadow 0.5s var(--portfolio-ease),
        opacity 0.4s ease;
}

.portfolio-gallery__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(76, 85, 64, 0.14);
}

/* Hidden by the filter (class added by portfolio.js) */
.portfolio-gallery__item--hidden {
    display: none;
}

.portfolio-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    transition: filter 0.5s var(--portfolio-ease);
}

.portfolio-gallery__item:hover .portfolio-gallery__image {
    filter: brightness(0.82);
}

.portfolio-gallery__caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 34px 16px 14px;
    background: linear-gradient(180deg, rgba(76, 85, 64, 0) 0%, rgba(76, 85, 64, 0.88) 100%);
    color: #ffffff;
    text-align: right;
}

.portfolio-gallery__category {
    color: #EAD6A8;
    font-size: 11px;
    font-weight: 600;
}

.portfolio-gallery__title {
    font-size: 15px;
    font-weight: 800;
}

.portfolio-gallery__zoom {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #4C5540;
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity 0.4s var(--portfolio-ease),
        transform 0.4s var(--portfolio-ease);
}

.portfolio-gallery__zoom svg {
    width: 20px;
    height: 20px;
}

.portfolio-gallery__item:hover .portfolio-gallery__zoom {
    opacity: 1;
    transform: scale(1);
}


/* =====================================================
   02. LIGHTBOX (built by portfolio.js)
===================================================== */

.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: rgba(76, 85, 64, 0.9);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.portfolio-lightbox--open {
    opacity: 1;
    visibility: visible;
}

.portfolio-lightbox__image {
    max-width: min(900px, 100%);
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.portfolio-lightbox__title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.portfolio-lightbox__button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #4C5540;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.portfolio-lightbox__button--close {
    top: 18px;
    right: 18px;
}

/* Right side = next, left side = previous */
.portfolio-lightbox__button--next {
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

.portfolio-lightbox__button--prev {
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
}


/* =====================================================
   03. CALL TO ACTION
===================================================== */

.portfolio-cta {
    padding: 20px 20px 56px;
}

.portfolio-cta__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 34px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 50%, rgba(217, 182, 111, 0.25) 0, rgba(217, 182, 111, 0) 40%),
        #4C5540;
}

.portfolio-cta__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #D9B66F;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.portfolio-cta__title {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.6;
}

.portfolio-cta__text {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.portfolio-cta__actions {
    display: flex;
    flex: none;
    gap: 10px;
}

.portfolio-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.35s var(--portfolio-ease),
        background-color 0.35s var(--portfolio-ease),
        color 0.35s var(--portfolio-ease);
}

.portfolio-cta__button svg {
    width: 18px;
    height: 18px;
}

.portfolio-cta__button--primary {
    background: linear-gradient(135deg, #E6C987 0%, #C6A052 45%, #A98135 100%);
    color: #ffffff;
    direction: ltr;
}

.portfolio-cta__button--outline {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.portfolio-cta__button:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.portfolio-cta__button--outline:hover {
    background: #ffffff;
    color: #4C5540;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 767px) {

    .portfolio-gallery {
        padding: 28px 16px 20px;
    }

    .portfolio-gallery__grid {
        columns: 2 150px;
        column-gap: 10px;
    }

    .portfolio-gallery__item {
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .portfolio-gallery__title {
        font-size: 13px;
    }

    .portfolio-gallery__filter {
        padding: 8px 14px;
        font-size: 12.5px;
    }

    .portfolio-cta {
        padding: 10px 16px 40px;
    }

    .portfolio-cta__container {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
    }

    .portfolio-cta__title {
        font-size: 18px;
    }

    .portfolio-cta__actions {
        width: 100%;
    }

    .portfolio-cta__button {
        flex: 1;
        padding: 12px 10px;
    }
}
