/* Modern Portfolio Grid Styles */
.portfolio-seo-intro {
    max-width: 940px;
    margin: 0 auto 22px;
    padding: 0 12px;
    text-align: center;
}

.portfolio-seo-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    color: #121212;
}

.portfolio-seo-description {
    margin: 10px auto 0;
    max-width: 820px;
    color: #3a3a3a;
    font-size: 16px;
    line-height: 1.7;
}

.portfolio-empty-state {
    text-align: center;
    margin: 24px 0;
    font-weight: 600;
    color: #4a4a4a;
}

.portfolio_nav {
    width: 100%;
    min-height: 40px;
    background-color: var(--bg-primary, #f6f8fb);
    box-shadow: 0 22px 31px -13px rgba(0, 0, 0, 0.06);
    padding: 5px 12px;
    margin-bottom: 26px;
}

.portfolio_nav .brand_name_portfolio_nav {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 12px;
}

.brand_name_portfolio_nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    grid-gap: 15px;
    padding: 10px 0;
}

.portfolio_nav_link {
    text-decoration: none;
}

.nav_tab {
    width: 100%;
    height: 40px;
    border: 2px solid var(--color-border, #EFF5F8);
    border-radius: 35px;
    font-size: 15px;
    font-family: var(--font-body, 'Outfit', sans-serif);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: pointer;
    transition: all 300ms ease;
    color: var(--color-default, #5f6672);
    font-weight: 600;
}

.nav_tab:hover,
.nav_tab.is-active {
    border-color: var(--color-primary, #C4EF17);
    background-color: var(--color-primary, #C4EF17);
    color: var(--color-heading, #131217);
}

.psp-modern-portfolio-grid-wrapper {
    margin-top: 34px;
}

.psp-modern-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (min-width: 768px) {
    .psp-modern-portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .psp-modern-portfolio-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .psp-modern-portfolio-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Grid wrapper smooth transition between modes */
.psp-modern-portfolio-grid-wrapper {
    transition: all 0.4s ease;
}

.psp-modern-portfolio-grid {
    transition: grid-template-columns 0.4s ease, gap 0.4s ease;
}

.psp-portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.psp-filter-btn {
    padding: 9px 16px;
    border: 1px solid var(--color-border, #EFF5F8);
    border-radius: 100px;
    background-color: var(--bg-primary, #f6f8fb);
    color: var(--color-heading, #131217);
    font-size: 14px;
    font-family: var(--font-body, 'Outfit', sans-serif);
    font-weight: 600;
    line-height: 1;
    transition: all 0.25s ease;
    cursor: pointer;
}

.psp-filter-btn:hover,
.psp-filter-btn.active {
    background-color: var(--color-primary, #C4EF17);
    color: var(--color-heading, #131217);
    border-color: var(--color-primary, #C4EF17);
}

.psp-portfolio-item {
    position: relative;
    overflow: visible;
    background: transparent;
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    transition: transform 0.36s ease, opacity 0.28s ease, visibility 0.28s ease;
    display: flex;
    flex-direction: column;
}

.psp-portfolio-item.is-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    visibility: hidden;
}

.psp-portfolio-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.psp-portfolio-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.55s ease, box-shadow 0.4s ease;
}

.psp-item-overlay {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 14px 2px 0;
    opacity: 1;
    background: transparent;
    pointer-events: auto;
    transition: none;
}

.psp-item-overlay-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psp-item-category {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.psp-item-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

/* Arrow icon */
.psp-item-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 12px;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.psp-portfolio-item:hover img {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.psp-portfolio-item:hover .psp-item-arrow {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Cinematic 2-Column Grid  —  Matches reference screenshot exactly
   ========================================================================== */

/* Full-width black section */
.psp-grid--cinematic {
    background: #0a0a0a;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
}

/* ── Alternating Mosaic Grid (62/38 then 38/62) ───────────────────────── */
.psp-grid--cinematic .psp-modern-portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #0a0a0a;
}

.psp-grid--cinematic .psp-portfolio-item {
    width: 100%; /* Default mobile width */
}

@media (min-width: 601px) {
    /* Large columns (62%) -> 1st item and 4th item in every 4-item block */
    .psp-grid--cinematic .psp-portfolio-item:nth-child(4n + 1),
    .psp-grid--cinematic .psp-portfolio-item:nth-child(4n + 4) {
        width: calc(62% - 7.5px); /* 7.5px accounts for half of the 15px gap */
    }

    /* Small columns (38%) -> 2nd item and 3rd item in every 4-item block */
    .psp-grid--cinematic .psp-portfolio-item:nth-child(4n + 2),
    .psp-grid--cinematic .psp-portfolio-item:nth-child(4n + 3) {
        width: calc(38% - 7.5px);
    }
}

/* ── Image area overrides for cinematic ──────────────────────────────────── */
.psp-grid--cinematic .psp-portfolio-item img {
    height: clamp(260px, 36vw, 500px);
    aspect-ratio: unset;
}


/* Modal + Slider */
.psp-portfolio-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.psp-portfolio-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.psp-portfolio-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}

.psp-portfolio-modal__dialog {
    position: relative;
    margin: 40px auto;
    width: min(92vw, 1100px);
    background: #0f0f0f;
    border-radius: 16px;
    padding: 20px 24px 18px;
    z-index: 2;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.psp-portfolio-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.psp-portfolio-slider {
    display: flex;
    align-items: center;
    gap: 14px;
}

.psp-portfolio-slider__viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
}

.psp-portfolio-slider__track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

.psp-portfolio-slide {
    min-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #222;
}

.psp-portfolio-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.psp-portfolio-slider__nav {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.psp-portfolio-slider__nav:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
}

.psp-portfolio-modal__caption {
    margin-top: 14px;
    color: #fff;
}

.psp-portfolio-modal__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

.psp-portfolio-modal__category {
    margin: 4px 0 0;
    opacity: 0.86;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.psp-portfolio-modal__actions {
    margin-top: 14px;
}

.psp-portfolio-modal__link {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: #f28a00;
    color: #111;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.psp-portfolio-modal__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(242, 138, 0, 0.28);
}

/* Single Branding / Website Portfolio */
.branding-project-details .project-title {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
}

.branding-project-details .branding-project-row {
    align-items: flex-start;
}

.branding-project-details .project-sidebar-col {
    align-self: flex-start;
}

@media (min-width: 992px) {
    .branding-project-details,
    .branding-project-details .container,
    .branding-project-details .branding-project-row,
    .branding-project-details .project-sidebar-col {
        overflow: visible !important;
    }

    .branding-project-details .project-sidebar-col {
        position: -webkit-sticky;
        position: sticky;
        top: 110px;
        height: fit-content;
    }

    .branding-project-details .project-sidebar--sticky {
        position: static !important;
    }
}

.branding-project-details .project-meta-card .meta-label {
    margin-bottom: 6px;
}

.branding-project-details .project-meta-card .meta-value {
    margin-bottom: 0;
    word-break: break-word;
}

.branding-project-details .project-share-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.branding-related-projects .branding-related-projects__title {
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.2;
}

.branding-related-projects .branding-related-projects__slider {
    padding-bottom: 8px;
}

.branding-related-projects .xb-portfolio .xb-item--img {
    border-radius: 16px;
    overflow: hidden;
    outline: 0;
}

.branding-related-projects .xb-portfolio .xb-item--img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.branding-related-projects .xb-portfolio .xb-item--title {
    color: var(--color-heading, #131217);
    font-size: 20px;
    font-weight: 600;
    text-transform: none;
    margin-top: 14px;
}

.branding-related-projects .xb-portfolio .xb-item--title a {
    color: inherit;
}

.branding-related-projects .branding-related-projects__placeholder {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: #f1f1f1;
    color: #222;
    font-weight: 600;
}

@media (max-width: 991px) {
    .psp-portfolio-modal__dialog {
        width: min(94vw, 900px);
        padding: 18px;
    }

    .branding-project-details {
        padding-top: 70px !important;
        padding-bottom: 70px !important;
    }

    .branding-project-details .project-sidebar--sticky {
        position: static;
        top: auto;
        margin-top: 0;
    }

    .branding-project-details .project-sidebar {
        display: flex;
        flex-direction: column;
    }

    .branding-project-details .project-title {
        order: 1;
    }

    .branding-project-details .project-meta-card {
        order: 2;
    }

    .branding-project-details .project-cta-card {
        order: 3;
        margin-top: 20px;
    }

    .branding-project-details .project-meta-card,
    .branding-project-details .project-cta-card {
        padding: 20px !important;
    }

    .branding-related-projects {
        padding-bottom: 70px !important;
    }

    .branding-related-projects .xb-portfolio .xb-item--img img {
        height: 240px;
    }
}

@media (max-width: 767px) {
    .brand_name_portfolio_nav {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .psp-portfolio-slider {
        gap: 10px;
    }

    .psp-portfolio-slider__nav {
        width: 38px;
        height: 38px;
    }

    .psp-portfolio-modal__title {
        font-size: 18px;
    }

    .branding-project-details {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    .branding-project-details .project-title {
        font-size: 26px;
        margin-bottom: 14px !important;
    }

    .branding-project-details .project-meta-card .meta-item {
        margin-bottom: 14px !important;
    }

    .branding-project-details .project-meta-card .meta-item:last-child {
        margin-bottom: 0 !important;
    }

    .branding-project-details .project-share-btn {
        width: 36px;
        height: 36px;
    }

    .branding-related-projects {
        padding-bottom: 48px !important;
    }

    .branding-related-projects .xb-portfolio .xb-item--img {
        border-radius: 12px;
    }

    .branding-related-projects .xb-portfolio .xb-item--img img {
        height: 180px;
    }

    .branding-related-projects .xb-portfolio .xb-item--title {
        font-size: 16px;
        margin-top: 10px;
    }

    .branding-related-projects .branding-related-projects__placeholder {
        min-height: 180px;
        font-size: 14px;
        padding: 14px;
    }
}

/* ── Mobile Layout Adjustments ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Reduce top/bottom padding on mobile */
    .content-area.pt-110.pb-130 {
        padding-top: 40px !important;
        padding-bottom: 50px !important;
    }
}

/* ==========================================================================
   Branding Fullscreen Hero
   ========================================================================== */

.branding-fullscreen-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Ensure it breaks out of any container restrictions if the theme forces them */
    margin-left: calc(-50vw + 50%);
}

.branding-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark gradient: darker at top for 'Go Back' link, transparent middle, darker at bottom for title */
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.85) 100%);
    z-index: 1;
}

.branding-hero-back {
    position: absolute;
    bottom: 60px;
    right: 40px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-body, 'Outfit', sans-serif);
    text-decoration: none;
    z-index: 2;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.branding-hero-back:hover {
    color: #ffffff;
    opacity: 0.7;
}

.branding-hero-content {
    position: absolute;
    bottom: 60px;
    left: 40px;
    z-index: 2;
    max-width: 80%;
}

.branding-hero-title {
    color: #ffffff;
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 500;
    line-height: 1.1;
    margin: 0;
    font-family: var(--font-body, 'Outfit', sans-serif);
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .branding-hero-back {
        bottom: 40px;
        right: 20px;
    }
    .branding-hero-content {
        bottom: 40px;
        left: 20px;
    }
}
