/* Variables */
:root {
  --font-title: "Inter", sans-serif;
  --font-text: "Lora", sans-serif;
  --color-text: #908f8f;
  --color-text-inverse: #ffffff;
  --color-bold: #6b6a6a;
  --color-red: #d32f40;
  --color-blue: #3f6ea0;
  --color-green: #2e7d32;
  --color-border: #d6d6d6;
  --header-bg: #ffffff; /* Color de fondo del header */
  --footer-bg: #616161; /* Color de fondo del footer */
  --footer-text: #d6d6d6;
  --footer-hover: #ffffff;
  --color-link-hover: #5a5a5a;
  --infoblock-bg: #d6d6d6;
  --infoblock-text: #616161;
  --button-color: #6c757d;
  --button-color-hover: #495057;
  --button-background: #f8f9fa;
  --button-background-hover: #f1f1f1;
  --button-background-active: #e3e3e3;
  --button-border-color: #dee2e6;
  --button-border-color-hover: #adb5bd;
  --primary-color: rgb(255, 255, 255);
  --primary-background: rgba(14, 111, 156);
  --primary-border-color: rgb(17, 121, 170);
  --primary-color-hover: rgb(14, 110, 156);
  --primary-background-hover: rgba(14, 111, 156, 0.8);
  --secondary-color: rgb(255, 255, 255);
  --secondary-background: rgba(156, 14, 14);
  --secondary-border-color: rgb(170, 17, 17);
  /* Alerts */
  --info-color: #0c5460;
  --info-border: #0c5460;
  --info-background: #d1ecf1;
  --success-color: #155724;
  --success-border: #155724;
  --success-background: #d4edda;
  --warning-color: #721c24;
  --warning-border: #856404;
  --warning-background: #f8d7da;
  /* Tablas */
  --table-thead-background: #f1f1f1;
  --table-th-background: #f9fafb;
  --table-border-color: rgba(206, 212, 218, 0.8);
  --table-hover-background: rgba(17, 121, 170, 0.06);
  /* Formularios */
  --label-color: #1179aa;
  --label-required-color: #a52a2a;
  --input-border-color: #ced4da;
  --input-border-color-focus: #1179aa;
  --input-checked-color: #3584e4;
  --input-unchecked-color: #ced4da;
  /* Menú Contextual */
  --context-menu-color: var(--color-bold);
  --context-menu-background: #fff;
  --context-menu-border: var(--color-border);
  --context-menu-hover: #d6d6d6;
  /* Tabs */
  --tabs-bar-border-color: #c0c0c0;
  --tabs-label-background: #e5e5e5;
  --tabs-label-backgroun-hover: #f1f1f1;
  --tabs-label-color: #7f7f7f;
  --tabs-label-color-hover: var(--color-blue);
  --tabs-content-background: #fff;
}

/* Globales */
h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  padding: 0;
  font-size: 1em;
}

a {
  text-decoration: none;
  color: var(--color-blue);
}
a:hover {
  color: var(--color-link-hover);
}
abbr {
  cursor: help;
}
strong {
  font-weight: bold;
  color: var(--color-bold);
}

mark,
mark.info {
  color: inherit;
  background-color: rgba(255, 255, 0, 0.467);
  padding: 0 0.1em;
  border-radius: 5px;
}
mark.info {
  background-color: rgba(63, 110, 160, 0.267);
}

small {
  opacity: 0.5;
}
em:before {
  content: "«";
}
em:after {
  content: "»";
}
img {
  display: block;
  height: auto;
  width: 100%;
}

/* Helpers */
.mt-1 {
  margin-top: 1em;
}
.mt-2 {
  margin-top: 2em;
}
.mb-1 {
  margin-bottom: 1em;
}
.mb-2 {
  margin-bottom: 2em;
}
.color-primary {
  color: var(--color-blue);
}
.circle {
  border-radius: 50%;
}
.rounded {
  border-radius: 5px;
}
.border-dotted {
  border: var(--color-border) 2px dotted;
}
.display-block {
  display: block;
}
.display-inline {
  display: inline;
  margin: 0;
  padding: 0;
}
.display-flex {
  display: flex;
  align-items: center;
}
.display-flex-row {
  display: flex;
  flex-direction: row;
  justify-content: start;
  gap: 1em;
  flex-wrap: wrap;
}
.display-flex-column {
  display: flex;
  flex-direction: column;
  justify-content: start;
  gap: 1em;
}
.hidden {
  display: none !important;
}
.shadow {
  box-shadow: 0 0 0.6em rgba(0, 0, 0, 0.03) !important;
}
.blur {
  filter: blur(4px);
  user-select: none;
}
.overflow-elipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.price {
  font-family: "Roboto", sans-serif;
  font-size: 1em;
  color: var(--color-green);
  letter-spacing: -0.03em;
}

