﻿/* Pequeños ajustes para dar look moderno */
/* --- DEFINICIÓN DE VARIABLES DE COLOR --- */
:root {
    --color-dark: #34383d; /* Gris Oscuro Institucional */
    --color-dark-light: #e4e4e4;
    --color-wine: #611232; /* Vino Institucional */
    --color-wine-light: rgba(97, 18, 50, 0.05);
    --color-wine-hover: #4a0e26; /* Vino un poco más oscuro para hovers */
    --brand-wine: #611232;
    --brand-dark: #34383d;
    --brand-wine-light: rgba(97, 18, 50, 0.05);
    --bg-body: #f3f4f6; /* Fondo gris muy suave para contraste */
    --brand-wine-light: rgba(97, 18, 50, 0.05);
    /* Colores para el Mapa de Sitio (Estilo Flowchart) */
    --sitemap-col1: #611232; /* Vino */
    --sitemap-col2: #34383d; /* Gris Oscuro */
    --sitemap-col3: #4a0e26; /* Vino Oscuro */
    --sitemap-col4: #5a5c69; /* Gris Claro */
    --sitemap-col5: #daa505; /* Amarillo */
}

/* Buscador */
.kb-search-container {
    background: linear-gradient(135deg, var(--color-dark) 0%, #585657 100%);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.kb-search-input {
    border-radius: 50px;
    padding: 1.2rem 1.5rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 600px;
}

.kb-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-dark);
    color: white;
}

/* Tabs de Navegación */
.nav-pills-kb .nav-link {
    color: var(--color-dark);
    font-weight: 600;
    background-color: white;
    border: 1px solid #eaeaea;
    margin-right: 10px;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s;
}

    .nav-pills-kb .nav-link.active {
        background-color: var(--color-dark);
        color: white;
        border-color: var(--color-dark);
        box-shadow: 0 4px 6px rgba(43, 41, 42, 0.2);
    }

    .nav-pills-kb .nav-link i {
        margin-right: 8px;
    }

/* Tarjetas de Manuales (PDF) */
.card-manual {
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    transition: transform 0.2s !important;
    height: 100% !important;
}

    .card-manual:hover {
        transform: translateY(-3px) !important;
        border-color: var(--color-wine) !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
    }

.icon-pdf {
    font-size: 2.5rem;
    color: var(--color-wine);
    opacity: 0.8;
}

/* --- VIDEOS --- */
.video-card {
    cursor: pointer;
    transition: transform 0.2s;
}

    .video-card:hover {
        transform: scale(1.02);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

.video-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.7;
        transition: opacity 0.3s;
    }

    .video-thumbnail:hover img {
        opacity: 0.5;
    }

.play-icon {
    position: absolute;
    font-size: 3rem;
    color: white;
    opacity: 0.9;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    pointer-events: none;
    transition: transform 0.2s;
}

.video-card:hover .play-icon {
    transform: scale(1.1);
}



/* Acordeón FAQ */
.card-faq .card-header {
    background-color: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
}

