/* =========================================================
   PORTFOLIO PAGE V2 (BENTO ROW LAYOUT)
   Scoped to .gp-portfolio-v2 / .page-template-page-portfolio-v2
   ========================================================= */

/* =========================================================
   1) HERO SECTION
   ========================================================= */
.gpv2-hero {
    padding: 140px 0 60px;
    background: #fff;
}

.gpv2-hero-content {
    max-width: 720px;
}

.gpv2-hero-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(48px, 7vw, 80px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary, #111);
    margin: 0 0 24px 0;
}

.gpv2-hero-desc {
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.7;
    color: rgba(17, 17, 17, 0.65);
    max-width: 500px;
    margin: 0;
}

/* =========================================================
   2) FILTER BAR
   ========================================================= */
.gpv2-filter-bar {
    position: sticky;
    top: var(--header-height, 80px);
    z-index: 20;
    padding: 16px 0;
    background: var(--header-bg-sticky);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.gpv2-filter-pills {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gpv2-filter-pills::-webkit-scrollbar {
    display: none;
}

.gpv2-pill {
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: rgba(17, 17, 17, 0.70);
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 999px;
    padding: 10px 20px;
    transition: all 0.25s ease;
    background: #fff;
}

.gpv2-pill:hover {
    border-color: rgba(17, 17, 17, 0.30);
    transform: translateY(-1px);
}

.gpv2-pill.active {
    background: var(--text-primary, #111);
    border-color: var(--text-primary, #111);
    color: #fff;
}

/* =========================================================
   3) BENTO GRID (LIST OF ROWS)
   ========================================================= */
.gpv2-grid-section {
    padding-bottom: 60px;
}

.gpv2-bento-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =========================================================
   4) BENTO ROW (EACH PROJECT)
   ========================================================= */
.gpv2-bento-row {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gpv2-bento-row[style*="display: none"] {
    opacity: 0;
}

.gpv2-bento-link {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gpv2-bento-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   5) INFO CARD (LEFT SIDE - DARK)
   ========================================================= */
.gpv2-bento-info {
    background: #111;
    color: #fff;
    padding: 32px 28px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
    position: relative;
}

.gpv2-bento-cat {
    position: absolute;
    top: 24px;
    left: 24px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
}

.gpv2-bento-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 12px 0;
    color: #fff;
}

.gpv2-bento-desc {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* =========================================================
   6) GALLERY IMAGES (RIGHT SIDE - 3 SQUARE IMAGES IN ROW)
   ========================================================= */
.gpv2-bento-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: stretch;
}

.gpv2-bento-img {
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: #f0f0f0;
}

.gpv2-bento-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gpv2-bento-row:hover .gpv2-bento-img img {
    transform: scale(1.03);
}

/* All images are equal squares - no special positioning */
.gpv2-bento-img--1,
.gpv2-bento-img--2,
.gpv2-bento-img--3 {
    grid-column: auto;
    grid-row: auto;
}

/* Alt layout variation based on row index */
.gpv2-bento-row:nth-child(even) .gpv2-bento-link {
    grid-template-columns: 1fr 320px;
}

.gpv2-bento-row:nth-child(even) .gpv2-bento-info {
    order: 2;
}

.gpv2-bento-row:nth-child(even) .gpv2-bento-gallery {
    order: 1;
}

/* =========================================================
   7) PAGINATION
   ========================================================= */
.gpv2-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 50px 0 30px;
    flex-wrap: wrap;
}

.gpv2-pag-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: #111;
}

.gpv2-pag-btn:hover:not(:disabled) {
    border-color: rgba(17, 17, 17, 0.4);
    transform: translateY(-1px);
}

.gpv2-pag-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gpv2-pag-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gpv2-pag-pages button {
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: #fff;
    color: rgba(17, 17, 17, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gpv2-pag-pages button:hover {
    border-color: rgba(17, 17, 17, 0.35);
}

.gpv2-pag-pages button.active {
    background: var(--text-primary, #111);
    border-color: var(--text-primary, #111);
    color: #fff;
}

/* Go to page */
.gpv2-goto {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid rgba(17, 17, 17, 0.1);
}

.gpv2-goto span {
    font-size: 13px;
    color: rgba(17, 17, 17, 0.6);
}

.gpv2-goto-input {
    width: 50px;
    height: 40px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease;
}

.gpv2-goto-input:focus {
    border-color: rgba(17, 17, 17, 0.4);
}

.gpv2-goto-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--text-primary, #111);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.gpv2-goto-btn:hover {
    transform: translateY(-1px);
}

/* =========================================================
   8) CTA SECTION
   ========================================================= */
.gpv2-cta {
    padding: 80px 0 100px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.gpv2-cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.gpv2-cta-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0 0 28px 0;
    color: var(--text-primary, #111);
}

.gpv2-cta-btn {
    display: inline-block;
    padding: 16px 36px;
    background: var(--text-primary, #111);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.gpv2-cta-btn:hover {
    background: var(--accent, #2563EB);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   9) RESPONSIVE - TABLET (max-width: 1024px)
   ========================================================= */
@media (max-width: 1024px) {
    .gpv2-hero {
        padding: 120px 0 50px;
    }

    .gpv2-bento-link {
        grid-template-columns: 280px 1fr;
        gap: 12px;
    }

    .gpv2-bento-row:nth-child(even) .gpv2-bento-link {
        grid-template-columns: 1fr 280px;
    }

    .gpv2-bento-info {
        min-height: 240px;
        padding: 24px;
    }

    .gpv2-bento-gallery {
        gap: 10px;
    }
}

/* =========================================================
   10) RESPONSIVE - MOBILE (max-width: 768px)
   ========================================================= */
@media (max-width: 768px) {
    .gpv2-hero {
        padding: 110px 0 40px;
    }

    .gpv2-hero-title {
        font-size: 42px;
    }

    .gpv2-filter-bar {
        top: 70px;
        margin-bottom: 24px;
    }

    .gpv2-bento-link,
    .gpv2-bento-row:nth-child(even) .gpv2-bento-link {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gpv2-bento-info,
    .gpv2-bento-row:nth-child(even) .gpv2-bento-info {
        order: 1;
        min-height: auto;
        padding: 28px 24px;
    }

    .gpv2-bento-gallery,
    .gpv2-bento-row:nth-child(even) .gpv2-bento-gallery {
        order: 2;
        grid-template-columns: repeat(3, 1fr);
    }

    .gpv2-bento-img {
        aspect-ratio: 1 / 1;
    }

    .gpv2-pagination {
        gap: 8px;
    }

    .gpv2-goto {
        display: none;
    }

    .gpv2-cta {
        padding: 60px 0 80px;
    }

    .gpv2-cta-title {
        font-size: 28px;
    }
}

/* =========================================================
   11) NO ITEMS STATE
   ========================================================= */
.gpv2-no-items {
    text-align: center;
    padding: 60px 20px;
    color: rgba(17, 17, 17, 0.5);
    font-size: 16px;
}

/* =========================================================
   12) REDUCE MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {

    .gpv2-pill,
    .gpv2-bento-link,
    .gpv2-bento-img img,
    .gpv2-pag-btn,
    .gpv2-cta-btn {
        transition: none !important;
    }
}