.docs-main { background: #f5f6f7; color: #263747; }
.docs-wrap { width: min(1600px, calc(100% - 72px)); margin-inline: auto; }
.docs-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 22px 0; color: #637283; font-size: 14px; }
.docs-breadcrumb a { color: #10406f; text-decoration: underline; text-underline-offset: 3px; }
.docs-eyebrow { margin: 0 0 10px; color: #225c96; font-family: "Gill Sans Std Bold", "Gill Sans Std", Arial, sans-serif; font-size: 14px; letter-spacing: .065em; text-transform: uppercase; }
.docs-search-label { display: block; margin-bottom: 7px; color: #405266; font-size: 14px; font-weight: 700; }
.docs-search { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b8c5d1; border-radius: 5px; background: #fff; color: #263747; font: inherit; }
.docs-search:focus-visible { outline: 3px solid #3169af; outline-offset: 2px; }
.docs-sidebar-group[hidden], .docs-sidebar li[hidden] { display: none !important; }
.docs-search-empty { padding: 16px; color: #5c6c7c; }
.docs-layout { display: grid; grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); gap: clamp(24px, 3vw, 46px); align-items: start; padding-bottom: 56px; }
.docs-sidebar { position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow: auto; padding: 18px 14px 20px; border: 1px solid #d9e1e7; border-radius: 10px; background: #fff; scrollbar-width: thin; scrollbar-color: #b9c3cc transparent; }
.docs-sidebar::-webkit-scrollbar { width: 5px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: #b9c3cc; }
.docs-sidebar::-webkit-scrollbar-thumb:hover { background: #8e9ca8; }
.docs-sidebar .docs-search { margin-bottom: 13px; font-size: 14px; }
.docs-sidebar-home { display: block; padding: 8px 11px; border-radius: 4px; color: #10406f; font-weight: 700; }
.docs-sidebar-group { margin-top: 17px; }
.docs-sidebar-group h2 { margin: 0 11px 5px; color: #697c8c; font: 700 12px/1.25 "Gill Sans Std Bold", "Gill Sans Std", Arial, sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.docs-sidebar-group ul { margin: 0; padding: 0; list-style: none; }
.docs-sidebar-group li a { display: block; padding: 8px 11px; border-radius: 4px; color: #455768; font-size: 14px; line-height: 1.25; text-decoration: none; }
.docs-sidebar-group li.is-nested a { padding-left: 22px; }
.docs-sidebar-group a:hover, .docs-sidebar-home:hover { background: #f0f4f8; color: #10406f; }
.docs-sidebar-group a[aria-current="page"] { background: #e7eff8; color: #10406f; font-weight: 700; }
.docs-topic-toggle { display: none; }
.docs-article { min-width: 0; padding: clamp(30px, 3vw, 52px); border: 1px solid #d9e1e7; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(22, 44, 63, .055); }
.docs-article-header { padding-bottom: 22px; border-bottom: 1px solid #e0e6ec; }
.docs-article-header h1 { max-width: 100%; margin: 0; color: #10406f; font: 700 clamp(34px, 2.7vw, 48px)/1.1 "Gill Sans Std Bold", "Gill Sans Std", Arial, sans-serif; }
.docs-article-header > p:last-child:not(.docs-eyebrow) { max-width: 76ch; margin: 14px 0 0; color: #5a6b7b; font-size: 17px; }
.docs-content { min-width: 0; padding-top: 25px; font-size: 16px; line-height: 1.66; overflow-wrap: anywhere; }
.docs-content h2, .docs-content h3, .docs-content h4 { color: #173f68; font-family: "Gill Sans Std Bold", "Gill Sans Std", Arial, sans-serif; line-height: 1.24; scroll-margin-top: 88px; }
.docs-content h2 { margin: 34px 0 14px; font-size: 27px; }
.docs-content h3 { margin: 28px 0 12px; font-size: 21px; }
.docs-content h4 { margin: 24px 0 10px; font-size: 18px; }
.docs-content p, .docs-content ul, .docs-content ol { max-width: none; margin: 0 0 16px; }
.docs-content p { text-align: justify; text-align-last: left; hyphens: auto; }
.docs-content li { text-align: justify; text-align-last: left; hyphens: auto; }
.docs-content .doc-figure figcaption p { text-align: left; hyphens: none; }
.docs-content li + li { margin-top: 7px; }
.docs-content a { color: #225c96; text-decoration: underline; text-underline-offset: 3px; }
.docs-content blockquote { margin: 22px 0; padding: 14px 20px; border-left: 4px solid #8eaecb; background: #f4f7fa; color: #485d6f; }
.docs-content pre { max-width: 100%; overflow: auto; padding: 15px; border-radius: 5px; background: #edf1f5; font-size: 14px; }
.docs-content code { overflow-wrap: anywhere; }
.docs-content table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 20px auto; }
.docs-content th, .docs-content td { min-width: 130px; padding: 9px 11px; border: 1px solid #d9e1e7; text-align: left; vertical-align: top; }
.docs-content th { background: #edf2f7; color: #173f68; }
.doc-figure { margin: 30px 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.doc-figure img, .doc-video { display: block; width: auto; max-width: 100%; max-height: 700px; margin-inline: auto; border-radius: 7px; }
.doc-figure--compact img { width: min(800px, 100%); max-height: none; }
.doc-figure--mobile-only { display: none; }
.docs-content .doc-figure--desktop-only,
.docs-content .doc-figure--mobile-only { box-sizing: border-box; width: min(740px, 100%); margin-inline: auto; padding: 10px; border: 1px solid #d9e1e7; border-radius: 13px; background: #fff; box-shadow: 0 10px 24px rgb(22 44 63 / 8%); }
.docs-content .doc-figure--desktop-only img,
.docs-content .doc-figure--mobile-only img { width: 100%; border-radius: 8px; }
.doc-video { width: 100%; aspect-ratio: 16 / 9; background: #e1e7ed; }
.doc-figure figcaption { margin-top: 10px; color: #536576; font-size: 14px; line-height: 1.4; }
.doc-figure figcaption p { margin: 0; }
.docs-content .doc-inline-icon { display: inline-block; max-width: 26px; max-height: 26px; vertical-align: middle; }
.doc-note { margin: 20px 0; padding: 14px 18px; border-left: 4px solid #3169af; border-radius: 3px; background: #eef4fa; }
.doc-note > :last-child { margin-bottom: 0; }
.doc-tabs { margin: 22px 0; }
.doc-tab { margin-bottom: 9px; border: 1px solid #d8e0e8; border-radius: 5px; background: #fff; }
.doc-tab summary { padding: 12px 16px; color: #10406f; font-weight: 700; cursor: pointer; }
.doc-tab[open] summary { border-bottom: 1px solid #d8e0e8; background: #f2f6fa; }
.doc-tab-body { padding: 18px; }
.doc-tab-body > :last-child { margin-bottom: 0; }
.docs-on-page { margin: 23px 0 0; padding: 15px 18px; border-left: 3px solid #8eaecb; border-radius: 0 6px 6px 0; background: #edf2f6; }
.docs-on-page p { margin: 0 0 6px; color: #475e73; font-weight: 700; }
.docs-on-page ul { display: flex; flex-wrap: wrap; gap: 5px 18px; margin: 0; padding: 0; list-style: none; }
.docs-on-page a { color: #225c96; font-size: 14px; }
.docs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 40px; padding-top: 24px; border-top: 1px solid #e0e6ec; }
.docs-pager a { display: flex; flex-direction: column; gap: 5px; padding: 16px; border: 1px solid #d8e0e8; border-radius: 5px; color: #10406f; font-weight: 700; text-decoration: none; }
.docs-pager a:last-child { text-align: right; }
.docs-pager a:hover { background: #f3f6fa; }
.docs-pager a span { color: #647789; font-size: 13px; font-weight: 400; }
@media (max-width: 900px) {
    .docs-layout { grid-template-columns: 1fr; gap: 15px; }
    .docs-content .doc-figure--desktop-only { display: none; }
    .docs-content .doc-figure--mobile-only { display: block; }
    .docs-topic-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; padding: 10px 15px; border: 1px solid #cbd7e2; border-radius: 5px; background: #fff; color: #10406f; font: 700 16px "Gill Sans Std Bold", "Gill Sans Std", Arial, sans-serif; cursor: pointer; }
    .docs-sidebar { display: none; position: static; max-height: 340px; }
    .docs-sidebar.is-open { display: block; padding: 14px; border: 1px solid #d9e1e7; border-radius: 8px; background: #fff; }
}
@media (max-width: 640px) {
    .docs-wrap { width: min(100% - 28px, 1600px); }
    .docs-article { padding: 21px 17px; }
    .docs-content { font-size: 16px; }
    .docs-content h2 { font-size: 24px; }
    .docs-article-header h1 { margin-inline: auto; text-align: center; }
    .docs-content .doc-figure { margin-block: 20px; }
    .docs-content .doc-figure img { height: auto; max-width: 100%; max-height: none; }
    .docs-content .doc-figure--mobile-banner img { display: block; width: 100%; height: clamp(150px, 52vw, 190px); max-height: none; border-radius: 9px; object-fit: cover; object-position: center; }
    .docs-pager { grid-template-columns: 1fr; }
    .docs-pager a:last-child { text-align: left; }
}
/* El pie de documentación conserva las medidas del pie de Inicio. */
.docs-main + .footer { margin-top: 0; }
.docs-main + .footer .gov-co-footer-auto { gap: 0; }
.docs-main + .footer .redes-sociales a { gap: 0; }
@media (max-width: 900px) {
    .docs-main + .footer .footer-container { padding: 32px; }
    .docs-main + .footer .gov-co-footer-auto { flex-wrap: nowrap; }
    .docs-main + .footer .gov-co-logo-pie-blanco,
    .docs-main + .footer .gov-co-logo-pie-mesa { height: 50px; }
}
@media (max-width: 576px) {
    .docs-main + .footer .gov-co-footer-auto { gap: 4px 12px; }
    .docs-main + .footer .gov-co-logo-pie-blanco,
    .docs-main + .footer .gov-co-logo-pie-mesa { height: clamp(28px, 9vw, 40px); }
}

/* Mantiene el encabezado por encima del contenido y evita que los logos
   compitan con los enlaces cuando el ancho disponible es reducido. */
.portal-nav { position: sticky; top: 0; z-index: 1000; }
.portal-nav .navbarigac { position: relative; top: auto; }
/* navbar-footer.css aplica sticky a todos los elementos nav; limitarlo aquí al encabezado y al índice lateral. */
.docs-main nav:not(.docs-sidebar) { position: static; z-index: auto; }
.docs-main .docs-sidebar { z-index: 1; }
@media (max-width: 1024px) {
    .portal-nav .navbarigac { display: flex; flex-wrap: wrap; align-items: center; height: auto; min-height: 64px; }
    .portal-nav .logos { flex: 1 1 auto; width: auto; max-width: calc(100% - 56px); min-width: 0; }
    .portal-nav .observatorio-brand { flex: 0 1 auto; min-width: 0; }
    .portal-nav .observatorio-brand img { width: 220px; max-width: min(220px, calc(100vw - 180px)); height: 52px; padding: 0; object-fit: contain; }
    .portal-nav .portal-menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; align-self: center; order: 2; width: 52px; height: 60px; margin: 0 4px 0 auto; padding: 0 15px; }
    .portal-nav .portal-menu-toggle .icon-bar { flex: none; margin: 0 0 4px; }
    .portal-nav .navbarigac .portal-links { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; margin: 0; padding: 6px 0; border-top: 1.5px solid #3366cc; background: #e9eaeb; }
    .portal-nav .navbarigac .portal-links.is-open { display: flex; }
    .portal-nav .portal-links li { padding: 0 12px; }
    .portal-nav .portal-links a { min-height: 44px; padding: 8px 12px; }
}
