/* =========================================================
   WIKI
   ESTILOS PRINCIPALES
========================================================= */
/* =========================================================
   CUERPO
========================================================= */
.wiki-body {
    min-height: 100vh;
}
/* =========================================================
   ESTRUCTURA GENERAL
========================================================= */
.wiki-layout {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding:
        125px
        30px
        30px;
    display: grid;
    grid-template-columns:
        280px
        minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}
/* =========================================================
   SIDEBAR
========================================================= */
.wiki-sidebar {
    width: 100%;
    background:
        rgba(14, 11, 10, 0.94);
    border:
        1px solid
        rgba(174, 72, 38, 0.25);
    border-radius: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    position: sticky;
    top: 110px;
    align-self: start;
    max-height: calc(100vh - 130px);
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #5c2119 #14100e;
}
.wiki-sidebar-header {
    padding:
        18px
        20px;
    border-bottom:
        1px solid
        rgba(174, 72, 38, 0.25);
    background:
        rgba(29, 22, 19, 0.95);
}
.wiki-sidebar-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
/* =========================================================
   NAVEGACIÓN
========================================================= */
.wiki-nav {
    display: flex;
    flex-direction: column;
}
.wiki-nav a,
.wiki-group summary {
    color: inherit;
    text-decoration: none;
}
.wiki-group {
    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.06);
}
.wiki-group:last-child {
    border-bottom: none;
}
/* =========================================================
   GRUPOS
========================================================= */
.wiki-group summary {
    min-height: 48px;
    padding:
        13px
        18px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    transition:
        background 0.2s ease,
        padding-left 0.2s ease;
}
.wiki-group summary::-webkit-details-marker {
    display: none;
}
.wiki-group summary:hover {
    background:
        rgba(255, 255, 255, 0.05);
    padding-left: 22px;
}
.wiki-group[open] summary {
    background:
        rgba(174, 72, 38, 0.08);
}
/* enlace con el mismo aspecto que un titulo de grupo (diamante + texto), p. ej. "Set" dentro de Items */
.wiki-group-items a.wiki-top-link {
    min-height: 48px;
    padding: 13px 18px;
    font-size: inherit;
    gap: 10px;
}
.wiki-group-items a.wiki-top-link:hover {
    padding-left: 22px;
}
/* =========================================================
   ICONOS
========================================================= */
.wiki-icon {
    width: 22px;
    min-width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
/* =========================================================
   ELEMENTOS INTERNOS
========================================================= */
.wiki-group-items {
    padding:
        4px
        0
        8px
        0;
    background:
        rgba(0, 0, 0, 0.18);
}
.wiki-group-items a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding:
        9px
        18px
        9px
        48px;
    font-size: 14px;
    border-left:
        2px solid
        transparent;
    transition:
        background 0.2s ease,
        padding-left 0.2s ease,
        border-color 0.2s ease;
}
.wiki-group-items a:hover {
    background:
        rgba(255, 255, 255, 0.05);
    padding-left: 53px;
}
.wiki-group-items a.active {
    background:
        rgba(174, 72, 38, 0.10);
    border-left-color:
        #c04428;
}
/* =========================================================
   CONTENIDO
========================================================= */
.wiki-content {
    min-width: 0;
    width: 100%;
}
.wiki-article {
    width: 100%;
    background:
        rgba(14, 11, 10, 0.90);
    border:
        1px solid
        rgba(174, 72, 38, 0.22);
    border-radius: 6px;
    overflow: hidden;
    padding:
        30px
        35px;
}
/* =========================================================
   TITULOS
========================================================= */
.wiki-article h1 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 36px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}
.wiki-article h2 {
    margin-top: 40px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    font-size: 25px;
    font-weight: 600;
    border-bottom:
        1px solid
        rgba(174, 72, 38, 0.25);
}
.wiki-article p {
    line-height: 1.7;
}
/* =========================================================
   LÍNEA SUPERIOR
========================================================= */
.wiki-topline {
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c04428;
    font-weight: 700;
}
/* =========================================================
   PERSONAJE
   FONDO COMPLETO
========================================================= */
.wiki-character-page {
    position: relative;
    min-height: 1000px;
    overflow: hidden;
    background:
        transparent;
}
/* =========================================================
   IMAGEN DEL PERSONAJE
========================================================= */
.wiki-character-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        var(--character-bg);
    background-repeat:
        no-repeat;
    background-position:
        center top;
    background-size:
        contain;
    z-index: 0;
}
/* =========================================================
   CAPA OSCURA
========================================================= */
.wiki-character-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.08) 35%,
            rgba(0, 0, 0, 0.20) 65%,
            rgba(0, 0, 0, 0.55) 100%
        );
    z-index: 1;
}
/* =========================================================
   CONTENIDO DEL PERSONAJE
========================================================= */
.wiki-character-content {
    position: relative;
    z-index: 2;
    padding:
        40px;
    background:
        transparent;
}
/* =========================================================
   TITULO DEL PERSONAJE
========================================================= */
.wiki-character-content h1 {
    margin-top: 0;
    margin-bottom: 35px;
    font-size: 42px;
    font-weight: 600;
    letter-spacing: 1px;
}
/* =========================================================
   CONTENIDO HTML
========================================================= */
.wiki-character-content .wiki-html {
    width: 100%;
    background:
        transparent;
}
/* =========================================================
   HABILIDADES
========================================================= */
.skill-block {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
    padding: 18px;
    background:
        rgba(14, 11, 10, 0.68);
    border:
        1px solid
        rgba(174, 72, 38, 0.18);
    border-radius: 5px;
}
.skill-icon {
    width: 64px;
    min-width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.skill-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.skill-body {
    flex: 1;
    min-width: 0;
}
.skill-name {
    margin:
        0
        0
        8px;
    font-size: 18px;
    font-weight: 600;
}
.skill-desc p {
    margin:
        4px
        0;
}
/* =========================================================
   TABLAS
========================================================= */
.wiki-html table {
    width: 100%;
    border-collapse: collapse;
    margin:
        25px
        0;
}
.wiki-html th,
.wiki-html td {
    padding:
        10px
        12px;
    border:
        1px solid
        rgba(255, 255, 255, 0.10);
    text-align: left;
}
.wiki-html th {
    background:
        rgba(255, 255, 255, 0.06);
}
/* =========================================================
   IMAGENES DENTRO DE LA WIKI
========================================================= */
.wiki-html img {
    max-width: 100%;
    height: auto;
}
/* =========================================================
   ENLACES
========================================================= */
.wiki-content a {
    text-decoration: none;
}
.wiki-content a:hover {
    text-decoration: underline;
}
/* =========================================================
   PAGINA PRINCIPAL
========================================================= */
.wiki-home {
    margin-top: 35px;
}
.wiki-home-section {
    margin-bottom: 45px;
}
.wiki-home-section h2 {
    margin-top: 0;
}
/* =========================================================
   GRID DE TARJETAS
========================================================= */
.wiki-home-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px, 1fr)
        );
    gap: 15px;
}
/* =========================================================
   TARJETAS
========================================================= */
.wiki-card {
    min-height: 110px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    background:
        rgba(29, 22, 19, 0.90);
    border:
        1px solid
        rgba(174, 72, 38, 0.20);
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}
.wiki-card:hover {
    transform:
        translateY(-3px);
    background:
        rgba(40, 26, 21, 0.95);
    border-color:
        rgba(174, 72, 38, 0.50);
}
.wiki-card-icon {
    font-size: 25px;
}
.wiki-card-title {
    font-size: 15px;
    font-weight: 600;
}
/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
    .wiki-layout {
        grid-template-columns: 1fr;
        padding:
            115px
            20px
            20px;
        gap: 20px;
    }
    .wiki-sidebar {
        position: static;
    }
    .wiki-character-page {
        min-height: 900px;
    }
    .wiki-character-content {
        padding:
            28px
            25px;
    }
}
@media (max-width: 600px) {
    .wiki-layout {
        padding:
            105px
            12px
            12px;
    }
    .wiki-character-page {
        min-height: 800px;
    }
    .wiki-character-content {
        padding:
            22px
            18px;
    }
    .wiki-character-content h1 {
        font-size: 30px;
    }
    .wiki-home-grid {
        grid-template-columns: 1fr;
    }
    .skill-block {
        gap: 12px;
        padding: 14px;
    }
    .skill-icon,
    .skill-icon img {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }
}