:root {
  --bg-light: #E7E7E7;
  --bg-accent: #C0CDF2;
  --item-bg: #F2F2F2;
  --item-hover: #FEF7B7;
  --link: #0061E4;
  --shadow: 0 0 8px #666;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  color: #111;
  background: #fff;
}

/* Layout */
.container#contenedor {
  max-width: 1100px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row { display: flex; flex-wrap: wrap; }
.row > .col { flex: 1 1 100%; padding: 1rem; }
.row.align-right { justify-content: flex-end; }

#fila1 { background: var(--bg-light); }
#fila2 { background: var(--bg-accent); }
#fila3 { background: var(--bg-accent); }

/* Header */
h1.title {
  font-size: clamp(2rem, 6vw, 4em);
  margin: 0 0 .25em 0;
  color: #fff;
  text-shadow: 0 0 15px #000;
}
.header-actions { text-align: right; }
.header-actions a { display: inline-block; margin: .5rem 1rem .5rem 0; }

.btn {
  display: inline-block;
  padding: .5rem 1rem;
  border-radius: .375rem;
  text-decoration: none;
  font-weight: 600;
  transition: filter .15s ease-in-out;
}
.btn:hover { filter: brightness(0.95); }
.btn-success { background: #198754; color: #fff; }

/* Menu list */
.list-group { box-shadow: 0 0 4px #666; border-radius: .5rem; overflow: hidden; }
.list-group#menu { font-size: 1.5em; }
.list-group-item {
  display: block;
  padding: 1rem;
  background: var(--item-bg);
  color: var(--link);
  text-decoration: none;
  border-top: 1px solid #ddd;
  text-align: justify;
  text-justify: inter-word;
}
.list-group-item:first-child { border-top: 0; }
.list-group-item:hover { background: var(--item-hover); }


.text-center { text-align: center; }
.pagination { list-style: none; padding: 0; margin: 1rem 0; }
.pagination li { display: inline-block; margin: 0 .25rem; }
.pagination a { display: inline-block; padding: .5rem .75rem; background: #fff; border: 1px solid #ddd; border-radius: .25rem; text-decoration: none; color: inherit; }
.pagination .active a { background: #e9ecef; }

@media (min-width: 768px) {
  .row > .col { flex: 1 1 50%; }
  #fila2 .col, #fila3 .col { flex-basis: 100%; }
}

/* En páginas de tema, usar columna de ancho completo también en pantallas grandes */
@media (min-width: 768px) {
  body.tema-page .row > .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

body.tema-page { background-color: #D3E9D0; }
.tema-page .container#contenedor { padding: 1rem; }
.titulodetalle {
  background-color: #AED7A8;
  border-radius: 4px;
  box-shadow: 0 0 8px #aaa;
  padding: 10px;
  margin: 1rem 0 2rem 0;
}
.titulodetalle h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.25rem); }
.cuerpodetalle {
  background-color: #AED7A8;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 0 8px #aaa;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}
.cuerpodetalle p { margin: 0 0 1em 0; text-align: justify; text-justify: inter-word; }
.cuerpodetalle h2 { margin: 1rem 0 .5rem; font-size: clamp(1.25rem, 3vw, 1.5rem); }
.cuerpodetalle ul { padding-left: 1.25rem; margin: 0 0 1em 0; }
.recuadro {
  background-color:#ffffcc;
  text-align:left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:1rem;
  padding:.75rem 1rem;
  border: 1px solid #ffaa00; /* mismo color, borde sólido más prolijo */
  border-left-width: 4px;     /* acento lateral elegante */
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  overflow-x:auto;
  margin: .75rem 0 1.25rem 0;
}

.recuadrooculto { display: none; }
.botonretorno { font-size: 1.1rem; margin-top: 1rem; }
.botonretorno a {
  display: inline-block;
  padding: .5rem .9rem;
  background: #fff;
  border: 1px solid #888;
  border-radius: .375rem;
  text-decoration: none;
  color: inherit;
}
.botonretorno a:hover { filter: brightness(0.97); }
ul li { margin-bottom: .75rem; }

/* Responsive ad placeholders similar to tema.htm */
.uno { width: 320px; height: 100px; }
@media (min-width: 500px) { .uno { width: 320px; height: 100px; } }
@media (min-width: 800px) { .uno { width: 336px; height: 280px; } }

.dos { width: 320px; height: 100px; }
@media (min-width: 500px) { .dos { width: 320px; height: 100px;} }
@media (min-width: 800px) { .dos { width: 336px; height: 280px; } }

/* Media elements */
.cuerpodetalle img, .cuerpodetalle video { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 6px #aaa; }
/* Modal dialog (generic) */
.modal { position: fixed; inset: 0; display: none; z-index: 1000; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-dialog { position: relative; max-width: 900px; width: calc(100% - 2rem); margin: 5vh auto; background: #fff; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; }
.modal-header, .modal-footer { padding: .75rem 1rem; background: #f6f6f6; }
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 1rem; max-height: 70vh; overflow: auto; }
.modal-close { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal .recuadro { margin: 0; }
/* Center screenshots nicely */
.cuerpodetalle .screenshot { display:block; margin:.5rem auto 1rem; }
/* Inline code highlight as yellow chips */
.cuerpodetalle code {
  background: #fff9c4;
  border-radius: .25rem;
  padding: .1em .3em;
}
