/* ============================================================
   Prospectos.org — Hoja de estilos principal
   Paleta: #0057B8 (primario), #f0f6ff (fondo suave), grises
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1a2332;
    background: #f4f7fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #0057B8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

main { flex: 1; }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e1e8f0;
    padding: 10px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 87, 184, 0.06);
}

.site-header .container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #0057B8;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.site-logo:hover { text-decoration: none; color: #003f8a; }

.site-tagline {
    font-size: 12px;
    color: #8899aa;
    margin: 0;
}

.header-search-panel {
    display: none;
    background: #fff;
    border-top: 1px solid #e1e8f0;
    padding: 10px 16px;
    box-shadow: 0 4px 12px rgba(0, 87, 184, 0.08);
}

.header-search-panel.open {
    display: flex;
    align-items: center;
}

.header-search-panel .search-compact {
    flex: 1;
    max-width: 640px;
    margin: 0 auto;
}

/* ---------- Hero / Search area ---------- */
.hero {
    background: linear-gradient(135deg, #0057B8 0%, #0078d4 100%);
    padding: 56px 0 48px;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.hero p {
    color: rgba(255,255,255,0.82);
    font-size: 16px;
    margin-bottom: 28px;
}

/* Search form - hero variant */
.search-form {
    display: flex;
    max-width: 580px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.search-form input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: none;
    outline: none;
    color: #1a2332;
    background: #fff;
}

.search-form input[type="text"]::placeholder { color: #9ba8b7; }

.search-form button[type="submit"] {
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    background: #003f8a;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.search-form button[type="submit"]:hover { background: #002d66; }

.search-clear {
    display: inline-block;
    margin-top: 14px;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    text-decoration: underline;
}

.search-clear:hover { color: #fff; }

/* Search form - compact (inside header) */
.search-compact {
    flex: 1;
    display: flex;
    max-width: 440px;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    overflow: hidden;
}

.search-compact input[type="text"] {
    flex: 1;
    padding: 7px 12px;
    font-size: 14px;
    border: none;
    outline: none;
    color: #1a2332;
    background: #fff;
    min-width: 0;
}

.search-compact button[type="submit"] {
    padding: 7px 14px;
    font-size: 14px;
    background: #0057B8;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.search-compact button[type="submit"]:hover { background: #003f8a; }

/* ---------- Section wrapper ---------- */
.section {
    padding: 36px 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    font-size: 13px;
    color: #6b7d94;
    margin-bottom: 20px;
}

.breadcrumb a { color: #0057B8; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: #c0ccda; }

/* ---------- Page title ---------- */
.page-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.page-subtitle {
    color: #6b7d94;
    font-size: 14px;
    margin-bottom: 24px;
}

/* ---------- Search results info ---------- */
.results-info {
    padding: 12px 0 8px;
    font-size: 14px;
    color: #6b7d94;
    border-bottom: 1px solid #e1e8f0;
    margin-bottom: 16px;
}

.results-info strong { color: #1a2332; }

/* ---------- Medication list ---------- */
.med-list { list-style: none; }

.med-list-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: box-shadow 0.15s, border-color 0.15s;
    gap: 14px;
}

.med-list-item:hover {
    box-shadow: 0 2px 12px rgba(0, 87, 184, 0.10);
    border-color: #b3c8e8;
}

.med-list-item a {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #1a2332;
    min-width: 0;
}

.med-list-item a:hover { color: #0057B8; text-decoration: none; }

.med-list-item .lab-count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #0057B8;
    background: #e8f0fb;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.med-list-item .arrow {
    flex-shrink: 0;
    color: #c0ccda;
    font-size: 16px;
    transition: transform 0.15s, color 0.15s;
}

.med-list-item:hover .arrow { transform: translateX(3px); color: #0057B8; }

/* ---------- Empty / no results ---------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e1e8f0;
    color: #6b7d94;
}

.empty-state .icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }
.empty-state strong { color: #1a2332; }

/* ---------- Info note ---------- */
.info-note {
    margin-top: 32px;
    padding: 14px 18px;
    background: #f0f6ff;
    border-radius: 8px;
    border-left: 3px solid #0057B8;
    font-size: 13px;
    color: #4a6080;
}

/* ---------- AI Content card ---------- */
.content-card {
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}

.content-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f7faff;
    border-bottom: 1px solid #e1e8f0;
}

.content-card-header .icon {
    width: 32px;
    height: 32px;
    background: #0057B8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.content-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a2332;
    margin: 0;
}

.content-card-body { padding: 18px 20px; }

.content-card-body p {
    font-size: 15px;
    color: #2c3e52;
    line-height: 1.7;
    margin-bottom: 10px;
}

.content-card-body p:last-child { margin-bottom: 0; }

/* ---------- Section nav (efectos, dosis, etc.) ---------- */
.section-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

.section-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1a2332;
    transition: all 0.15s;
}

.section-nav-link:hover {
    background: #f0f6ff;
    border-color: #b3c8e8;
    color: #0057B8;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 87, 184, 0.08);
}

.section-nav-link .icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ---------- Presentations section ---------- */
.presentations-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.presentations-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a2332;
}

.stat-pill {
    font-size: 12px;
    font-weight: 600;
    color: #6b7d94;
    background: #f0f3f7;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ---------- Filters bar ---------- */
.filters-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8899aa;
}

.filter-group select {
    padding: 7px 10px;
    font-size: 14px;
    color: #1a2332;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: auto;
}

.filter-group select:focus { border-color: #0057B8; }

.btn-reset {
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    background: #f0f3f7;
    color: #6b7d94;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    align-self: flex-end;
    white-space: nowrap;
}

.btn-reset:hover { background: #e1e8f0; color: #1a2332; border-color: #b3c8e8; }

.filter-count {
    width: 100%;
    font-size: 12px;
    color: #0057B8;
    font-weight: 500;
    min-height: 16px;
}

/* ---------- Presentation group ---------- */
.pres-section { margin-bottom: 30px; }

.pres-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6b7d94;
    padding: 10px 0 10px;
    border-bottom: 2px solid #e1e8f0;
    margin-bottom: 14px;
}

/* ---------- Medication card (in group) ---------- */
.med-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.med-card {
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.med-card:hover {
    box-shadow: 0 2px 12px rgba(0, 87, 184, 0.09);
    border-color: #b3c8e8;
}

.med-card-lab {
    font-size: 15px;
    font-weight: 600;
    color: #0057B8;
    margin-bottom: 6px;
}

.med-card-name {
    font-size: 13px;
    color: #4a6080;
    margin-bottom: 10px;
    line-height: 1.4;
}

.med-card-meta {
    font-size: 12px;
    color: #8899aa;
    margin-bottom: 10px;
}

.med-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-blue    { background: #dbeafe; color: #1d4ed8; }
.badge-orange  { background: #fef3c7; color: #92400e; }
.badge-green   { background: #d1fae5; color: #065f46; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-gray    { background: #f0f3f7; color: #6b7d94; }

/* ---------- Prospecto link ---------- */
.prospecto-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #0057B8;
    border-top: 1px solid #f0f3f7;
    padding-top: 10px;
    width: 100%;
}

.prospecto-link:hover { color: #003f8a; text-decoration: none; }

/* ---------- Disclaimer ---------- */
.disclaimer {
    margin-top: 32px;
    padding: 14px 18px;
    background: #f7faff;
    border-radius: 8px;
    border: 1px solid #e1e8f0;
    font-size: 12px;
    color: #8899aa;
    line-height: 1.6;
}

/* ---------- Footer ---------- */
.site-footer {
    background: #fff;
    border-top: 1px solid #e1e8f0;
    padding: 20px 0;
    margin-top: 48px;
    text-align: center;
    font-size: 13px;
    color: #8899aa;
    line-height: 1.8;
}

.site-footer a { color: #0057B8; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Info pages ---------- */
.info-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    align-items: start;
    padding: 40px 0;
}

.info-sidebar {
    position: sticky;
    top: 76px;
}

.info-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8899aa;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e8f0;
}

.info-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-sidebar-nav li { margin-bottom: 4px; }

.info-sidebar-nav a {
    display: block;
    padding: 7px 10px;
    font-size: 13px;
    color: #4a6080;
    border-radius: 6px;
    transition: all 0.15s;
}

.info-sidebar-nav a:hover {
    background: #f0f6ff;
    color: #0057B8;
    text-decoration: none;
}

.info-sidebar-nav a.active {
    background: #e8f0fb;
    color: #0057B8;
    font-weight: 600;
}

.info-content h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 6px;
    letter-spacing: -0.4px;
}

.info-content .info-updated {
    font-size: 12px;
    color: #8899aa;
    margin-bottom: 28px;
    display: block;
}

.info-content h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a2332;
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e1e8f0;
}

.info-content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a2332;
    margin: 18px 0 6px;
}

.info-content p {
    font-size: 14px;
    color: #4a6080;
    line-height: 1.75;
    margin-bottom: 12px;
}

.info-content ul, .info-content ol {
    font-size: 14px;
    color: #4a6080;
    line-height: 1.75;
    padding-left: 20px;
    margin-bottom: 12px;
}

.info-content ul li, .info-content ol li { margin-bottom: 4px; }

.info-content a { color: #0057B8; }
.info-content a:hover { text-decoration: underline; }

.info-content .highlight-box {
    padding: 16px 18px;
    background: #f0f6ff;
    border-left: 3px solid #0057B8;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 14px;
    color: #2c3e52;
    line-height: 1.7;
}

.info-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 16px 0 20px;
}

.info-content table th {
    background: #f7faff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: #1a2332;
    border-bottom: 2px solid #e1e8f0;
}

.info-content table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f3f7;
    color: #4a6080;
    vertical-align: top;
}

.info-content table tr:last-child td { border-bottom: none; }

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.contact-form label {
    font-size: 13px;
    font-weight: 600;
    color: #1a2332;
    display: block;
    margin-bottom: 5px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    color: #1a2332;
    background: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: #0057B8; }

.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-form .form-hint {
    font-size: 12px;
    color: #8899aa;
    margin-top: 3px;
}

.btn-primary {
    display: inline-block;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #0057B8;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-start;
}

.btn-primary:hover { background: #003f8a; }

@media (max-width: 768px) {
    .info-layout { grid-template-columns: 1fr; }
    .info-sidebar { position: static; }
}

/* ---------- Home: secciones informativas ---------- */
.home-sections {
    background: #fff;
    border-top: 1px solid #e1e8f0;
    padding: 56px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.section-lead {
    font-size: 15px;
    color: #6b7d94;
    margin-bottom: 32px;
    max-width: 560px;
}

/* Feature grid (¿Qué hacemos?) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 56px;
}

.feature-card {
    padding: 22px 20px;
    background: #f7faff;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
}

.feature-card .feat-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    color: #6b7d94;
    line-height: 1.6;
}

/* About section (¿Quiénes somos?) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.about-text p {
    font-size: 14px;
    color: #4a6080;
    line-height: 1.75;
    margin-bottom: 12px;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trust-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f7faff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
}

.trust-badge .tb-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.trust-badge h4 {
    font-size: 13px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 2px;
}

.trust-badge p {
    font-size: 12px;
    color: #6b7d94;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 640px) {
    .about-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer corporativo ---------- */
.site-footer {
    background: #1a2332;
    border-top: none;
    padding: 0;
    margin-top: 0;
    text-align: left;
    font-size: 13px;
    color: #8899aa;
    line-height: 1.8;
}

.footer-main {
    padding: 40px 0 32px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand .footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 13px;
    color: #8899aa;
    line-height: 1.6;
    max-width: 280px;
}

.footer-trust {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #a0b4cc;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fff;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #8899aa;
    font-size: 13px;
    transition: color 0.15s;
}

.footer-col ul li a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #4a6080;
}

.footer-bottom a { color: #4a6080; }
.footer-bottom a:hover { color: #8899aa; text-decoration: none; }

@media (max-width: 640px) {
    .footer-main { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---------- Cookie consent banner ---------- */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1a2332;
    color: #c8d5e4;
    border-top: 2px solid #0057B8;
    padding: 16px 24px;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.show-cookie-banner #cookie-banner { display: flex; }

#cookie-banner p {
    flex: 1;
    min-width: 220px;
    margin: 0;
}

#cookie-banner a {
    color: #6aabff;
    text-decoration: underline;
}

#cookie-banner a:hover { color: #9cc9ff; }

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.cookie-btn-accept {
    background: #0057B8;
    color: #fff;
}

.cookie-btn-accept:hover { background: #003f8a; }

.cookie-btn-reject {
    background: transparent;
    color: #8899aa;
    border: 1px solid rgba(136, 153, 170, 0.4);
}

.cookie-btn-reject:hover { color: #c8d5e4; border-color: #8899aa; }

@media (max-width: 480px) {
    #cookie-banner { padding: 14px 16px; gap: 14px; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; text-align: center; }
}

/* ---------- Info blocks (efectos, dosis, etc.) ---------- */
.info-block {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.info-block h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.info-block p, .info-block ul { font-size: 14px; line-height: 1.7; color: #2c3e52; }
.info-block ul { padding-left: 18px; margin: 0; }
.info-block ul li { margin: 4px 0; }

.info-block-red    { background: #fff5f5; border-color: #fca5a5; }
.info-block-red h3 { color: #991b1b; }

.info-block-orange    { background: #fffbeb; border-color: #fcd34d; }
.info-block-orange h3 { color: #92400e; }

.info-block-yellow    { background: #fefce8; border-color: #fde68a; }
.info-block-yellow h3 { color: #78350f; }

.info-block-purple    { background: #faf5ff; border-color: #d8b4fe; }
.info-block-purple h3 { color: #6b21a8; }

.info-block-blue    { background: #eff6ff; border-color: #93c5fd; }
.info-block-blue h3 { color: #1e40af; }

.info-block-green    { background: #f0fdf4; border-color: #86efac; }
.info-block-green h3 { color: #166534; }

.info-block-gray    { background: #f8fafc; border-color: #e1e8f0; }
.info-block-gray h3 { color: #4a6080; }

/* Summary lead text */
.lead-text {
    font-size: 15px;
    line-height: 1.8;
    color: #2c3e52;
    margin-bottom: 20px;
}

/* Sub-navigation between sections */
.sub-nav {
    margin-top: 32px;
    padding: 18px 20px;
    background: #f7faff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
}

.sub-nav h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8899aa;
    margin-bottom: 12px;
}

.sub-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-nav ul li a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #0057B8;
    background: #fff;
    border: 1px solid #d0dcea;
    border-radius: 20px;
    transition: all 0.15s;
}

.sub-nav ul li a:hover {
    background: #0057B8;
    color: #fff;
    border-color: #0057B8;
    text-decoration: none;
}

/* Severity group heading */
.severity-heading {
    font-size: 17px;
    font-weight: 700;
    color: #1a2332;
    margin: 24px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.severity-heading .severity-desc {
    font-size: 13px;
    font-weight: 400;
    color: #6b7d94;
}

/* ---------- Laboratorio page ---------- */
.lab-header {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e52 100%);
    padding: 40px 0 32px;
    color: #fff;
}

.lab-header .breadcrumb {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}

.lab-header .breadcrumb a {
    color: rgba(255,255,255,0.65);
}

.lab-header .breadcrumb a:hover {
    color: #fff;
    text-decoration: none;
}

.lab-header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    color: #fff;
}

.lab-header .lab-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 28px 0;
}

.stat-card {
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 34px;
    font-weight: 700;
    color: #0057B8;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #6b7d94;
    font-weight: 500;
}

.stat-card .stat-sub {
    font-size: 11px;
    color: #aab4c0;
    margin-top: 4px;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.breakdown-card {
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    padding: 20px 22px;
}

.breakdown-card h3 {
    font-size: 11px;
    font-weight: 700;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 14px;
}

.breakdown-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f4f8;
}

.breakdown-item:last-child { border-bottom: none; }

.breakdown-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.breakdown-name {
    flex: 1;
    font-size: 13px;
    color: #1a2332;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breakdown-count {
    font-size: 12px;
    font-weight: 600;
    color: #0057B8;
    white-space: nowrap;
}

.breakdown-bar {
    height: 3px;
    background: #e8eef6;
    border-radius: 2px;
    overflow: hidden;
}

.breakdown-bar-fill {
    height: 100%;
    background: #0057B8;
    border-radius: 2px;
}

.lab-groups-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 16px;
}

.lab-grupo-block {
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.lab-grupo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    background: #f7faff;
    border-bottom: 1px solid #e1e8f0;
    gap: 12px;
}

.lab-grupo-header a {
    font-size: 14px;
    font-weight: 600;
    color: #0057B8;
}

.lab-grupo-count {
    font-size: 12px;
    color: #8899aa;
    white-space: nowrap;
}

.lab-grupo-meds { padding: 4px 20px 8px; }

.lab-med-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #f4f7fb;
    font-size: 13px;
}

.lab-med-row:last-child { border-bottom: none; }

.lab-med-name {
    flex: 1;
    color: #1a2332;
    font-weight: 500;
    min-width: 160px;
}

.lab-med-pres {
    font-size: 12px;
    color: #8899aa;
}

.lab-med-nreg {
    font-size: 11px;
    color: #c0c8d4;
}

.lab-med-actions {
    margin-left: auto;
}

.lab-med-actions a {
    font-size: 12px;
    color: #0057B8;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 28px 0 24px;
}

.page-btn {
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 500;
    color: #0057B8;
    background: #fff;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.page-btn:hover { background: #f0f4fb; border-color: #b3c8e8; }

.page-btn--active {
    background: #0057B8;
    color: #fff;
    border-color: #0057B8;
    cursor: default;
}

.page-btn--disabled {
    color: #c0c8d4;
    border-color: #e8eef6;
    cursor: default;
}

.page-ellipsis {
    padding: 0 4px;
    color: #8899aa;
    font-size: 14px;
    line-height: 34px;
}

/* ---------- Search toggle ---------- */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    color: #3d5166;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, color 0.15s;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] { border-color: #0057B8; color: #0057B8; }

/* ---------- Top labs (home) ---------- */
.top-labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.top-lab-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.top-lab-card:hover {
    border-color: #b3c8e8;
    box-shadow: 0 2px 6px rgba(0,87,184,0.07);
}

.top-lab-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a2332;
    line-height: 1.3;
}

.top-lab-count {
    font-size: 12px;
    color: #8899aa;
}

/* ---------- Labs index ---------- */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sort-label {
    font-size: 13px;
    color: #8899aa;
    font-weight: 500;
    margin-right: 4px;
}

.sort-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7d94;
    background: #f0f3f7;
    border: 1.5px solid #d0dcea;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.sort-btn:hover { background: #e1e8f0; color: #1a2332; border-color: #b3c8e8; }

.sort-btn--active {
    background: #0057B8;
    color: #fff;
    border-color: #0057B8;
}

.sort-btn--active:hover { background: #0046a0; border-color: #0046a0; color: #fff; }

.labs-index-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 32px;
}

.lab-index-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    gap: 12px;
}

.lab-index-row:hover {
    border-color: #b3c8e8;
    box-shadow: 0 2px 6px rgba(0,87,184,0.07);
}

.lab-index-name {
    font-size: 15px;
    font-weight: 500;
    color: #1a2332;
}

.lab-index-count {
    font-size: 13px;
    color: #8899aa;
    white-space: nowrap;
}

/* ---------- Grupo: principios activos ---------- */
.grupo-principios-activos {
    margin-bottom: 24px;
}

.grupo-pa-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #8899aa;
    margin-bottom: 10px;
}

.grupo-pa-label svg {
    color: #b3c8e8;
    flex-shrink: 0;
}

.grupo-pa-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grupo-pa-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    background: #f5f9ff;
    border: 1px solid #c5d9f5;
    border-left: 3px solid #0057b8;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    min-width: 140px;
}

.grupo-pa-card:hover {
    background: #eaf2ff;
    border-color: #0057b8;
    box-shadow: 0 2px 8px rgba(0,87,184,0.10);
}

.grupo-pa-card-nombre {
    font-size: 14px;
    font-weight: 600;
    color: #1a2332;
    line-height: 1.3;
}

.grupo-pa-card-dosis {
    font-size: 12px;
    color: #0057b8;
    font-weight: 500;
}

/* ---------- Principios activos ---------- */
.letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 32px;
}

.letter-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e1e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #3d5166;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.letter-nav-btn:hover {
    background: #0057b8;
    border-color: #0057b8;
    color: #fff;
}

.pa-letter-group {
    margin-bottom: 32px;
    scroll-margin-top: 80px;
}

.pa-letter-heading {
    font-size: 18px;
    font-weight: 700;
    color: #0057b8;
    border-bottom: 2px solid #e1e8f0;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.pa-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pa-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    gap: 12px;
}

.pa-row:hover {
    border-color: #b3c8e8;
    box-shadow: 0 2px 6px rgba(0,87,184,0.07);
}

.pa-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a2332;
}

.pa-count {
    font-size: 12px;
    color: #8899aa;
    white-space: nowrap;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 16px;
}

.pagination-info {
    font-size: 13px;
    color: #8899aa;
    margin: 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e1e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #3d5166;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.page-btn:hover {
    background: #f0f5fb;
    border-color: #b3c8e8;
}

.page-btn--active {
    background: #0057b8;
    border-color: #0057b8;
    color: #fff;
    pointer-events: none;
}

.page-btn--nav {
    padding: 0 14px;
    font-weight: 600;
}

.page-btn--disabled {
    color: #c5d0db;
    border-color: #edf1f5;
    background: #fafbfc;
    pointer-events: none;
    cursor: default;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    font-size: 13px;
    color: #aab4c0;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .hero { padding: 36px 0 32px; }
    .hero h1 { font-size: 24px; }
    .search-form { flex-direction: column; border-radius: 8px; gap: 1px; }
    .search-form input[type="text"],
    .search-form button[type="submit"] { border-radius: 0; }
    .search-form input[type="text"] { border-radius: 8px 8px 0 0; }
    .search-form button[type="submit"] { border-radius: 0 0 8px 8px; }
    .section-nav { grid-template-columns: 1fr 1fr; }
    .med-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; }
    .filter-group { min-width: 100%; }
    .breakdown-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }

    .top-labs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 404 ---------- */
.not-found {
    max-width: 560px;
    margin: 80px auto 100px;
    text-align: center;
}

.not-found-code {
    font-size: 96px;
    font-weight: 700;
    color: #e8edf2;
    line-height: 1;
    margin: 0 0 8px;
    letter-spacing: -4px;
}

.not-found-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 12px;
}

.not-found-desc {
    font-size: 15px;
    color: #6b7a8d;
    margin: 0 0 36px;
    line-height: 1.6;
}

.not-found-search {
    margin-bottom: 20px;
}

.not-found-search .search-row {
    display: flex;
    gap: 8px;
}

.not-found-search input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.not-found-search input[type="text"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.not-found-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