/* ESTRUCTURA */
html {
  margin: 0;
  padding: 0;
  font-size: 16px;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0;
  line-height: 1.3;
  font-family: var(--font-text), sans-serif;
  color: var(--color-text);
  min-height: 100vh;
}
body.en-revision::after,
body.en-desarrollo::after {
  content: "PENDIENTE DE REVISIÓN";
  position: fixed;
  top: 2em;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 0, 0, 0.3);
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
  padding: 1em;
  font-size: 3em;
  font-weight: bold;
  border-radius: 8px;
  z-index: 9999;
  /*transform: rotate(30deg); /* Opcional: inclinación */
}
body.en-desarrollo::after {
  content: "EN DESARROLLO";
  background-color: rgba(246, 255, 0, 0.3);
}
body > *:not(footer) {
  flex-shrink: 0; /* Evita que estos elementos se encojan */
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  height: 130px;
  padding: 0 3em;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 0 1.5em 0 rgba(0, 0, 0, 0.06);
}
header > .brand {
  width: 19em;
}
header > .brand > a {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: var(--color-text);
}
header > .brand > a > img {
  width: 5em;
  height: auto;
  display: block;
}
header > .brand > a > span {
  font-size: 0.6em;
  text-align: left;
  padding: 0;
}

header > nav {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  white-space: nowrap;
  font-size: 1.2em;
  width: 100%;
  gap: 0.2em;
  padding: 0.5em 1em;
  flex: 1;
  order: 5;
}
header > .spacer {
  display: none;
}
header > .menu-button {
  padding: 0em 0.2em !important;
  display: none;
  font-size: 2em;
  cursor: pointer;
}
header > nav.menu {
  display: flex;
  gap: 1em;
}
header > nav.menu .title {
  display: none;
  font-size: 2.5em;
  font-weight: bold;
  color: var(--color-text);
}
header > nav > a {
  padding: 0.5em 1em;
  color: var(--color-text);
}
a:hover {
  color: var(--color-link-hover);
}

header > nav > a:hover {
  background-color: #f7f6f6;
  border-radius: 8px;
}
header > .toolbar {
  display: flex;
  width: 19em;
  justify-content: end;
  gap: 1em;
  order: 6;
}
header > .toolbar svg:hover {
  fill: var(--color-blue);
  color: #ff1565c0;
}

footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  margin-top: auto;
  padding-top: 1em;
}
footer .logo {
  width: auto;
  height: 4em;
  display: block;
}
footer a {
  color: var(--footer-text);
}
footer a:hover {
  color: var(--footer-hover);
}
footer > section {
  display: flex;
  gap: 2em;
}
footer > section > * {
  flex: 1 1 0;
}
footer > section > :first-child {
  text-align: left;
}
footer > section > :last-child {
  text-align: right;
}
footer > hr {
  background: #fff;
  border: none;
  height: 2px;
}
footer strong {
  color: var(--color-text-inverse);
}
footer .contact {
  padding: 1em 0;
}
footer h2 {
  color: var(--color-text-inverse) !important;
  font-size: 1.2em;
  padding-bottom: 0.8em;
  font-weight: bold;
  text-decoration: underline;
}
footer > section > nav > a {
  display: block;
}

/* Hero Rújula */
.hero-rujula {
  min-height: 340px;
  margin: 2em;
  padding: 2em;
  background: url("../img/detalle-libreria-rujula.jpg") center center/cover no-repeat;
  color: #fff;
  text-align: left;
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.hero-rujula .hero-title {
  margin: 1em 0 0 2em;
  font-size: 3em;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.hero-rujula .hero-text {
  margin-left: 5em;
  font-size: 1.1em;
  font-weight: 400;
  max-width: 60%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.hero-rujula a.button {
  margin: 2em 0 0 5em;
  font-size: 1.1em;
  font-weight: 400;
}

.hero-search {
  width: 100%;
  padding: 0 14em;
  box-sizing: border-box;
  margin: 2em auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6em;
}
.hero-search > .hero-text {
  flex: 1 1 0;
  min-width: 60%;
}
.hero-search > .hero-text h2 {
  font-size: 2.5em;
  margin-bottom: 1em;
}
.hero-search > .hero-text p {
  font-size: 1.2em;
  margin-bottom: 2em;
}
.hero-search > .hero-text .search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 0.5em 1em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1em;
  max-width: 31em;
}
.hero-search > .search-box > .icon {
  font-size: 1.2em;
  margin-right: 0.5em;
  fill: #ccc;
}
.hero-search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1em;
  padding: 0.5em 0;
  margin-left: 0.5em;
  background: transparent;
}
.hero-search input:focus {
  border: none;
  box-shadow: none;
}
.hero-search .links {
  max-width: 31em;
  text-align: right;
}
.hero-search .links a {
  text-decoration: none;
  margin: 0 0.3rem;
}
.hero-search .links a:hover {
  text-decoration: underline;
}
.hero-search .hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
}
.hero-search > .hero-image > img {
  height: auto;
}

