/* ============================================================
   SKY RP — WIKI
============================================================ */

.wiki-page {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255, 255, 255, 0.045),
            transparent 32%
        ),
        #08090b;
}

/* ============================================================
   HERO
============================================================ */

.wiki-hero {
    padding: 120px 0 80px;
    border-bottom: 1px solid var(--border);
}

.wiki-hero-content {
    width: min(100% - 40px, 820px);
    margin: 0 auto;
    text-align: center;
}

.wiki-hero h1 {
    margin: 18px 0 22px;
    color: #ffffff;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -4px;
}

.wiki-hero h1 span {
    color: #777d86;
}

.wiki-hero p {
    max-width: 620px;
    margin: 0 auto;
    color: #737983;
    font-size: 15px;
    line-height: 1.8;
}

/* ============================================================
   BUSCADOR WIKI
============================================================ */

.wiki-search {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    max-width: 700px;
    height: 58px;

    margin: 35px auto 0;
    padding: 0 7px 0 18px;

    box-sizing: border-box;

    background: #0e1013;
    border: 1px solid var(--border);
    border-radius: 12px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wiki-search:focus-within {
    background: #101216;
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.025);
}

/* Icono */

.wiki-search-icon {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    margin-right: 8px;

    color: #666c75;
    font-size: 22px;
    line-height: 1;

    pointer-events: none;
}

/* Input */

.wiki-search input {
    flex: 1;

    width: auto;
    min-width: 0;
    height: 100%;

    padding: 0 12px 0 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
}

.wiki-search input::placeholder {
    color: #555b64;
}

/* Botón */

.wiki-search button {
    flex-shrink: 0;

    height: 44px;

    padding: 0 20px;

    border: 0;
    border-radius: 9px;

    background: #ffffff;
    color: #111111;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.wiki-search button:hover {
    background: #e9eaec;
    transform: translateY(-1px);
}

.wiki-search button:active {
    transform: translateY(0);
}

/* ============================================================
   RESULTADOS DE BÚSQUEDA
============================================================ */

.wiki-search-results {
    width: 100%;
    max-width: 700px;

    margin: 20px auto 0;
    padding: 22px;

    box-sizing: border-box;

    background: #0e1013;
    border: 1px solid var(--border);
    border-radius: 14px;

    text-align: left;
}

.wiki-search-results.hidden {
    display: none;
}

.wiki-search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 16px;
}

.wiki-search-results-header .section-label {
    color: #777d86;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

#wikiSearchCount {
    color: #555b64;
    font-size: 11px;
}

/* ============================================================
   RESULTADO INDIVIDUAL
============================================================ */

.wiki-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    width: 100%;

    margin-bottom: 10px;
    padding: 18px;

    box-sizing: border-box;

    background: #0a0c0f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;

    color: inherit;
    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.wiki-search-result:last-child {
    margin-bottom: 0;
}