.btn-faq {
    width: 100%;
    text-align: left;
    padding: 1.25rem;
    color: var(--color-dark);
    font-weight: 600;
    text-decoration: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .btn-faq:hover {
        color: white;
        background-color: rgb(93,93,93);
    }

    .btn-faq i {
        transition: transform 0.3s;
    }

    .btn-faq[aria-expanded="true"] {
        color: white;
        background-color: var(--color-dark);
    }

        .btn-faq[aria-expanded="true"] i {
            transform: rotate(180deg);
        }

/* Galería Imágenes */
.img-resource {
    border-radius: 8px;
    border: 4px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}


    .img-resource:hover {
        transform: scale(1.02);
    }

.note-toolbar {
    background-color: #fff;
}

.note-editor.error {
    border-color: #dc3545 !important;
}


/* --- NUEVOS ESTILOS: MAPA DE SITIO (Tipo Diagrama) --- */
.sitemap-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cabecera de Categoría (El cuadro grande) */
.sitemap-header {
    width: 100%;
    padding: 2rem 1rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s;
}

    .sitemap-header:hover {
        transform: translateY(-5px);
    }

    .sitemap-header i {
        font-size: 2.5rem;
        margin-bottom: 10px;
        display: block;
        opacity: 0.9;
    }

    .sitemap-header h5 {
        font-weight: 700;
        margin: 0;
        text-transform: uppercase;
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .sitemap-header small {
        opacity: 0.8;
        font-size: 0.75rem;
        display: block;
        margin-top: 5px;
    }

/* Lista de items (Las píldoras debajo) */
.sitemap-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sitemap-link {
    background-color: white; /* O un tono muy suave del color principal */
    color: var(--color-dark);
    padding: 10px 15px;
    border-radius: 50px; /* Píldora */
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border: 3px solid #e3e6f0;
    transition: all 0.2s;
    cursor: default; /* O pointer si son links reales */
    display: flex;
    align-items: center;
    justify-content: center;
}

    .sitemap-link:hover {
        background-color: var(--color-dark-light);
        border-color: var(--color-dark);
        color: var(--color-dark);
        transform: scale(1.02);
    }

    .sitemap-link i {
        font-size: 0.8rem;
        margin-right: 6px;
        opacity: 0.5;
    }


/* --- DEGRADADOS MODERNOS PARA COLUMNAS (ACTUALIZADOS) --- */
.bg-col-1 {
    background: linear-gradient(135deg, #611232 0%, #941b4b 100%);
}

.bg-col-2 {
    background: linear-gradient(135deg, #34383d 0%, #565c63 100%);
}

.bg-col-3 {
    background: linear-gradient(135deg, #4a0e26 0%, #75173c 100%);
}

.bg-col-4 {
    background: linear-gradient(135deg, #5a5c69 0%, #7c7f8f 100%);
}

.bg-col-5 {
    background: linear-gradient(135deg, #daa505 0%, #ffc107 100%);
}

/* --- DEGRADADOS MODERNOS PARA COLUMNAS --- */
/* --- DEGRADADOS INVERTIDOS --- */
.bg-col-gra-1 {
    background: linear-gradient(135deg, #941b4b 0%, #611232 100%);
}

.bg-col-gra-2 {
    background: linear-gradient(135deg, #565c63 0%, #34383d 100%);
}

.bg-col-gra-3 {
    background: linear-gradient(135deg, #75173c 0%, #4a0e26 100%);
}

.bg-col-gra-4 {
    background: linear-gradient(135deg, #7c7f8f 0%, #5a5c69 100%);
}

.bg-col-gra-5 {
    background: linear-gradient(135deg, #ffc107 0%, #daa505 100%);
}

/* Conectores visuales (Opcional, línea sutil) */
.sitemap-header-tree::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    width: 2px;
    height: 1.5rem;
    background-color: #e3e6f0;
    z-index: -1;
}


/* --- ESTILOS DE DIAGRAMA DE ROLES (NUEVO) --- */
.role-diagram-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*padding: 2.5rem;
            background-color: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);*/
    margin-bottom: 2rem;
    /*border: 1px solid #eaeaea;*/
}

.role-box {
    /* background: white;*/
    border-radius: 50px; /* Píldora */
    padding: 12px 30px;
    min-width: 320px;
    text-align: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .role-box:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }

    .role-box i {
        margin-right: 20px;
        font-size: 2rem;
        opacity: 0.9;
        min-width: 40px;
        text-align: center;
    }

.role-title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.role-desc {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.9;
    display: block;
    line-height: 1.3;
}

.role-connector {
    height: 25px;
    width: 2px;
    background-color: #d1d3e2;
    position: relative;
}

    .role-connector::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: -3px;
        width: 8px;
        height: 8px;
        background-color: #d1d3e2;
        border-radius: 50%;
    }

/* --- ESTILOS DE SKELETON LOADING (NUEVO) --- */
.skeleton-loader {
    background-color: #f0f0f0;
    /* Gradiente animado */
    background-image: linear-gradient( 90deg, #f0f0f0 0px, #e8e8e8 50%, #f0f0f0 100% );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    opacity: 1; /* Asegurar visibilidad durante carga */
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}


.card {
    border: none;
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

    .card:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
}

/* Bordes superiores de color para identificar tipos de indicadores */
.card-border-wine {
    border-top: 4px solid var(--color-wine);
}

.card-border-dark {
    border-top: 4px solid var(--color-dark);
}

/* --- ESTILOS PARA DESCRIPCIONES --- */
.chart-description {
    font-size: 0.85rem;
    color: #5a5c69;
    background-color: #f8f9fc;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid var(--color-wine);
    line-height: 1.4;
}

    .chart-description i {
        color: var(--color-wine);
        margin-right: 8px;
    }


/* --- BOTONES --- */
.btn-brand {
    background-color: var(--brand-wine);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.35rem;
    transition: all 0.3s;
}

    .btn-brand:hover {
        background-color: #4a0d26;
        color: white;
        transform: translateY(-1px);
    }

/* --- CALENDARIO GRID SYSTEM --- */

/* Contenedor para los Días (Cuerpo) */
.calendar-wrapper {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 columnas iguales */
    gap: 12px;
}

/* Contenedor principal donde inyectas htmlTr */
#calendar-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background-color: #eee;
    padding: 10px;
}

/* El título del mes y la fila de nombres deben ocupar las 7 columnas */
.month-separator,
.calendar-headers-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Sub-cuadrícula de 7 */
}

.month-separator {
    background: #343a40;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
}

.day-name-header {
    text-align: center;
    font-weight: 700;
    color: var(--brand-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-wine);
}

.day-card {
    background: white;
    min-height: 100px;
    border: 1px solid #ddd;
    padding: 5px;
}

.empty-offset {
    background: #fafafa;
    border: 1px dashed #eee;
}

/* --- TARJETAS DE DÍA --- */
.day-card {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

    .day-card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.10);
        transform: translateY(-2px);
        border-color: var(--brand-wine);
        z-index: 5;
    }

    /* Días vacíos (sin visitas o días de otro mes) */
    .day-card.empty-state {
        background-color: #fcfcfc;
        border-style: dashed;
    }

    /* Días deshabilitados (offset inicial/final) */
    .day-card.offset-day {
        background-color: #f8f9fa;
        border: none;
        opacity: 0.5;
    }

.day-header {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f8f9fa;
    background-color: #fff;
}

.day-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-wine);
}

.total-badge {
    font-size: 0.70rem;
    background-color: var(--brand-dark);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-align: end;
}

    .total-badge.no-data {
        background-color: #e9ecef;
        color: #6c757d;
    }

.day-body {
    padding: 8px 10px;
    font-size: 0.75rem;
    flex-grow: 1;
}

/* Lista interna de regiones */
.region-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    color: #555;
}

.region-val {
    font-weight: 700;
    color: var(--brand-dark);
}

/* Barras de progreso mini */
.progress-mini {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 6px;
}

.progress-bar-wine {
    background-color: var(--brand-wine);
}

.progress-bar-success {
    background-color: #4caf50;
}

.progress-bar-error {
    background-color: #ce2519;
}

.nav-pills .nav-link {
    color: var(--color-dark);
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    margin-right: 0.5rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    cursor: pointer;
}

    .nav-pills .nav-link.active {
        background-color: var(--color-dark);
        color: white !important; /* Importante para sobreescribir estilos base */
        box-shadow: 0 4px 6px rgba(52,56,61, 0.3);
        border-color: var(--color-dark);
    }

    .nav-pills .nav-link:hover:not(.active) {
        background-color: #e9ecef;
    }


/* --- ESTILOS PARA LA SECCIÓN DE RECONOCIMIENTOS --- */
.winner-card {
    background: #fff;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

    .winner-card:hover {
        transform: translateY(-5px);
    }

.winner-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Modificado para foto vertical y bordes redondeados */
.winner-avatar {
    width: auto;
    height: auto; /* Altura mayor para formato retrato */
    max-width: 150px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 15px; /* Bordes redondeados suaves, no circulares */
}

.winner-icon {
    position: absolute;
    bottom: -5px; /* Ajustado para el borde cuadrado */
    right: -5px; /* Ajustado para el borde cuadrado */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.winner-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    /* Ocultar encabezados en móvil */
    .calendar-wrapper {
        grid-template-columns: 1fr;
    }
    /* Lista vertical en móvil */
    .day-card.offset-day {
        display: none;
    }
    /* Ocultar días vacíos en móvil */
    .day-card {
        min-height: auto;
        margin-bottom: 10px;
    }
}