/* Minutario Referencia */
.signatura {
  /*padding: 4px 8px;
  background-color: #f5f5f5;
  border-radius: 8px;*/
}
.signatura .part:nth-child(1) {
  color: #1565c0;
} /* Azul oscuro */
.signatura .part:nth-child(2) {
  color: #1976d2;
} /* Azul medio */
.signatura .part:nth-child(3) {
  color: #0277bd;
} /* Azul petróleo */
.signatura .part:nth-child(4) {
  color: #039be5;
} /* Azul brillante */
.signatura .part:nth-child(5) {
  color: #42a5f5;
} /* Azul claro */
.signatura .part:nth-child(6) {
  color: #64b5f6;
} /* Azul celeste */
.signatura .part:nth-child(7) {
  color: #4fc3f7;
} /* Azul cielo */
.signatura .part:nth-child(8) {
  color: #81d4fa;
} /* Azul pastel */

/* Bloque Informativo */
.info-block {
  width: 100%;
  padding: 0em 14em;
  box-sizing: border-box;
  margin: 2em auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6em;
}
.info-block > .info,
.info-block > .graphic {
  flex: 1 1 0;
}
.info-block > .graphic img {
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
}
.info-block > .info > h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
}
.info-block > .info > p {
  font-size: 1.2em;
  margin-bottom: 1em;
}
.info-block.grey {
  background-color: var(--infoblock-bg);
  color: var(--infoblock-text);
}

/* Cabecera de página genérica */
.page-header {
  display: block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  padding: 1em 2em;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.page-header h1 {
  font-size: 2em;
  font-weight: 600;
  color: white;
}

.mosaic {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 5em;
  justify-content: center;
}

.mosaic img {
  width: 18em;
  /*height: 200px;*/
  object-fit: cover;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
}

/* Textos legales */
.text-block {
  width: 100%;
  padding: 2em 14em;
  box-sizing: border-box;
  margin: 0;
  font-size: 1.3em;
}
.text-block h1,
.text-block h2,
.text-block h3 {
  color: var(--color-blue);
  font-family: var(--font-title);
  font-size: 2em;
  margin-bottom: 0.5em;
  text-decoration: underline;
}
.text-block h2,
.text-block h3 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  text-decoration: none;
}
.text-block h3 {
  font-size: 1em;
}

/* CallToAcction */
.call-to-action {
  margin: 0;
  font-size: 1.2em;
}

/* HELPERS para estructuras */
.w80 {
  max-width: 80%;
}
.w70 {
  max-width: 70%;
}
.w50 {
  max-width: 50%;
}
.w30 {
  max-width: 30%;
}
.row,
.col {
  padding: 0;
  margin: 0;
  background-color: transparent;
}
.row {
  padding-top: 1em;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2em;
}
.col {
  flex: 1 1 0;
}
.col.w20 {
  flex: 2 1 0;
}
.col.w30 {
  flex: 3 1 0;
}
.col.w50 {
  flex: 5 1 0;
}
.col.w70 {
  flex: 7 1 0;
}
.col.fixed20,
.col.fixed30,
.col.fixed50,
.col.fixed70 {
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}
.col.fixed20 {
  width: 20%;
}
.col.fixed30 {
  width: 30%;
}
.col.fixed50 {
  width: 50%;
}
.col.fixed70 {
  width: 70%;
}
.col.fixed20 + .col {
  margin-left: 20%;
}
.col.fixed30 + .col {
  margin-left: 30%;
}
.col.fixed50 + .col {
  margin-left: 50%;
}
.col.fixed70 + .col {
  margin-left: 70%;
}

/* Iconografía */
.icon {
  fill: #5f6368;
  height: 1.5em;
  width: 1.5em;
  vertical-align: middle;
}
.icon-big {
  height: 2em;
  width: 2em;
  fill: #5f6368;
}
.icon-small {
  height: 1em;
  width: 1em;
  fill: #5f6368;
}
.icon.left,
.icon-small.left {
  margin-right: 0.5em;
}
.icon.right,
.icon-small.right {
  margin-left: 0.5em;
}
.icon.is-blue {
  fill: var(--color-blue);
}
.icon.is-red {
  fill: var(--color-red);
}
.icon.is-green {
  fill: var(--color-green);
}
.icon.is-primary {
  fill: var(--color-text-inverse);
}

/* Avatar */
.avatar {
  display: block;
  width: 2em;
  height: 2em;
  border: 1px solid var(--border-color);
  border-radius: 50%;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25em;
  background-color: silver;
}
.badge.is-red {
  background-color: #a95656;
}
.badge.is-green {
  background-color: #70ab82;
}
.badge.is-blue {
  background-color: #65a3c0;
}
.badge.is-grey {
  background-color: #7f898e;
  color: black;
}
.badge.is-purple {
  background-color: purple;
}
.badge.is-yellow {
  background-color: yellow;
  color: black;
}
.badge.is-orange {
  background-color: orange;
  color: black;
}

/* Tooltips */
.tooltip {
  cursor: help;
  position: relative;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}
.tooltip > .tooltip-info {
  display: none;
}
.tooltip:hover > .tooltip-info {
  display: inline;
  position: absolute;
  left: 5px;
  top: 1em;
  margin: 1em;
  padding: 5px 10px;
  border: var(--tooltip-border) 1px dotted;
  border-radius: 6px;
  background: var(--tooltip-background);
  color: var(--tooltip-color);
  text-decoration: none;
  white-space: nowrap;
  z-index: 100;
}

