/*
 * Estilos para el componente Article Card y el panel de la Wiki.
 */

/* Regla específica para eliminar el subrayado del enlace */
a.article-card, a.article-card:hover,
div.article-card, div.article-card:hover {
    text-decoration: none;
}

.article-card {
    display: block;
    position: relative;
    background-color: #ffffff;
    border: 2px solid #eff2f5;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 100%;
    cursor: pointer;
}

.article-card::after {
    content: ''; position: absolute; top: -20px; right: -20px; width: 60px; height: 60px;
    background-color: var(--card-hover-bg, #009ef7); border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); z-index: 0;
}

.article-card__body {
    padding: 1.5rem; position: relative; z-index: 2; flex-grow: 1; display: flex;
    flex-direction: column; justify-content: center;
}

.article-card__title {
    font-size: 1.25rem; font-weight: 600; color: #181C32; margin: 0;
    transition: color 0.1s ease-in-out;
}

.article-card__excerpt {
    font-size: 0.95rem; color: #5e6278; line-height: 1.6; margin: 0;
    transition: color 0.1s ease-in-out;
}

.article-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
}

.article-card:hover::after { transform: scale(15); }

.article-card:hover .article-card__title,
.article-card:hover .article-card__excerpt,
.article-card:hover .article-card__icon {
    color: #ffffff;
}

/* --- Estilos del Icono Indicador --- */
.article-card__indicator {
    position: absolute; bottom: 1rem; right: 1.5rem; color: #a1a5b7;
    transition: color 0.3s ease-in-out 0.1s, transform 0.3s ease; z-index: 3;
}
.article-card .icon-close { display: none; }
.article-card .icon-open { display: inline-block; }
.article-card:not(.collapsed) { border-color: var(--card-hover-bg, #009ef7); }
.article-card:not(.collapsed) .icon-open { display: none; }
.article-card:not(.collapsed) .icon-close { display: inline-block; }
.article-card:hover .article-card__indicator { color: #ffffff; }

/* --- Estilos para las Pestañas Tematizadas --- */
.wiki-panel .nav-tabs .nav-link { transition: color 0.2s ease, border-color 0.2s ease; }
.wiki-panel .nav-tabs .nav-link.active,
.wiki-panel .nav-tabs .nav-item.show .nav-link {
    color: var(--panel-theme-color); border-bottom-color: var(--panel-theme-color);
}
.wiki-panel .nav-tabs .nav-link:not(.active):hover { color: var(--panel-theme-color); }

/* --- Estilos para el Icono de la Tarjeta --- */
.article-card__icon {
    color: var(--card-hover-bg, #009ef7);
    transition: color 0.3s ease-in-out 0.1s;
}

/* --- INICIO DE LA NUEVA MEJORA: BUSCADOR CON BORDE COMPLETO --- */
.wiki-search-input {
    /* Devolvemos los estilos base de un form-control pero con nuestro color */
    border: 1px solid var(--panel-theme-color);
    background-color: #f5f8fa; /* Fondo gris claro por defecto */
    border-radius: 0.475rem; /* El radio de borde estándar del tema */
    box-shadow: none !important; /* Nos aseguramos de que no tenga sombras por defecto */
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, background-color .15s ease-in-out;
}

.wiki-panel .wiki-search-input:focus {
    background-color: #ffffff; /* Fondo blanco al hacer foco */
    border-color: var(--panel-theme-color); /* Mantenemos el color del borde */
    box-shadow: 0 0 0 0.25rem var(--panel-theme-color)33; /* Añadimos el "glow" */
}
/* --- FIN DE LA NUEVA MEJORA --- */

/* --- Estilos para el Resaltado de Búsqueda --- */
.wiki-panel mark {
    background-color: #ffc700; /* Un amarillo más estándar para el resaltado */
    color: #181C32;
    padding: 2px 4px;
    border-radius: 3px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Proporción 16:9 (9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}