/* Explore page (explore.html). Builds on home-format.css for the navbar,
   tokens, eyebrow and footer, and matches the series page's controls. */

/* ===== Header ===== */
.ex-hero {
    padding: 44px 48px;
    background: var(--ff-card);
    border-radius: 24px;
}

.ex-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
}

.ex-hero__text {
    margin: 0 0 24px;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.55;
}

/* Big white search pill, like the home page hero */
.ex-searchbox {
    position: relative;
    max-width: 640px;
}

.ex-searchbox svg {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7080;
    pointer-events: none;
}

.ex-searchbox input {
    width: 100%;
    height: 52px;
    padding: 0 20px 0 50px;
    font: inherit;
    font-size: 15px;
    color: #1a1a1a;
    background: var(--ff-text);
    border: none;
    border-radius: 999px;
    outline: none;
}

.ex-searchbox input::placeholder {
    color: #6b7080;
}

.ex-searchbox input:focus {
    box-shadow: 0 0 0 3px var(--ff-gold);
}

/* ===== Inputs and selects (same look as the series page) ===== */
.ex-control {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    color: var(--ff-text);
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 10px;
    color-scheme: dark;
}

.ex-control::placeholder {
    color: var(--ff-text-secondary);
    opacity: 0.8;
}

.ex-control:focus {
    outline: none;
    border-color: var(--ff-gold);
}

.ex-btn:focus-visible,
.ex-page-btn:focus-visible,
.ex-link-btn:focus-visible,
.ex-check input:focus-visible {
    outline: 2px solid var(--ff-gold);
    outline-offset: 2px;
}

/* ===== Count and sort row (pagination scrolls back to here) ===== */
.ex-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 32px 0 20px;
    scroll-margin-top: 16px;
}

.ex-count {
    margin: 0;
    font-size: 14px;
    color: var(--ff-text-secondary);
}

.ex-toolbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ex-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ff-text-secondary);
    white-space: nowrap;
}

.ex-sort select {
    width: auto;
    min-width: 210px;
}

.ex-btn {
    height: 40px;
    padding: 0 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ff-text);
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 10px;
    cursor: pointer;
}

.ex-btn:hover,
.ex-btn[aria-expanded="true"] {
    border-color: var(--ff-gold);
}

.ex-filters-toggle {
    display: none; /* shown on small screens only */
}

/* ===== Layout ===== */
.ex-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ===== Filters panel ===== */
.ex-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
    background: var(--ff-card);
    border-radius: 18px;
    position: sticky;
    top: 16px;
}

.ex-filters__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.ex-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ex-field > label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ex-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ff-text-secondary);
}

.ex-range .ex-control {
    min-width: 0;
}

.ex-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.ex-check input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--ff-gold);
    flex-shrink: 0;
}

.ex-link-btn {
    align-self: flex-start;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ff-text);   /* gold is too dark for small text on the card blue */
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
}

.ex-link-btn:hover {
    text-decoration-thickness: 2px;
}

/* ===== Results ===== */
.ex-results .ff-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 0;
}

.ex-empty {
    grid-column: 1 / -1;
    padding: 56px 24px;
    text-align: center;
    color: var(--ff-text-secondary);
    background: var(--ff-card);
    border-radius: 18px;
}

.ex-empty p {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--ff-text);
}

/* ===== Pagination (same as the series page) ===== */
.ex-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.ex-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ff-text);
    background: var(--ff-track);
    border: 1px solid var(--ff-card-border);
    border-radius: 10px;
    cursor: pointer;
}

.ex-page-btn:hover:not(:disabled):not(.is-current) {
    border-color: var(--ff-gold);
}

.ex-page-btn.is-current {
    color: #1a1a1a;
    background: var(--ff-gold);
    border-color: var(--ff-gold);
    cursor: default;
}

.ex-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ex-page-gap {
    padding: 0 4px;
    color: var(--ff-text-secondary);
}

/* ===== Smaller screens ===== */
@media (max-width: 900px) {
    .ex-hero {
        padding: 32px 28px;
    }

    .ex-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ex-filters-toggle {
        display: inline-block;
    }

    .ex-filters {
        display: none;
        position: static;
    }

    .ex-filters.is-open {
        display: flex;
    }
}

@media (max-width: 600px) {
    .ex-hero {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .ex-toolbar__right {
        width: 100%;
    }

    .ex-sort {
        flex: 1;
        min-width: 0;
    }

    .ex-sort span {
        display: none;
    }

    .ex-sort select {
        flex: 1;
        min-width: 0;
    }

    .ex-results .ff-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}