/* TABLAS */
table {
  border-collapse: collapse;
  table-layout: auto;
  width: 100%;
  border: 1px solid var(--table-border-color);
  border-radius: 4px;
}
thead {
  background-color: var(--table-thead-background);
}
tr,
th,
td {
  border: none;
  margin: 0;
}
th,
td {
  padding: 0.5em;
  vertical-align: top;
  text-align: left;
  width: auto;
}
th {
  text-align: left;
  border-top: 1px solid var(--table-border-color);
  border-bottom: 1px solid var(--table-border-color);
  padding: 1em 0.5em;
}
tr {
  border-bottom: 1px solid var(--table-border-color);
}
tbody tr:hover {
  background-color: var(--table-hover-background);
}
th.left,
td.left {
  text-align: left;
}
th.center,
td.center {
  text-align: center;
}
th.right,
td.right {
  text-align: right;
}
th.middle,
td.middle {
  vertical-align: middle;
}
th.top,
td.top {
  vertical-align: top;
}
th.bottom,
td.bottom {
  vertical-align: bottom;
}
th.no-wrap,
td.no-wrap {
  white-space: nowrap;
  overflow: hidden;
}
th.truncate,
td.truncate {
  max-width: 120px; /* Ajusta el tamaño fijo que prefieras */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.has-scroll {
  position: relative;
  border-spacing: 0;
}
table.has-scroll tbody {
  display: block;
  overflow-y: auto;
  height: calc(100vh - 25em); /* Altura ajustada */
}
table.has-scroll thead,
table.has-scroll tfoot {
  display: table;
  width: 100%;
  table-layout: fixed;
}
table.has-scroll tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* SECCIONES */
section {
  margin: 2em 4em;
  padding: 0;
}
section.padded {
  width: 100%;
  padding: 0 14em;
  box-sizing: border-box;
  margin: 3em 0;
}
section h1,
section h2 {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--color-bold);
  margin: 0.5em 0;
}
section h1 {
  font-size: 2em;
  color: var(--color-blue);
}

/* Card (Tarjetas) */
.card {
  background-color: var(--section-background);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  box-shadow: none;
  max-width: 100%;
  margin-bottom: 1em;
}
.card-title,
.card-body,
.card-footer {
  padding: 0.8em;
}
.card-title {
  font-size: 0.8em;
  font-weight: 600;
  background-color: var(--card-title-background);
}
.card-body {
  border-top: 1px solid var(--border-color);
}
.card-footer {
  border-top: 1px solid var(--border-color);
}
.card-footer.has-items {
  display: flex;
  justify-content: center;
  align-items: stretch;
  border-top: 1px solid var(--border-color);
  padding: 0;
}
.card-item {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 0.5em;
}
.card-item:not(:last-child) {
  border-right: 1px solid var(--border-color);
}
.card-image {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

/* BOTONES */
button,
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  margin: 0 0.2em;
  padding: 0.5em;
  width: fit-content;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--button-border-color);
  border-radius: 4px;
  color: var(--button-color);
  background-color: var(--button-background);
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
button:hover,
.button:hover {
  color: var(--button-color-hover);
  background-color: var(--button-background-hover);
}
button.is-small,
.button.is-small {
  font-size: 0.8em;
  padding: 0.2em 0.4em;
}
button.is-big,
.button.is-big {
  font-size: 1.5em;
}

button.is-primary,
.button.is-primary {
  color: var(--primary-color);
  background-color: var(--primary-background);
  border-color: var(--primary-border-color);
}
button.is-primary,
.button.is-primary > svg {
  fill: rgb(255, 255, 255);
  margin: 0 0.2em;
}
button.is-primary:hover,
.button.is-primary:hover {
  background-color: var(--primary-background-hover);
  border-color: var(--primary-color-hover);
}
button.is-primary:hover,
.button.is-primary:visited {
  color: var(--primary-color);
}
button.is-secondary,
.button.is-secondary {
  color: var(--secondary-color);
  background-color: var(--secondary-background);
  border-color: var(--secondary-border-color);
}
button.is-secondary:hover,
.button.is-secondary:hover {
  color: rgb(255, 255, 255);
  background-color: rgba(156, 14, 14, 0.8);
  border-color: rgb(170, 17, 17);
}
button:disabled,
button.is-off,
.button.is-off {
  cursor: not-allowed;
  opacity: 0.6;
}
button:disabled:hover,
button.is-off:hover,
.button.is-off:hover {
  color: var(--button-color);
  background-color: var(--button-background);
}

/**
 * Detalles o extensible
 */
details {
  width: 100%;
  border-bottom: 1px solid var(--color-border);
  padding: 1em 0em;
}
details summary {
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  position: relative;
  font-weight: bold;
}
details[open] summary {
  padding-bottom: 1em;
}
details summary::after {
  margin-left: auto;
  content: "+";
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 1.4em;
  text-align: center;
  display: inline-block;
  position: absolute;
  right: 0;
}
details[open] summary::after {
  content: "-";
}

