:root{
  --enaire-blue-dark:#00224c;
  --enaire-blue:#009fda;
  --bg:#ffffff;
  --sidebar-bg:#f6f9fc;
  --border:#d7e2ee;
  --text:#0f172a;
  --muted:#475569;
  --link:var(--enaire-blue-dark);
  --link-hover:var(--enaire-blue);
  --page-max-width: 1500px;
  --header-height:84px;
  --header-inset:10px;
  --header-top-gap:8px;
  --header-right-trim:35px;
  --sidebar-width:340px;
  --radius:12px;
  --shadow:0 2px 14px rgba(0,0,0,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --h1-size: 28px;
  --h2-size: 26px;
  --h3-size: 24px;
  --brand-title-size: var(--h1-size);
    font-weight: 200;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:var(--font);
  background:#eef2f6;
  color:var(--text);
  padding-top:0;
}

.page-container{
  width:min(calc(100% - (var(--header-inset) * 2)), var(--page-max-width));
  margin:0 auto;
  position:relative;
  padding-top:calc(var(--header-height) + var(--header-top-gap));
  background:var(--bg);
}

header{
  position:fixed;
  top:0;
  margin-top:var(--header-top-gap);
  left:calc(max(calc((100vw - var(--page-max-width)) / 2), var(--header-inset)) + 4px);
  right:calc(max(calc((100vw - var(--page-max-width)) / 2), var(--header-inset)) + var(--header-right-trim));
  width:auto;
  transform:none;
  z-index:1000;
  height:var(--header-height);
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 20px;
  background:linear-gradient(90deg, var(--enaire-blue-dark), #003a80);
  color:#fff;
  border-radius:3px;
  box-shadow: var(--shadow);
}

header .brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  margin-left: 10px;
}

header .app-logo{
  height:56px;
  width:auto;
  display:block;
}

header .page-title{
  margin:0;
  font-size:36px;
  font-weight:200;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

header .menu-toggle{
  margin-left: auto;
  width: 36px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  border-radius: 6px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

header .menu-toggle .menu-bar{
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.sidebar-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 950;
}


/* numeración */
.section-number {
  font-weight: 700;
  color: #00224c; /* azul ENAIRE */
}
.layout{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width: var(--sidebar-width);
  border-right: none;
  background: transparent;
  padding: 0;

  position: fixed;               /* <-- clave */
  top: calc(var(--header-height) + var(--header-top-gap));
  left: max(calc((100vw - var(--page-max-width)) / 2), var(--header-inset));
  height: calc(100vh - var(--header-height) - var(--header-top-gap));
  overflow-y: auto;              /* scroll propio */
  overflow-x: hidden;
  z-index: 900;
}

.sidebar-box{
  margin: 14px 6px 18px;
  padding: 14px 12px 18px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.sidebar .search{
  position:sticky;
  top:0;
  background:var(--sidebar-bg);
  padding-bottom:2px;
  z-index:2;
  margin-left: 0;
}

.sidebar input[type="search"]{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:3px;
  outline:none;
  font-size:14px;
  font-weight:200;
  color:#00224c;
}

.sidebar input[type="search"]::placeholder{
  color: #94a3b8;
  font-weight: 300;
}

/* Quitar la X (clear) del input search */
.sidebar input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance: none;
  appearance: none;
}
.sidebar input[type="search"]::-ms-clear{
  display: none;
  width: 0;
  height: 0;
}

.search-count{
  margin-left: 10px;
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.search-count:empty{
  display: none;
}

/* helper to remove left margin on specific paragraphs */
.no-left-margin {
  margin-left: 0 !important;
}


.search-meta{
  margin-top: 10px;
  margin-bottom: 10px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.search-actions{
  display: inline-flex;
  gap: 6px;
}

.search-nav{
  border: 1px solid var(--border);
  background: #fff;
  color: var(--link);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: none;
  place-items: center;
  font-size: 10px;
}

.search-nav:hover{
  background: rgba(0,159,218,.08);
  color: var(--link-hover);
}

.search-nav:disabled{
  opacity: .45;
  cursor: default;
}

.sidebar input[type="search"]:focus{
  border-color: rgba(0,159,218,.7);
  box-shadow:0 0 0 3px rgba(0,159,218,.15);
}

.toc{
  list-style:none;
  padding-left:0;
  margin:0;
}

.toc.level1{
  margin-left: -6px;
}

.toc li{
  position:relative;
  margin:2px 0;
  padding-left:0;
}

.toc .toc{
  margin-left:18px;
  border-left:1px solid rgba(0,34,76,.10);
  padding-left:12px;
}

.toc-link{
  display:inline-block;
  padding:5px;
  border-radius:3px;
  text-decoration:none;
  color:var(--link);
  line-height:1.25;
  font-size:14px;
}

.toc-link.level1{
  margin-left: 26px;
}

.toc-link.level2{
  font-size:13.5px;
  margin-left: 26px;
}
.toc-link.level3{font-size:13px; color:#0b4b7a;}

.toc-link.level3{
  margin-left: 8px;
}

.toc .level2 > li{margin-top: 2px;}
.toc .level3 > li{margin-top: 2px;}

.toc-link:hover{background:rgba(0,159,218,.10); color:var(--link-hover);}
.toc-link.active{background:rgba(0,159,218,.18); color:var(--link-hover); }

.toc-toggle{
  width:22px;
  height:22px;
  border:none;
  background:transparent;
  cursor:pointer;
  display:inline-grid;
  place-items:center;
  border-radius:8px;
  margin-right:4px;
  vertical-align:middle;
}
.toc-toggle:hover{background:rgba(0,34,76,.08);}
.toc-toggle::before{
  content:"▾";
  font-size:14px;
  color:var(--muted);
  transform:translateY(-1px);
}
.toc-toggle[aria-expanded="false"]::before{content:"▸";}

.content{
  margin-left: var(--sidebar-width);  /* <-- deja sitio al sidebar fijo */
   padding: 14px 35px 20px;  /* alineado con .sidebar-box */
   text-align:justify;
}

.content h1[id],
.content h2[id],
.content h3[id]{
  scroll-margin-top: calc(var(--header-height) + var(--header-top-gap) + 8px);
}
/* h1 del contenido */
.content-title {
  display: flex;
  align-items: baseline;
  margin: 20px 0 0px;
  color: #0f172a;
  gap:20px;
  font-weight:300;
  font-size: var(--h1-size);
  background: rgba(0, 34, 76, 0.05);
  border-radius: 3px;
  padding: 12px 16px;
    font-weight: 350;
}

.article > section:first-child > .content-title{
  margin-top: 0;
}
/* h2 del contenido */
.content-subtitle {
  display: flex;
  align-items: baseline;
  margin: 60px 0px 0px;
  color: #676f7e;
  gap:20px;
  font-weight:500;
}

h2.content-subtitle{
  background: rgba(0, 34, 76, 0.05);
  border-radius: 3px;
  padding: 10px 14px;
  color: #1d2f51;
  font-size: var(--h2-size);
    font-weight: 350;
  align-items: center;
}

h3.content-subtitle{
  background: rgba(0, 34, 76, 0.05);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: var(--h3-size);
  color: #5b7098;
  font-weight: 350;
  align-items: center;
}

h4.content-subtitle{
  background: rgba(0, 34, 76, 0.05);
  border-radius: 10px;
  padding: 10px 14px;
}

.img_titulo{
  display: inline-block;
  background: #fff;
  border: 5px solid #fff;
  padding: 0px;
  margin: 10px;
  border-radius: 3px;
  vertical-align: middle;
}

.content .article{
  width: 100%;
  max-width: none;
  margin-top: 3px;
}

.article section p,
.article section ul,
.article section ol,
.article section table{
  color: #00224c;
  font-weight: 300;
  font-size: 17px;
}

.article section p{
  margin-left: 18px;
}

.article section p b{
  font-weight: 450;
}

.article section ul b,
.article section ol b{
  font-weight: 450;
}

.article h4 b{
  font-weight: 350;
}


.article section ul{
  margin-left: 22px;
}

.article section ol{
  margin-left: 30px;
}

.article section ul ul,
.article section ol ul{
  margin-left: 0;
  margin-top: 6px;
  list-style: none;
  padding-left: 0;
}

.article section ul ul > li,
.article section ol ul > li{
  position: relative;
  padding-left: 14px;
}

.article section ul ul > li::before,
.article section ol ul > li::before{
  content: "-";
  position: absolute;
  left: 0;
  color: #00224c;
}

.article section ul li,
.article section ol li{
  margin-bottom: 6px;
}

.article section ul li:last-child,
.article section ol li:last-child{
  margin-bottom: 0;
}

.feature-links-list{
  position: relative;
  width: max-content;
  max-width: 100%;
  list-style-position: inside;
}

.feature-links-list .feature-links-item{
  position: relative;
  width: 100%;
  max-width: none;
  padding: 4px 6px;
  border-radius: 3px;
  transition: background-color .15s ease, color .15s ease;
}

.feature-links-list .feature-links-item > a{
  position: relative;
  display: inline-block;
  transition: color .15s ease;
}

.feature-links-list .feature-links-item:hover,
.feature-links-list .feature-links-item:focus-within{
  background: rgba(0,159,218,.10);
}

.feature-links-list .feature-links-item:hover > a,
.feature-links-list .feature-links-item:focus-within > a{
  color: var(--link-hover);
}

.feature-links-list .feature-links-item:hover::marker,
.feature-links-list .feature-links-item:focus-within::marker{
  color: var(--link-hover);
}

.feature-links-list .feature-links-item .feature-tooltip{
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(calc(-50% + var(--tooltip-shift-y, 0px)));
  width: 400px;
  max-width: 400px;
  height: auto;
  max-height: none;
  padding: 10px 12px;
  border-radius: 6px;
  background: #eaf3fb;
  border: 1px solid #c8daec;
  color: #1d2f51;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 6px 14px rgba(0,34,76,.16);
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
}

.feature-links-list .feature-links-item .feature-tooltip::before{
  content: "";
  position: absolute;
  left: -7px;
  top: calc(50% - var(--tooltip-shift-y, 0px));
  width: 12px;
  height: 12px;
  background: #c8daec;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 1px;
}

.feature-links-list .feature-links-item .feature-tooltip::after{
  content: "";
  position: absolute;
  left: -6px;
  top: calc(50% - var(--tooltip-shift-y, 0px));
  width: 10px;
  height: 10px;
  background: #eaf3fb;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 1px;
}

.feature-links-list .feature-tooltip p{
  margin: 0 0 8px;
  color: #1d2f51;
  font-size: 12px;
}

.feature-links-list .feature-tooltip__header{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feature-links-list .feature-tooltip__title{
  margin: 0;
  color: #00224c;
  font-size: 18px;
  font-weight: 350;
  line-height: 1.25;
  text-align: left;
}

.feature-links-list .feature-tooltip__index{
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid #c8daec;
  background: #ffffff;
  color: #00224c;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.feature-links-list .feature-tooltip p:last-of-type{
  margin-bottom: 10px;
}

.feature-links-list .feature-tooltip__image-placeholder{
  width: 100%;
  height: var(--feature-image-height, 120px);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.feature-links-list .feature-links-item:hover .feature-tooltip,
.feature-links-list .feature-links-item:focus-within .feature-tooltip{
  opacity: 1;
  visibility: visible;
}

.article section table{
  margin-left: 30px;
}

.article > section > section,
.article > section > section > section,
.article > section > section > section > section{
  border-left: 1px solid var(--border);
  padding-left: 25px;
}

/* Indent nested sections starting at h3 */
.article > section > section > section{
  margin-left: 12px;
}
.article > section > section > section > section{
  margin-left: 24px;
}





.content p > img,
.content p > .pantalla-wrap > img{
  max-width:100%;
  height:auto;
  margin-top:20px;
   
  
}

.content p > img.pantalla,
.content p > .pantalla-wrap > img.pantalla{
  border-radius:3px;
  border: 8px solid #fff;
  margin-left: 20px;
  margin-bottom: 20px;
  outline: 1px solid var(--border);
  box-shadow:0 1px 10px rgba(0,0,0,.08);
}

.content p > img.pantalla:hover,
.pantalla-wrap:hover img.pantalla,
.pantalla-wrap:focus img.pantalla{
  outline-color: #64748b;
}

.pantalla-wrap:hover::before,
.pantalla-wrap:focus::before{
  border-color: #64748b;
}

.pantalla-wrap{
  position: relative;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  padding-right: 0;
}

.pantalla-wrap::before{
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  color: #00bcd4;
  background: #fff;
  border-radius: 3px;
  border: 1px solid var(--border);
  padding: 7px 8px;
  margin: 25px 10px 10px 10px;
  font-size: 14px;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  pointer-events: none;
}

.image-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  z-index: 2000;
}

.image-modal.is-open{
  display: flex;
}

.image-modal__dialog{
  max-width: 95vw;
  max-height: 95vh;
}

.image-modal__img{
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 8px solid #fff;
  outline: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.content table{
  max-width:100%;
}

.content a{ color: var(--link); }
.content a:hover{ color: var(--link-hover); }

.top-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}
.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.12);
  color:#fff;
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
}
.btn:hover{background:rgba(255,255,255,.18);}
.btn:active{transform:translateY(1px);}

@media (max-width: 980px){
  :root{--sidebar-width: 320px;}
}
@media (max-width: 820px){
  header{
    padding:0 12px;
    right:calc(var(--header-inset) + 14px);
  }
  .layout{display:block;}
  header .menu-toggle{display:flex;}
  .sidebar{
    width: 84%;
    max-width: 340px;
    left: 0;
    height: calc(100vh - var(--header-height) - var(--header-top-gap));
    transform: translateX(-100%);
    transition: transform .2s ease;
    border-right: none;
    border-bottom: none;
    z-index: 1200;
  }
  .content{
    margin-left: 0;
    padding:14px 14px 48px;
  }
  .content p > img.pantalla,
  .content p > .pantalla-wrap > img.pantalla{
    width: calc(100% - 10px);
    max-width: calc(100% - 10px);
    margin-left: 0;
    margin-right: 10px;
  }
  :root{
    --h1-size: 18px;
    --h2-size: 16px;
    --h3-size: 14px;
  }
  body{
    font-size: 14px;
  }
  .article section p,
  .article section ul,
  .article section ol,
  .article section table{
    font-size: 14px;
  }
  .article section ul{
    margin-left: 14px;
  }
  .article section ol{
    margin-left: 18px;
  }
  .sidebar input[type="search"]{
    font-size: 12px;
  
  }
  .toc-link{
    font-size: 12.5px;
  }
  .toc-link.level2{font-size:12px;}
  .toc-link.level3{font-size:11.5px;}
  .search-count{
    font-size: 10px;
  }
  .site-footer{
    width: 100%;
    margin-left: 0;
  }
  .sidebar-box{
    margin: 10px 6px;
    border-radius: 3px;
  }
  .feature-links-list{
    margin-left: 0;
    padding-left: 10px;
    width: 100%;
    max-width: 100%;
  }
  .feature-links-list .feature-links-item{
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .feature-links-list .feature-links-item:hover,
  .feature-links-list .feature-links-item:focus-within{
    background: transparent;
  }
  .feature-links-list .feature-links-item > a:hover,
  .feature-links-list .feature-links-item > a:focus-visible{
    background: rgba(0,159,218,.10);
    color: var(--link-hover);
    border-radius: 3px;
  }
  .feature-links-list .feature-links-item .feature-tooltip{
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: min(85vw, 400px);
    max-width: 85vw;
    margin-top: 8px;
    margin-left: 5px;
    margin-right: auto;
    display: none;
  }
  .feature-links-list .feature-links-item .feature-tooltip::before,
  .feature-links-list .feature-links-item .feature-tooltip::after{
    display: none;
  }
  .feature-links-list .feature-links-item.is-tooltip-open .feature-tooltip,
  .feature-links-list .feature-links-item:focus-within .feature-tooltip{
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

body.sidebar-open .sidebar{
  transform: translateX(0);
}

body.sidebar-open .sidebar-overlay{
  display: block;
}

/* Search hits */
.hit-mark{
  background: #e2e8f0;
  padding: 0 .12em;
  border-radius: 4px;
}

.hit-current{
  background: #fb923c;
  outline: 1px solid #f97316;
  color: #1f2937;
}

.toc-link.search-hit{
  background: rgba(0,159,218,.22);
  border-left: 4px solid var(--enaire-blue);
  padding-left: 8px;
  font-weight: 650;
}
/* --- Alineación: texto alineado, flecha a la izquierda --- */

/* Nivel 1: reservar un hueco fijo para la flecha */


.toc li{
  display: block;
}

.toc li > .toc-toggle{
  display: none;
  position: absolute;
  left: 0;
  right: auto;
  top: 3px;
  margin-right: 0;
}

.toc li.has-children > .toc-toggle{
  display: inline-grid;
}

.toc li.has-children > .toc-link{
  display: block;
  width: 100%;
  padding-right: 30px;
  vertical-align: top;
}

.toc li.has-children > .toc-link.level1,
.toc li.has-children > .toc-link.level2{
  margin-left: 0;
  padding-left: 26px;
}

.toc li > ul.toc{
  margin: 4px 0 6px 8px;
  padding-left: 10px;
}

.toc li > ul.toc.level2{
  margin-left: 12px;
  padding-left: 8px;
}

.toc li > ul.toc.level3{
  margin-left: 14px;
  padding-left: 14px;
}
.notation-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 600px;
  margin: 16px 0;
}

.notation-table th,
.notation-table td {
  border: 1px solid #d7e2ee;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.notation-table th {
  background: #f6f9fc;
  font-weight: 600;
}

/* Sin placeholder de botón */
.article a {
  text-decoration: none;
  color: #00224c; /* azul ENAIRE */
}

.article a:hover,
.article a:focus {
  text-decoration: none;
  color: #009fda; /* azul claro ENAIRE */
}

/* Iconos inline dentro de texto (no capturas ni titulos) */
.article p img[height]:not(.pantalla):not(.img_titulo),
.article li img[height]:not(.pantalla):not(.img_titulo){
  display: inline-block;
  vertical-align: -0.16em;
  margin: 0 0.2em;
}

.site-footer{
  max-height: 80px;
  background: #f6f9fc;
  border-top: 1px solid var(--border);
  width: 100%;
  margin-left: 0;
}

.site-footer .footer-inner{
  max-width: none;
  margin: 0;
  padding: 18px 35px;
  color: var(--muted);
}

/* Lista con iconos (misma indentación y espaciado que <ol>) */
.icon-list {
  list-style: none;        /* quitamos bullets */
  margin: 12px 0 16px;     /* SIN margen izquierdo */
  padding-left: 30px;     /* MISMO sangrado que <ol>/<ul> */
}

.icon-list li {
  display: flex;
  align-items: center;
  gap: 8px;                      /* espacio entre icono y texto */
  margin-bottom: 6px;            /* mismo interlineado que <ol> */
}

/* Tamaño y alineación del icono */
.icon-list li img {
  width: 22px;
  height: auto;
  flex-shrink: 0;                /* no se aplasta */
}

.dash-list {
  list-style: none;        /* quitamos bullets */
  margin: 12px 0 16px 22px;
  padding: 0;
}

.dash-list li {
  position: relative;
  padding-left: 14px;      /* espacio para el guion */
  margin-bottom: 6px;      /* mismo espaciado que otras listas */
}

.dash-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: #0f172a;
}

/* center an individual list */
.centered-list {
  margin: 0 auto 16px auto; /* override default margins */
  padding: 0;
  list-style: none;
  text-align: left; /* keep items left-aligned */
  display: inline-block; /* shrink to content for centering */
}
.centered-list li {
  /* use margin-left to offset items within centered container */
  margin-left: 60px;
  margin-bottom: 6px;
}

/* remove dash marker for centered lists */
.centered-list li::before {
  content: "";
}

/* Valores de búsqueda (filtros, códigos, etc.) */
.filter-value {
  font-family: monospace;
  background-color: #eef5fb;
  color: #00224c;           /* azul ENAIRE */
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.95em;
  white-space: nowrap;
}