.wiki-search-result:hover {
    background: #101216;
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.wiki-search-result-content {
    flex: 1;
    min-width: 0;
}

.wiki-search-result-category {
    display: block;

    margin-bottom: 6px;

    color: #555b64;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.wiki-search-result h4 {
    margin: 0 0 7px;

    color: #f0f1f3;

    font-size: 16px;
    line-height: 1.35;
}

.wiki-search-result p {
    margin: 0;

    color: #737983;

    font-size: 12px;
    line-height: 1.65;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.wiki-search-result-arrow {
    flex-shrink: 0;

    color: #666c75;

    font-size: 18px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.wiki-search-result:hover .wiki-search-result-arrow {
    color: #ffffff;
    transform: translateX(3px);
}

/* ============================================================
   SIN RESULTADOS
============================================================ */

.wiki-search-empty {
    padding: 28px 15px;

    text-align: center;
}

.wiki-search-empty.hidden {
    display: none;
}

.wiki-no-results-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    margin: 0 auto 14px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;

    color: #666c75;

    font-size: 16px;
}

.wiki-search-empty h3 {
    margin: 0 0 7px;

    color: #ffffff;

    font-size: 17px;
}

.wiki-search-empty p {
    margin: 0;

    color: #5f656e;

    font-size: 12px;
}

/* ============================================================
   CONTENIDO
============================================================ */

.wiki-content {
    padding: 80px 0 120px;
}

.wiki-content > .container {
    width: min(100% - 40px, 1180px);
    margin: 0 auto;
}

.wiki-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;
}

.wiki-section-header h2 {
    margin: 10px 0 0;

    color: #ffffff;

    font-size: 28px;
    letter-spacing: -1px;
}

.wiki-count {
    color: #555b64;

    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ============================================================
   CATEGORY GRID
============================================================ */

.wiki-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.wiki-grid.hidden {
    display: none;
}

.wiki-card {
    position: relative;

    min-height: 175px;

    display: flex;
    align-items: flex-start;

    gap: 18px;

    padding: 25px;

    box-sizing: border-box;

    background: #0e1013;
    border: 1px solid var(--border);
    border-radius: 13px;

    color: inherit;
    text-decoration: none;

    overflow: hidden;

    transition:
        transform 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease;
}

.wiki-card:hover {
    transform: translateY(-3px);

    background: #111419;

    border-color: rgba(255, 255, 255, 0.13);
}

.wiki-card.hidden {
    display: none;
}

.wiki-card-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: #15181d;
    border: 1px solid var(--border);
    border-radius: 10px;

    color: #d8dbe0;
    font-size: 17px;
}

.wiki-card-content {
    min-width: 0;
    padding-right: 35px;
}

.wiki-card-number {
    color: #454a52;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.wiki-card h3 {
    margin: 8px 0;

    color: #e5e7ea;

    font-size: 16px;
}

.wiki-card p {
    margin: 0;

    color: #666c75;

    font-size: 11px;
    line-height: 1.6;
}

.wiki-card-arrow {
    position: absolute;

    right: 22px;
    bottom: 20px;

    color: #4d535b;

    font-size: 17px;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.wiki-card:hover .wiki-card-arrow {
    color: #ffffff;
    transform: translateX(4px);
}

/* ============================================================
   CATEGORY ARTICLES
============================================================ */

.wiki-articles {
    width: 100%;

    margin-top: 80px;

    display: flex;
    flex-direction: column;

    gap: 22px;
}

.wiki-articles.hidden {
    display: none;
}

.wiki-article {
    width: 100%;

    scroll-margin-top: 30px;

    background: #0e1013;

    border: 1px solid var(--border);
    border-radius: 15px;

    overflow: hidden;
}

.wiki-article-heading {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 27px 30px;

    border-bottom: 1px solid var(--border);
}

.wiki-article-icon {
    width: 45px;
    height: 45px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: #15181d;
    border: 1px solid var(--border);
    border-radius: 10px;

    color: #d8dbe0;
}

.wiki-article-heading h2 {
    margin: 6px 0 0;

    color: #e5e7ea;

    font-size: 21px;
    letter-spacing: -0.5px;
}

.wiki-article-body {
    width: 100%;
    max-width: 1000px;

    margin: 0 auto;
    padding: 32px;

    box-sizing: border-box;
}

.wiki-article-body > p {
    margin: 0 0 18px;

    color: #777d86;

    font-size: 13px;
    line-height: 1.8;
}

/* ============================================================
   DATABASE ARTICLES
============================================================ */

.wiki-db-article {
    width: 100%;

    padding: 24px;

    box-sizing: border-box;

    background: #0a0c0f;

    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.wiki-db-article:hover {
    background: #0d0f12;
    border-color: rgba(255, 255, 255, 0.10);
}

.wiki-db-article + .wiki-db-article {
    margin-top: 12px;
}

.wiki-db-article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}

.wiki-db-article-header h3 {
    margin: 0;

    color: #f0f1f3;

    font-size: 18px;
    line-height: 1.3;
}

.wiki-featured {
    display: inline-block;

    margin-top: 8px;
    padding: 4px 8px;

    border-radius: 5px;

    background: rgba(255, 255, 255, 0.06);

    color: #9ca3af;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 1px;
}

.wiki-db-article-content p {
    margin: 0 0 18px;

    color: #858b94;

    font-size: 13px;
    line-height: 1.75;
}

.wiki-read-article {
    display: inline-flex;
    align-items: center;

    padding: 9px 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;

    background: rgba(255, 255, 255, 0.035);

    color: #ffffff;

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.wiki-read-article:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);

    transform: translateX(2px);
}

/* ============================================================
   INFO GRID
============================================================ */

.wiki-info-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 28px;
}

.wiki-info-grid > div {
    padding: 20px;

    background: #0a0c0f;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.wiki-info-grid span {
    display: block;

    margin-bottom: 17px;

    color: #454a52;

    font-size: 9px;
    font-weight: 700;
}

.wiki-info-grid strong {
    display: block;

    color: #dfe2e6;

    font-size: 12px;
}

.wiki-info-grid p {
    margin: 8px 0 0;

    color: #5f656e;

    font-size: 10px;
    line-height: 1.6;
}

/* ============================================================
   WARNING
============================================================ */

