
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --background: #ffffff;
    --background-secondary: #d6dff0c8;
    --radius: 0.5rem;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}


* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--background-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

body.home-page {
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), 
                      url('./img/fondo_inicio.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }

/* --- CABECERA --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* El estilo del enlace de PharmAllele */
.logo-nav {
    text-decoration: none;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    opacity: 0.75;
}

.logo-nav:hover {
    color: #0d2592; 
}

/* El botón de volver */
.back-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-link:hover {
    color: var(--primary);
}

header {
    background-color: white; 
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}
h1 { font-family: 'Fraunces', serif; color: var(--text-primary); font-size: 2rem; }
.subtitle { color: var(--text-secondary); font-size: 1rem; }

/* --- COMPONENTES --- */
.card, .info-box, .info-card {
    background: var(--background);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.info-box { border-left: 5px solid var(--primary); }
.info-card { border-left: 5px solid #4CAF50; background: #f4fbf4; }

/* --- TABLAS --- */
table.dataTable, table { 
    border-collapse: collapse !important; 
    width: 100% !important; 
    background: white;
    margin-top: 1rem;
}
table thead th { 
    background-color: #c6d3df !important; 
    color: var(--text-primary) !important;
    padding: 16px 12px !important;
    font-weight: 700;
    border-top: 3px solid var(--primary) !important; 
    border-bottom: 1px solid var(--border) !important;
    text-transform: none;
}
table td, table th { border: 1px solid var(--border); padding: 10px; }

/* --- LISTADO DE FÁRMACOS --- */
.drugs-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.drug-item {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    border: 1px solid var(--border);
    transition: 0.2s;
    white-space: nowrap;       
    overflow: hidden;          
    text-overflow: ellipsis;   
    display: block;            
}
.drug-item:hover { background: var(--primary); color: white; }

.variant { background: #ede9fe; color: #5b21b6; padding: 3px 6px; border-radius: 5px; font-family: monospace; font-weight: bold; }
.badge { background: var(--primary); color: white; padding: 4px 12px; border-radius: 20px; font-size: 13px; text-decoration: none; font-weight: bold; display: inline-block; }
.highlight { background-color: #c8bcdb; padding: 2px 6px; border-radius: 4px; }
.btn { background: var(--primary); color: white; padding: 0.6rem 1.2rem; border-radius: var(--radius); text-decoration: none; border: none; cursor: pointer; }


#quickSearch, #liveSearch {
    width: 100%;
    padding: 0.8rem;
    #border-radius: var(--radius);
    #border: 1px solid var(--border);
    margin-bottom: 1rem;
}

footer { margin-top: 3rem; text-align: center; color: var(--text-secondary); padding: 2rem; border-top: 1px solid var(--border); }

/* --- Panel negro con la información de Level Evidence --- */
.badge[title] {
    border-bottom: 1px dotted #0369a1; 
    position: relative;
}


/* Tarjetas Evidencia Articulos */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* Tarjeta estilo PDB */
.pdb-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.pdb-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Cabecera de la tarjeta */
.card-header {
    background-color: #f6f8fa;
    padding: 10px 15px;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.evidence-id {
    font-size: 0.85rem;
    font-weight: 600;
    color: #586069;
}

.pmid-link {
    background: #004d99;
    color: white;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Cuerpo de la tarjeta */
.card-body {
    padding: 15px;
}

.card-row {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.label {
    font-weight: 700;
    color: #24292e;
    min-width: 80px;
    font-size: 0.9rem;
}

.value {
    font-size: 0.9rem;
}

/* Etiquetas de Drug y Variant */
.drug-tag {
    background: #e1f5fe;
    color: #0277bd;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.variant-tag {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Sección del resumen */
.summary-section {
    flex-direction: column;
    margin-top: 10px;
}

.summary-text {
    margin-top: 5px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    text-align: justify;
}

.btn:hover {
    filter: brightness(90%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
