/* ============================================
   PAGE EXPLORER — Tabbed content showcase
   ============================================ */

.page-explorer {
    position: relative;
    background: #fff;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(10rem, 18vw, 16rem);
}

.page-explorer__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 280px 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: stretch;
    min-height: 480px;
}

/* --- Left: Selectable list panel --- */

.page-explorer__nav {
    background: var(--color-accent, #FF3B30);
    border-radius: 16px;
    padding: clamp(1.5rem, 2.5vw, 2rem) 0;
    overflow-y: auto;
    max-height: 540px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.page-explorer__nav::-webkit-scrollbar {
    width: 4px;
}

.page-explorer__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* Mobile pager wrapper — `display: contents` on desktop so the nav stays
   a direct grid item and the desktop layout is completely untouched. */
.page-explorer__nav-wrap {
    display: contents;
}

/* The mobile prev/next pager only renders on mobile */
.page-explorer__pager {
    display: none;
}

/* Category heading inside the nav list — also breaks up the long desktop list */
.page-explorer__group {
    display: block;
    font-family: var(--font-body, "Urbanist", sans-serif);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    padding: 1.1rem clamp(1.2rem, 2vw, 1.8rem) 0.4rem;
}

.page-explorer__group:first-child {
    padding-top: 0;
}

.page-explorer__item {
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 1vw, 1rem);
    padding: clamp(0.55rem, 0.9vw, 0.75rem) clamp(1.2rem, 2vw, 1.8rem);
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
}

.page-explorer__item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.page-explorer__item-num {
    font-family: var(--font-body, "Urbanist", sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    min-width: 24px;
    letter-spacing: 0.02em;
}

.page-explorer__item-label {
    font-family: var(--font-body, "Urbanist", sans-serif);
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.01em;
    transition: color 0.2s, font-size 0.2s, font-weight 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Active state */
.page-explorer__item--active {
    background: rgba(255, 255, 255, 0.06);
}

.page-explorer__item--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #fff;
    border-radius: 0 2px 2px 0;
}

.page-explorer__item--active .page-explorer__item-num {
    color: rgba(255, 255, 255, 0.8);
}

.page-explorer__item--active .page-explorer__item-label {
    color: #fff;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    font-weight: 600;
}

/* --- Center: Content area --- */

.page-explorer__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1rem, 2vw, 2rem) 0;
}

.page-explorer__label {
    font-family: var(--font-body, "Urbanist", sans-serif);
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent, #FF3B30);
    margin-bottom: clamp(0.8rem, 1.2vw, 1.2rem);
}

.page-explorer__title {
    font-family: var(--font-heading, "Urbanist", sans-serif);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 300;
    color: var(--color-text-primary, #32302F);
    line-height: 1.15;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.page-explorer__desc {
    font-family: var(--font-body, "Urbanist", sans-serif);
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    font-weight: 400;
    color: var(--color-text-secondary, #6B6462);
    line-height: 1.65;
    margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
    max-width: 480px;
}

.page-explorer__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body, "Urbanist", sans-serif);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-primary, #32302F);
    text-decoration: none;
    transition: gap 0.25s;
}

.page-explorer__cta:hover {
    gap: 1.1rem;
}

.page-explorer__cta-arrow {
    display: inline-block;
    width: 28px;
    height: 2px;
    background: var(--color-gold, #C0392B);
    position: relative;
}

.page-explorer__cta-arrow::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-gold, #C0392B);
    border-top: 2px solid var(--color-gold, #C0392B);
}

/* --- Right: Image --- */

.page-explorer__image-wrap {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.page-explorer__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease;
}

/* Fade transition for image swap */
.page-explorer__image--fading {
    opacity: 0;
}

/* --- Tablet --- */

@media (max-width: 1024px) {
    .page-explorer__inner {
        grid-template-columns: 240px 1fr;
        grid-template-rows: auto auto;
    }

    .page-explorer__nav {
        grid-row: 1 / 3;
    }

    .page-explorer__image-wrap {
        height: 280px;
    }
}

/* --- Mobile ---
   The nav list is replaced by a compact pager: a left/right pair of big
   tap targets flanking the current section's category + name. The pager
   is sticky inside the page-explorer section, so as you scroll through
   the content it stays at the top of the viewport — and un-sticks as
   soon as you scroll past the section. */

@media (max-width: 768px) {
    .page-explorer__inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.25rem;
    }

    /* Wrapper becomes the grid cell — sticky within the section. The
       containing block is `.page-explorer__inner`, so the pager un-sticks
       the moment its grid cell scrolls past. */
    .page-explorer__nav-wrap {
        display: block;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    /* The desktop nav list isn't used on mobile — the pager drives state */
    .page-explorer__nav {
        display: none;
    }

    /* --- Pager bar --- */
    .page-explorer__pager {
        display: flex;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.55rem;
        background: var(--color-accent, #FF3B30);
        border-radius: 14px;
        box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.35);
    }

    .page-explorer__pager-btn {
        flex-shrink: 0;
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.16);
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease, transform 0.15s ease;
    }

    .page-explorer__pager-btn:active {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(0.94);
    }

    .page-explorer__pager-current {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.15rem;
        padding: 0 0.25rem;
        text-align: center;
    }

    .page-explorer__pager-cat {
        font-family: var(--font-body, "Urbanist", sans-serif);
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
    }

    .page-explorer__pager-name {
        font-family: var(--font-body, "Urbanist", sans-serif);
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.15;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-explorer__image-wrap {
        height: 360px;
        border-radius: 12px;
    }
}