.counter {
  position: absolute;
  top: 0;
  right: -0.8em;
  background-color: #dc3546;
  color: #ffffff;
  border-radius: 50%;
  padding: 0.4em;
  font-size: 0.6em;
  font-weight: bold;
}

/**
 * FORMULARIOS
 */
fieldset {
  display: flex;
  flex-direction: column;
  padding-top: 0;
}
fieldset * {
  margin: 0.2em 0em;
}
legend,
label {
  color: var(--label-color);
  display: flex;
  flex-direction: row;
  align-items: center;
  white-space: nowrap;
}
label:has(input[type="radio"]) {
  color: var(--body-color);
  padding: 0;
  margin: 0;
}
fieldset.checkbox-group label {
  color: var(--color-text);
}
legend.required::after,
label.required::after {
  content: "(requerido)";
  color: var(--label-required-color);
  font-size: 80%;
  padding-left: 0.5em;
}
label a {
  margin: auto 0.2em;
}

input,
textarea {
  display: block;
  width: 100%;
  padding: 0.3em 0.5em;
  font-size: 1em;
  line-height: 1.5;
  color: inherit;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--input-border-color);
  border-radius: 0.25em;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
input:read-only,
textarea:read-only {
  background-color: #efefef;
}
input:focus,
textarea:focus {
  border-color: var(--input-border-color-focus);
  outline: 0;
  box-shadow: 0 0 0 0.2em rgba(0, 123, 255, 0.25);
  z-index: 1;
}
input:invalid,
input:required:invalid {
  border-color: var(--label-required-color);
  border-left-width: 1px;
  border-left-style: solid;
}
input[type="email"] {
  text-transform: lowercase;
}
input[type="checkbox"] {
  width: fit-content;
  display: inline;
  margin-right: 0.2em;
}
input[type="checkbox"].is-switch {
  position: relative;
  width: fit-content;
  cursor: pointer;
  display: inline-block;
  width: 2.5em;
  height: 1.5em;
  margin-right: 0.3em;
  border: 1px solid var(--input-unchecked-color);
  border-radius: 2em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8' fill='white'%3e%3ccircle r='3'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: contain;
  background-color: var(--input-unchecked-color);
  transition: background-position 0.15s ease-in-out;
  -webkit-transition: background-position 0.15s ease-in-out;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
input[type="checkbox"].is-switch:checked {
  background-position: right center;
  background-color: var(--input-checked-color);
}
input[type="checkbox"].is-switch:checked:after,
input[type="checkbox"].is-switch:not(:checked):after {
  content: "On";
  position: absolute;
  top: -0.1em;
  left: 3em;
}
input[type="checkbox"].is-switch:not(:checked):after {
  content: "Off";
}
input[type="checkbox"].is-switch:not(:checked) {
  background-position: left center;
  background-color: var(--input-unchecked-color);
}
input[type="radio"] {
  display: inline-block;
  width: 2em;
  height: 1.4em;
  padding: 0.3em 0.5em;
  line-height: 1.5;
  color: var(--body-color);
  vertical-align: middle;
  background: #fff
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 24 24' width='12' height='12'%3e%3cpath d='M17.293 7.293a1 1 0 0 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0l-5-5a1 1 0 1 1 1.414-1.414L12 10.586l4.293-4.293z'/%3e%3c/svg%3e")
    no-repeat right 0.75em center/8px 10px;
  border: 1px solid #ced4da;
  border-radius: 5em;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
input[type="file"] {
  padding: 0;
  cursor: pointer;
  border: 1px solid #ced4da;
}
input[type="file"]::file-selector-button {
  padding: 0.5em 0.5em;
  color: var(--bs-body-color);
  background-color: var(--border);
  border-width: 0;
  border-inline-end: 1px solid #ced4da;
  border-inline-end-width: lime;
  border-radius: 0;
}
input[type="color"] {
  padding: 0.2em 0.2em;
  width: 3em;
  height: 2em;
  color: var(--body-color);
  vertical-align: middle;
  border: 1px solid #ced4da;
  border-radius: 0.25em;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-blue);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--color-blue);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
select {
  padding: 0.3em 0.5em;
  border: 1px solid #ced4da;
  border-radius: 0.25em;
  background-color: #fff;
  background-image: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
  background-repeat: no-repeat;
  background-position: right 0px center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
select:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
}
select option {
  padding: 0.3em 0.5em;
}
textarea {
  resize: vertical;
  height: 8em;
  min-height: 8em;
  max-height: 30em;
}

.input-file-image {
  width: fit-content;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 0.25em;
  padding: 1em;
  min-width: 250px;
}

.input-file-image > label > img {
  border-radius: 0.25em;
  margin-bottom: 0px;
  margin-top: 0px;
  height: 50px;
  width: auto;
}

fieldset > .input-file-image > label > p {
  display: inline-block;
  margin-left: 1em;
  color: var(--body-color);
  font-weight: normal;
}

.input-file-image label {
  margin-top: 0px;
  padding-top: 0px;
}

.button.is-close {
  border: 1px solid var(--danger-border);
  background-color: var(--danger-background);
}

.button.is-close:hover {
  background-color: var(--danger-border);
}

.is-border {
  border: 1px solid #ced4da;
  border-radius: 0.5em;
  padding: 0.3em 0.6em 0em 0.6em;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  width: 172px;
}

input[type="color" i]::-webkit-color-swatch-wrapper,
input[type="color" i] {
  padding: 0.25em;
}

input[type="color" i]::-webkit-color-swatch,
input[type="color" i]::-moz-color-swatch {
  border-radius: 0.25em;
}

.file-input-label {
  display: block;
}

.file-input-label2 {
  margin: 0;
  display: flex;
  height: 150px;
}

.file_input {
  display: none;
}

.option-container {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-basis: auto;
  margin: 0.5em 0em 0.3em 0em;
  cursor: pointer;
}
.option-container div .delete-image-check {
  margin-right: 0em;
}

/* Lightbox o dialog */
dialog {
  display: none;
  border: 1px solid #cccccc;
  margin: auto;
  padding: 0;
  border-radius: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 80vw;
  max-height: 80vh;
  box-sizing: border-box;
  background: white;
  outline: none;
}
dialog[open] {
  display: flex;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog .dialog-content {
  margin: 3.5em 2em 2em 2em;
  overflow-y: scroll;
}
dialog .dialog-close {
  position: absolute;
  top: 16px;
  right: 32px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #666;
}
dialog .dialog-close:hover {
  transform: scale(1.1);
}
dialog .dialog-close:active {
  transform: scale(0.95);
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog .text-block {
  padding: 0;
}
/**
 * Toolbar
 */
.toolbar {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.2em;
}
.toolbar .is-left {
  margin-right: auto;
}
.toolbar .is-right {
  margin: auto;
}

/**
 * Componente de grupo en linea conformado por botones, enlaces o span
 */
.group {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0;
}
.group > * {
  display: inline-flex;
  border-radius: 0;
  border: 1px solid var(--color-border);
  border-left: none;
  height: 2.5em;
  align-items: center;
  box-sizing: border-box;
  padding: 0.2em 0.5em;
  margin: 0;
}
.group.is-small > * {
  height: 1.9em;
}
.group.is-big > * {
  height: 4em;
  padding: 1.2em 1.5em;
}
.group > :first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  border-left: 1px solid var(--color-border);
}
.group > :last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}
.group > button,
.group > a,
.group > span {
  color: var(--group-color);
  background-color: var(--button-background);
}
.group > button:hover,
.group > a:hover {
  color: var(--group-color-hover);
  background-color: var(--button-background-hover);
}
.group > .button-page {
  background-color: var(--button-background);
  color: var(--button-color);
}
.group > .button-page.is-current {
  color: rgb(255, 255, 255);
  background-color: rgba(14, 111, 156);
  border-color: rgb(17, 121, 170);
  cursor: default;
}

/**
 * Dropdowns
 */

.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
}
.dropdown-content {
  display: none;
  position: absolute;
  background: var(--nav-background, #f5f5f5);
  min-width: 10em;
  width: auto;
  z-index: 1;
  margin-top: 0.5em;
  padding: 0.5em 0;
  border: 1px solid var(--border-color, #ccc);
  box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
}
.dropdown-content.dropdown-right {
  left: auto;
  right: 0;
}
.dropdown-content.dropdown-show {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.dropdown-content.dropdown-above {
  bottom: 100%;
  top: auto;
  margin-top: 0;
  margin-bottom: 0.5em;
}

.dropdown-content > * {
  width: 100%;
  margin: 0.3em 0;
  padding: 0.25em 1em;
}

.dropdown-content ul {
  all: unset;
  display: flex;
  flex-direction: column;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.dropdown-content ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5em 1em;
  white-space: nowrap;
  width: auto;
  text-decoration: none;
  color: inherit;
}
.dropdown-content ul li:hover {
  background-color: #ededed;
  color: initial;
}
.dropdown-content ul li a {
  color: var(--color-text);
  margin-right: 1em;
  white-space: nowrap;
}
.dropdown-content ul li a:hover {
  color: var(--color-blue);
}
.dropdown-content ul li a:hover svg {
  fill: var(--color-blue);
}
.dropdown-content hr {
  border: 0;
  border-top: 1px solid #e5e5e5;
  padding: 0;
  margin: 0;
  width: 100%;
}

/**
 * Componente TimeLine
 */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 1em;
}
.timeline-item {
  padding-bottom: 1.5em;
  border-left: 1px solid rgba(161, 161, 161, 0.763);
  position: relative;
  padding-left: 0.8em;
  margin-left: 0.16em;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item:before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  background: silver;
  border-radius: 50%;
  position: absolute;
  left: -0.35em;
  top: 0.3em;
}
.timeline-lead {
  font-size: 0.85em;
  font-weight: 500;
  margin-bottom: 0.2em;
  opacity: 0.6;
}
.timeline-content {
  color: rgb(79, 79, 79);
  line-height: 1.5;
  margin-top: 0.4em;
}
.timeline-item.is-red {
  border-color: red;
}
.timeline-item.is-green {
  border-color: green;
}
.timeline-item.is-blue {
  border-color: blue;
}
.timeline-item.is-grey {
  border-color: silver;
}
.timeline-item.is-purple {
  border-color: purple;
}
.timeline-item.is-yellow {
  border-color: yellow;
}
.timeline-item.is-orange {
  border-color: orange;
}
.timeline-item.is-red:before {
  background: red;
}
.timeline-item.is-green:before {
  background: green;
}
.timeline-item.is-blue:before {
  background: blue;
}
.timeline-item.is-grey:before {
  background: silver;
}
.timeline-item.is-purple:before {
  background: purple;
}
.timeline-item.is-yellow:before {
  background: yellow;
}
.timeline-item.is-orange:before {
  background: orange;
}

/**
 * Caja Alertas o Información
 */
.alert {
  position: relative;
  margin: 1em 0em;
  padding: 1em;
  border-style: solid;
  border-width: 0 0 0 3px;
  border-color: var(--alert-border);
  background: var(--alert-background);
  color: var(--alert-color);
  width: auto;
  text-align: left;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out;
}
.alert > p,
.alert > ul {
  margin-bottom: 0.5em;
}
.alert a {
  color: inherit;
  font-weight: bolder;
}
.alert a:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
}
.alert > *:last-child {
  margin-bottom: 0;
}
.alert .alert-title {
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 0.5em;
}
.alert .alert-close {
  position: absolute;
  top: 5px;
  right: 5px;
  cursor: pointer;
  font-size: 1.5em;
  margin: 0;
  padding: 0;
}
.alert .alert-close:hover {
  filter: brightness(0.2);
}
.alert.hiding {
  opacity: 0;
  transform: translateY(-20px);
}
.alert.is-success {
  border-color: var(--success-border);
  background: var(--success-background);
  color: var(--success-color);
}
.alert.is-info {
  border-color: var(--info-border);
  background: var(--info-background);
  color: var(--info-color);
}
.alert.is-info a:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
}
.alert.is-warning {
  border-color: var(--warning-border);
  background: var(--warning-background);
  color: var(--warning-color);
}
.alert.is-danger {
  border-color: var(--danger-border);
  background: var(--danger-background);
  color: var(--danger-color);
}

