/* templates/default/css/info.css */

/* --- FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Cinzel:wght@400;500;700;900&display=swap');

:root {
    /* Paleta basada en "Balduneta Style" */
    --info-orange: #ff6600;
    --info-orange-grad-start: #ff7700;
    --info-orange-grad-end: #ff4400;
    --info-bg-dark: #0d0c11; 
    --info-bg-card: rgba(13, 12, 17, 0.9);
    --info-border: rgba(255, 102, 0, 0.25);
    --info-text-main: #eee;
    --info-text-muted: #8a8f9d;
    --info-radius: 15px;
}

/* --- HEADER DE LA SECCIÓN (Referencia Exacta) --- */
.rank-header {
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.rank-title {
    font-family: 'Cinzel', serif !important;
    color: #ff6600 !important;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.4);
    margin-bottom: 5px;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
}

.rank-subtitle {
    font-family: 'Poppins', sans-serif;
    color: #8a8f9d;
    font-size: 1.1rem;
    margin-bottom: 40px;
    text-align: center;
}

/* --- CONTENEDOR PRINCIPAL (LAYOUT) --- */
.info-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
    position: relative;
    z-index: 2;
}

/* --- SIDEBAR (MENÚ IZQUIERDO) --- */
.info-sidebar {
    width: 280px;
    flex-shrink: 0;
    /* Estilo basado en .rank-table-card */
    background: var(--info-bg-card);
    border: 1px solid var(--info-border);
    border-radius: var(--info-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    padding: 10px;
}

.info-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Items del menú estilo .rank-nav-btn */
.info-menu li {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 102, 0, 0.1); /* Borde sutil */
    border-radius: 8px;
    color: var(--info-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-menu li i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--info-orange);
    transition: 0.3s;
}

/* Hover y Active (Estilo Gradiente Naranja) */
.info-menu li:hover, 
.info-menu li.active {
    background: linear-gradient(135deg, var(--info-orange-grad-start) 0%, var(--info-orange-grad-end) 100%);
    border-color: transparent;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 102, 0, 0.4);
}

.info-menu li:hover i, 
.info-menu li.active i {
    color: #fff;
}

/* --- ÁREA DE CONTENIDO (DERECHA) --- */
.info-content {
    flex-grow: 1;
    /* Estilo basado en .rank-table-card */
    background: var(--info-bg-card);
    border: 1px solid var(--info-border);
    border-radius: var(--info-radius);
    padding: 30px;
    min-height: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    color: var(--info-text-main);
    width: 100%;
}

/* --- ESTILOS INTERNOS DEL CONTENIDO (Títulos y Texto) --- */

/* Títulos H1-H3 dentro de la info (Estilo Cinzel/Naranja) */
.info-content h1, 
.info-content h2, 
.info-content h3 {
    font-family: 'Cinzel', serif;
    color: var(--info-orange);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a1a1a; /* Línea oscura como en el thead */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Párrafos */
.info-content p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* --- TABLAS (Estilo .custom-balduneta-table) --- */
.info-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: transparent;
}

.info-content th, 
.info-content td {
    padding: 15px 10px;
    vertical-align: middle;
    text-align: left;
}

/* Encabezados de tabla */
.info-content th {
    font-family: 'Cinzel', serif;
    color: var(--info-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 20px 10px;
    border-bottom: 2px solid #1a1a1a;
    background: transparent;
}

/* Celdas de tabla */
.info-content td {
    color: #eee;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.info-content tr:hover td {
    background: rgba(255, 102, 0, 0.05); /* Sutil brillo naranja al hover */
}

/* --- LISTAS INTERNAS --- */
.info-content ul {
    list-style: none;
    padding-left: 0;
}

.info-content ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.info-content ul li::before {
    content: "•";
    color: var(--info-orange);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 4px;
}

/* --- ESTADÍSTICAS (JS GENERADO) --- */

/* Gráfico */
#charsChart {
    max-height: 300px;
    margin-bottom: 30px;
}

/* Tarjetas de Personajes (Círculos) */
#info-load-area > div[style*="display:flex"] > div {
    /* Contenedor individual de cada PJ */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 102, 0, 0.1);
    border-radius: 12px;
    padding: 15px;
    width: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#info-load-area > div[style*="display:flex"] > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 102, 0, 0.2);
    border-color: var(--info-orange);
}

/* Ajuste específico para las imágenes circulares de los PJs */
#info-load-area > div > div > div:first-child {
    border: 2px solid var(--info-orange) !important; /* Borde naranja forzado */
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3) !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .info-container {
        flex-direction: column;
    }
    
    .info-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* En móvil el menú se hace scroll horizontal */
    .info-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 10px;
    }
    
    .info-menu li {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Scrollbar invisible pero funcional */
    .info-menu::-webkit-scrollbar { height: 4px; }
    .info-menu::-webkit-scrollbar-thumb { background: var(--info-orange); border-radius: 2px; }
}

@media (max-width: 768px) {
    .rank-title { 
        font-size: 2rem; 
    }
    
    .info-content {
        padding: 15px;
    }
    
    /* Ajuste para tarjetas de PJ en móvil */
    #info-load-area > div[style*="display:flex"] {
        gap: 10px !important;
    }
    
    #info-load-area > div[style*="display:flex"] > div {
        width: 45%; /* 2 por fila en móvil */
    }
}