.explore-page,
.explore-page * {
    min-width: 0;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.explore-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    overflow-x: clip;
}

.explore-page .section-kicker {
    color: var(--brand-blue, #134074);
}

.explore-panel,
.explore-results {
    background: var(--brand-surface, #ffffff);
    border: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
    border-radius: 16px;
    box-shadow: var(--brand-shadow-sm, 0 8px 20px rgba(11, 37, 69, 0.08));
}

.explore-panel {
    padding: 1.25rem;
}

.explore-header,
.explore-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.explore-header h1,
.explore-results-header h2 {
    margin: 0;
    color: var(--brand-navy, #0b2545);
    font-size: 1.65rem;
    font-weight: 700;
}

.explore-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.explore-actions .btn {
    max-width: 100%;
}

.explore-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin: 1.25rem 0;
}

.explore-search {
    position: relative;
}

.explore-search i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pro-text-muted, rgba(11, 37, 69, 0.58));
}

.explore-search .form-control {
    padding-left: 2.25rem;
}

.explore-count {
    border: 1px solid rgba(19, 64, 116, 0.14);
    background: var(--brand-soft, #d6e6f2);
    color: var(--brand-blue, #134074);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.explore-selected-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.explore-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: rgba(15, 118, 110, 0.08);
    color: #0f4f4a;
    border-radius: 999px;
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    text-decoration: none;
}

.explore-selected-chip span {
    overflow-wrap: anywhere;
}

.explore-shell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.explore-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.explore-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--pro-text-secondary, rgba(11, 37, 69, 0.78));
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.25;
}

.explore-nav-item i {
    color: #b8923d;
    flex: 0 0 auto;
}

.explore-nav-item:hover {
    background: rgba(15, 118, 110, 0.06);
    color: #0f4f4a;
}

.explore-nav-item.active {
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.3);
    color: #0f4f4a;
}

.explore-panels {
    min-width: 0;
    border-left: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
    padding-left: 1.25rem;
}

.explore-panel-content {
    display: none;
    min-width: 0;
}

.explore-panel-content.active {
    display: block;
}

.az-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.az-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.35rem;
    border-radius: 6px;
    border: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
    background: #ffffff;
    color: var(--brand-navy, #0b2545);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

a.az-letter:hover,
.az-letter.active {
    border-color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
    color: #0f4f4a;
}

.az-letter.disabled {
    color: var(--pro-text-muted, rgba(11, 37, 69, 0.4));
    background: #f8fafc;
    cursor: not-allowed;
}

.az-letter-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-blue, #134074);
    text-decoration: none;
}

.decada-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.decada-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
    background: #ffffff;
    color: var(--brand-navy, #0b2545);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

a.decada-chip:hover,
.decada-chip.active {
    border-color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
    color: #0f4f4a;
}

.fecha-otras-label {
    margin-top: 0.5rem;
}

.az-hint,
.az-empty {
    color: var(--pro-text-muted, rgba(11, 37, 69, 0.58));
    font-size: 0.85rem;
    margin: 0;
}

.explore-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-height: 230px;
    overflow: auto;
    padding: 0.05rem 0.35rem 0.35rem 0;
}

.explore-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
    background: #ffffff;
    color: var(--brand-navy, #0b2545);
    border-radius: 6px;
    padding: 0.42rem 0.65rem;
    font-size: 0.8rem;
    line-height: 1.2;
    max-width: 100%;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.explore-tag span {
    overflow-wrap: anywhere;
}

.explore-tag small {
    color: var(--pro-text-muted, rgba(11, 37, 69, 0.58));
    font-size: 0.68rem;
    font-weight: 700;
}

.explore-tag:hover,
.explore-tag.active {
    border-color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
    color: #0f4f4a;
    text-decoration: none;
}

.explore-search-empty,
.explore-empty,
.explore-results-empty {
    color: var(--pro-text-muted, rgba(11, 37, 69, 0.58));
    font-size: 0.9rem;
}

.explore-empty,
.explore-results-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 120px;
    border: 1px dashed var(--brand-border, rgba(11, 37, 69, 0.12));
    border-radius: 12px;
}

.explore-results {
    margin-top: 1.5rem;
    padding: 1.25rem;
    scroll-margin-top: 6rem;
}

.explore-result-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.explore-result-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
    border-left: 4px solid var(--brand-blue, #134074);
    border-radius: 8px;
    background: #ffffff;
    padding: 0.9rem 1rem;
}

.explore-result-card .btn {
    justify-self: start;
    max-width: 100%;
}

.result-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft, #d6e6f2);
    color: var(--brand-blue, #134074);
    flex: 0 0 auto;
    overflow: hidden;
}

.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.result-body h3 {
    margin: 0 0 0.25rem;
    color: var(--brand-navy, #0b2545);
    font-size: 1rem;
    font-weight: 800;
}

.result-body p {
    margin: 0;
    color: var(--pro-text-secondary, rgba(11, 37, 69, 0.78));
    font-size: 0.86rem;
}

.result-body p span {
    font-weight: 800;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.result-meta span {
    border: 1px solid rgba(19, 64, 116, 0.12);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--pro-text-secondary, rgba(11, 37, 69, 0.78));
    padding: 0.22rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.explore-pagination {
    margin-top: 1.25rem;
}

@media (max-width: 900px) {
    .explore-shell {
        grid-template-columns: 1fr;
    }

    .explore-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    .explore-nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .explore-panels {
        border-left: none;
        border-top: 1px solid var(--brand-border, rgba(11, 37, 69, 0.12));
        padding-left: 0;
        padding-top: 1rem;
    }
}

@media (max-width: 700px) {
    .explore-page {
        padding: 1rem 0.5rem 2rem;
    }

    .explore-panel,
    .explore-results {
        border-radius: 10px;
    }

    .explore-header,
    .explore-results-header,
    .explore-toolbar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .explore-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .explore-selector-toggle {
        justify-content: stretch;
    }

    .explore-selector-toggle .btn {
        width: 100%;
    }

    .explore-result-card {
        grid-template-columns: 1fr;
        align-items: start;
    }
}