/* ==== Menú contextual ==== */
.context-menu {
  position: fixed;
  color: var(--context-menu-color);
  background: var(--context-menu-background);
  border: 1px solid var(--context-menu-border);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 10em;
  z-index: 1000;
}
.context-menu.hidden {
  display: none;
}
.context-menu ul {
  list-style: none;
  margin: 0;
  padding: 0.5em 0;
}
.context-menu li {
  padding: 0.5em 1em;
  cursor: pointer;
  user-select: none;
}
.context-menu li:hover {
  background-color: var(--context-menu-hover);
}
.context-menu li.separator {
  height: 1px;
  background-color: var(--context-menu-hover);
  margin: 4px 0;
  padding: 0;
  cursor: default;
}

/**
 * Visualización de código
 */
pre {
  margin: 0 !important;
}

/** Wathermark **/
.watermark {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: white;
  overflow: hidden;
}
.watermark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Ctext x='50' y='200' fill='%23000000' font-family='Arial' font-size='24' opacity='0.1' transform='rotate(-45 100 100)'%3ECONFIDENCIAL%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 1;
}

/* Banner de cookies - base styles */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: #1a1a2e;
  color: #e0e0e0;
  padding: 1em 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5em;
  font-size: 0.85em;
  line-height: 1.5;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
}
.cookie-banner a {
  color: #7eb8da;
  text-decoration: underline;
}
.cookie-banner .button {
  white-space: nowrap;
  flex-shrink: 0;
}
.cookie-banner.hidden {
  display: none;
}