.wiki-warning {
    display: flex;

    gap: 14px;

    margin-top: 25px;
    padding: 18px;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.wiki-warning > span {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    background: #f1f1f1;

    color: #08090b;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
}

.wiki-warning strong {
    display: block;

    margin-bottom: 5px;

    color: #dfe2e6;

    font-size: 11px;
}

.wiki-warning p {
    margin: 0;

    color: #646a73;

    font-size: 10px;
    line-height: 1.5;
}

/* ============================================================
   STEPS
============================================================ */

.wiki-steps {
    display: flex;
    flex-direction: column;
}

.wiki-steps > div {
    display: flex;

    gap: 18px;

    padding: 18px 0;

    border-bottom: 1px solid var(--border);
}

.wiki-steps > div:first-child {
    padding-top: 0;
}

.wiki-steps > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.wiki-steps > div > span {
    color: #454a52;

    font-size: 10px;
    font-weight: 700;
}

.wiki-steps strong {
    color: #dfe2e6;

    font-size: 12px;
}

.wiki-steps p {
    margin: 5px 0 0;

    color: #626872;

    font-size: 10px;
}

/* ============================================================
   FAQ
============================================================ */

.wiki-article details {
    border-bottom: 1px solid var(--border);
}

.wiki-article details:first-child {
    border-top: 1px solid var(--border);
}

.wiki-article summary {
    padding: 18px 0;

    cursor: pointer;
    list-style: none;

    color: #dfe2e6;

    font-size: 12px;
    font-weight: 600;
}

.wiki-article summary::-webkit-details-marker {
    display: none;
}

.wiki-article summary::after {
    content: "+";

    float: right;

    color: #555b64;

    font-size: 16px;
}

.wiki-article details[open] summary::after {
    content: "−";
}

.wiki-article details p {
    padding: 0 0 18px;

    color: #646a73;

    font-size: 11px;
    line-height: 1.7;
}

/* ============================================================
   ARTÍCULO INDIVIDUAL
============================================================ */

.wiki-article-page {
    width: min(100% - 40px, 920px);

    margin: 0 auto;

    padding: 130px 0 100px;

    box-sizing: border-box;
}

/* ============================================================
   ARTICLE HEADER
============================================================ */

.wiki-article-header {
    width: 100%;

    margin-bottom: 35px;

    text-align: center;
}

.wiki-back-link {
    display: inline-flex;
    align-items: center;

    margin-bottom: 28px;

    color: #858b94;

    text-decoration: none;

    font-size: 13px;

    transition: color 0.2s ease;
}

.wiki-back-link:hover {
    color: #ffffff;
}

.wiki-article-category {
    display: inline-block;

    margin-bottom: 16px;
    padding: 6px 12px;

    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;

    color: #9ca3af;

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.wiki-article-header h1 {
    max-width: 800px;

    margin: 0 auto;

    color: #ffffff;

    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -2px;
}

.wiki-article-meta {
    margin-top: 18px;

    color: #646a73;

    font-size: 12px;
}

/* ============================================================
   INDIVIDUAL ARTICLE CONTENT
============================================================ */

.wiki-article-page .wiki-article-content {
    width: 100%;

    margin: 0 auto;
    padding: 42px 48px;

    box-sizing: border-box;

    background: #0e1013;

    border: 1px solid var(--border);
    border-radius: 18px;

    color: #cdd1d6;

    font-size: 16px;
    line-height: 1.85;

    text-align: left;
}

.wiki-article-page .wiki-article-content p {
    margin: 0 0 20px;
}

.wiki-article-page .wiki-article-content p:last-child {
    margin-bottom: 0;
}

.wiki-article-page .wiki-article-content h2 {
    margin: 40px 0 15px;

    color: #ffffff;

    font-size: 27px;
    line-height: 1.25;
}

.wiki-article-page .wiki-article-content h2:first-child {
    margin-top: 0;
}

.wiki-article-page .wiki-article-content h3 {
    margin: 30px 0 12px;

    color: #ffffff;

    font-size: 21px;
    line-height: 1.3;
}

.wiki-article-page .wiki-article-content ul,
.wiki-article-page .wiki-article-content ol {
    margin: 18px 0 24px;
    padding-left: 28px;
}

.wiki-article-page .wiki-article-content li {
    margin-bottom: 9px;
}

.wiki-article-page .wiki-article-content strong {
    color: #ffffff;
}

.wiki-article-page .wiki-article-content a {
    color: #ffffff;
    text-decoration: underline;
}

.wiki-article-page .wiki-article-content code {
    padding: 3px 7px;

    background: rgba(0, 0, 0, 0.35);

    border-radius: 6px;

    color: #e5e7eb;

    font-family: monospace;
}

.wiki-article-page .wiki-article-content pre {
    max-width: 100%;

    overflow-x: auto;

    margin: 24px 0;
    padding: 20px;

    box-sizing: border-box;

    background: #050608;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.wiki-article-page .wiki-article-content pre code {
    padding: 0;
    background: transparent;
}

/* ============================================================
   TEXTO LARGO / OVERFLOW
============================================================ */

.wiki-article-page,
.wiki-article-page main,
.wiki-article-content,
.wiki-article-content p,
.wiki-article-content div,
.wiki-article-content span,
.wiki-article-content strong,
.wiki-article-content em,
.wiki-article-content a,
.wiki-article-body,
.wiki-article-body p {
    min-width: 0;
    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.wiki-article-content {
    overflow-x: hidden;
}

.wiki-article-content pre,
.wiki-article-content code {
    max-width: 100%;

    white-space: pre-wrap;

    overflow-wrap: anywhere;
    word-break: break-word;

    box-sizing: border-box;
}

.wiki-article-content img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   ARTICLE FOOTER
============================================================ */

.wiki-article-footer {
    display: flex;
    justify-content: center;

    margin-top: 30px;
}

.wiki-back-button {
    display: inline-flex;
    align-items: center;

    padding: 11px 18px;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;

    color: #ffffff;

    text-decoration: none;

    font-size: 13px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.wiki-back-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);

    transform: translateY(-1px);
}

/* ============================================================
   ARTICLE NOT FOUND
============================================================ */

.wiki-article-not-found {
    min-height: 500px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.wiki-article-not-found h1 {
    margin: 0 0 12px;

    color: #ffffff;

    font-size: 32px;
}

.wiki-article-not-found p {
    margin: 0 0 25px;

    color: #9ca3af;
}

.wiki-article-not-found .wiki-article-icon {
    margin-bottom: 20px;

    font-size: 48px;
}

/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 700px) {

    .wiki-hero {
        padding: 85px 0 60px;
    }

    .wiki-hero-content {
        width: min(100% - 24px, 820px);
    }

    .wiki-hero h1 {
        font-size: clamp(40px, 12vw, 58px);
        letter-spacing: -3px;
    }

    .wiki-hero p {
        font-size: 13px;
    }

    /* Buscador */

    .wiki-search {
        height: 54px;
        margin-top: 28px;
        padding-left: 12px;
    }

    .wiki-search-icon {
        width: 28px;
        margin-right: 5px;
        font-size: 21px;
    }

    .wiki-search input {
        padding-right: 8px;
        font-size: 13px;
    }

    .wiki-search button {
        height: 40px;
        padding: 0 15px;

        font-size: 12px;
    }

    .wiki-search-results {
        margin-top: 16px;
        padding: 17px;
    }

    .wiki-search-result {
        padding: 16px;
        gap: 12px;
    }

    .wiki-search-result h4 {
        font-size: 15px;
    }

    .wiki-search-result p {
        font-size: 11px;
    }

    /* Contenido */

    .wiki-content {
        padding: 60px 0 80px;
    }

    .wiki-content > .container {
        width: min(100% - 24px, 1180px);
    }

    .wiki-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .wiki-grid {
        grid-template-columns: 1fr;
    }

    .wiki-card {
        min-height: 150px;
    }

    .wiki-articles {
        margin-top: 55px;
    }

    .wiki-article-heading {
        padding: 22px;
    }

    .wiki-article-body {
        padding: 22px;
    }

    .wiki-db-article {
        padding: 20px;
    }

    .wiki-info-grid {
        grid-template-columns: 1fr;
    }

    /* Artículo individual */

    .wiki-article-page {
        width: min(100% - 24px, 920px);
        padding-top: 105px;
    }

    .wiki-article-header {
        margin-bottom: 25px;
    }

    .wiki-article-header h1 {
        font-size: 34px;
        letter-spacing: -1px;
    }

    .wiki-article-page .wiki-article-content {
        padding: 26px 22px;

        font-size: 15px;
        line-height: 1.75;
    }

    .wiki-article-page .wiki-article-content h2 {
        font-size: 23px;
    }

    .wiki-article-page .wiki-article-content h3 {
        font-size: 19px;
    }
}

/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 420px) {

    .wiki-hero {
        padding-top: 70px;
    }

    .wiki-hero h1 {
        letter-spacing: -2px;
    }

    .wiki-search {
        height: 52px;
    }

    .wiki-search button {
        padding: 0 12px;
    }

    .wiki-search input {
        font-size: 12px;
    }

    .wiki-card {
        padding: 19px;
    }

    .wiki-card-icon {
        width: 38px;
        height: 38px;
    }

    .wiki-article-heading {
        gap: 12px;
    }

    .wiki-article-icon {
        width: 38px;
        height: 38px;
    }

    .wiki-article-heading h2 {
        font-size: 18px;
    }

    .wiki-article-page .wiki-article-content {
        padding: 22px 18px;
    }
}