/* =========================== */
/* ====== Media Queries ====== */
/* =========================== */

/* Tablet: hasta 1024px (incluye iPad) */
@media only screen and (max-width: 1024px) {
  body {
    font-size: 14px;
  }

  /* Header tablet */
  header {
    padding: 0 1em;
    height: 80px;
    min-height: 80px;
  }
  header > .brand {
    width: auto;
    flex: 0 0 auto;
  }
  header > .spacer {
    display: block;
    flex-grow: 1;
  }
  header > .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em;
    border: 1px solid var(--border-color, #ccc);
    background: var(--button-background, #fff);
    border-radius: 4px;
    cursor: pointer;
    z-index: 1001;
  }
  header > .menu-button svg {
    width: 1.5em;
    height: 1.5em;
  }
  header > nav.menu {
    position: fixed;
    left: 0vw;
    top: 0;
    bottom: 0;
    width: 100%;
    background: var(--nav-background, #f5f5f5);
    border: 1px solid var(--border-color, #ccc);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 0.5em;
    padding: 1em;
    text-align: center;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }
  header > nav.menu .title {
    display: block;
  }
  header > nav.menu a {
    padding: 0.5em 1em;
    font-size: 1.2em;
  }
  header > nav.menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  header > .toolbar {
    flex: 0 0 auto;
    width: auto;
    flex-wrap: nowrap !important;
    gap: 0.5em;
  }

  /* Secciones tablet */
  section {
    margin: 1.5em 2em;
  }
  section.padded {
    padding: 0 2em;
    margin: 2em 0;
  }
  .hero-search,
  .info-block,
  .text-block {
    padding: 2em;
    gap: 3em;
  }
  .page-header {
    margin: 1.5em 2em;
  }

  /* Grids tablet */
  .row {
    flex-direction: column;
    gap: 1em;
  }
  .col,
  .col.w20,
  .col.w30,
  .col.w50,
  .col.w70 {
    flex: 1 1 100%;
  }
  .col.fixed20,
  .col.fixed30,
  .col.fixed50,
  .col.fixed70 {
    position: static;
    height: auto;
    width: 100% !important;
  }
  .col.fixed20 + .col,
  .col.fixed30 + .col,
  .col.fixed50 + .col,
  .col.fixed70 + .col {
    margin-left: 0;
  }

  /* Hero tablet */
  .hero-rujula {
    min-height: 280px;
    margin: 1.5em;
    padding: 1.5em;
  }
  .hero-rujula .hero-title {
    font-size: 2em;
    margin: 1em 1em 0.5em 1em;
  }
  .hero-rujula .hero-text {
    font-size: 1em;
    margin: 1em 2em 1.5em 2em;
    max-width: 80%;
  }
  .hero-rujula a.button {
    margin: 1em 0 0 2em;
  }

  /* Info blocks tablet */
  .info-block > .info {
    min-width: 100%;
  }

  /* Footer tablet */
  footer > section.footer-legal {
    flex-direction: column;
    gap: 0.5em;
  }
  footer > section.footer-legal > * {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
  }

  /* Diálogos tablet */
  dialog {
    max-width: 90vw;
    margin: 1em;
  }
}

/* Móvil: < 768px */
@media only screen and (max-width: 767px) {
  body {
    font-size: 16px;
  }

  /* Header móvil - solo logo */
  header {
    padding: 0.5em 1em;
    height: 60px;
    min-height: 60px;
  }
  header > .brand span {
    display: none;
  }
  header > .brand > a {
    gap: 0.3em;
  }
  header > .brand > a > img {
    width: 3em;
  }

  /* Secciones móvil */
  section {
    margin: 1em;
  }
  section.padded {
    padding: 0 1em;
    margin: 1.5em 0;
  }
  .hero-search,
  .info-block,
  .text-block {
    padding: 1em;
    gap: 1.5em;
  }

  /* Hero móvil */
  .hero-rujula {
    min-height: 220px;
    margin: 1em;
    padding: 1em;
  }
  .hero-rujula .hero-title {
    font-size: 1.5em;
    margin: 0.5em 0.5em 0.5em 0.5em;
  }
  .hero-rujula .hero-text {
    font-size: 0.9em;
    margin: 0.5em 1em 1em 1em;
    max-width: 100%;
  }
  .hero-rujula a.button {
    margin: 0.5em 0 0 1em;
    font-size: 1em;
  }

  /* Formularios móvil - evitar zoom iOS */
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Botones móvil - touch targets */
  button,
  .button {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5em 1em;
  }
  .group > * {
    min-height: 44px;
  }
  .toolbar {
    gap: 0.5em;
  }

  /* Chips móvil */
  .chip-remove {
    width: 44px !important;
    height: 44px !important;
    font-size: 1rem;
  }

  /* Diálogos móvil */
  dialog {
    max-width: 95vw;
    max-height: 90vh;
    margin: 0.5em;
  }
  dialog .dialog-content {
    margin: 2.5em 1em 1em 1em;
    padding: 1em;
  }

  /* Tablas móvil - cards */
  .table-cards tbody tr {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--table-border-color);
    margin-bottom: 1em;
    border-radius: 8px;
    overflow: hidden;
  }
  .table-cards thead {
    display: none;
  }
  .table-cards td {
    display: block;
    padding: 0.5em 1em;
    border: none;
    position: relative;
  }
  .table-cards td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    font-size: 0.85em;
    color: var(--color-bold);
    margin-bottom: 0.25em;
  }
  .table-cards td:first-child {
    background-color: var(--table-thead-background);
    font-weight: bold;
  }

  /* Tablas móvil - scroll horizontal */
  .table-scroll {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll table {
    min-width: 500px;
  }

  /* Cookie banner móvil */
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1em;
    gap: 0.8em;
    font-size: 0.9em;
  }
}

/* Móvil pequeño: < 480px */
@media only screen and (max-width: 479px) {
  body {
    font-size: 15px;
  }

  header > .brand > a > img {
    width: 2.5em;
  }

  section {
    margin: 0.75em;
  }
  section.padded {
    padding: 0 0.75em;
  }
  .hero-search,
  .info-block,
  .text-block {
    padding: 0.75em;
  }

  .hero-rujula {
    min-height: 180px;
  }
  .hero-rujula .hero-title {
    font-size: 1.2em;
  }
  .hero-rujula .hero-text {
    font-size: 0.85em;
  }
}
