:root {
  --sr-paper: #f7f4ee;
  --sr-linen: #ece5d8;
  --sr-white: #ffffff;
  --sr-slate: #3a4a58;
  --sr-slate-dark: #25313b;
  --sr-ochre: #996633;
  --sr-ochre-deep: #754c22;
  --sr-ink: #241e1a;
  --sr-muted: #5a544e;
  --sr-rule: #cfc6b8;
  --sr-silver: #c4cdd6;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--sr-paper);
  color: var(--sr-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.68;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sr-ochre-deep);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--sr-slate);
}

h1, h2, h3, h4 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.18;
  color: var(--sr-slate-dark);
  letter-spacing: -0.015em;
}

.pliego-marco {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.cabecera-partida-sarala {
  background: var(--sr-white);
  border-top: 4px solid var(--sr-slate);
  border-bottom: 3px double var(--sr-rule);
  padding: 16px 0;
  position: relative;
  z-index: 80;
}

.menu-partido-sarala {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  gap: 14px;
}

.menu-partido-sarala > li {
  position: relative;
  display: flex;
  justify-content: center;
}

.menu-partido-sarala > li > a {
  display: inline-block;
  padding: 7px 10px;
  color: var(--sr-slate-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.menu-partido-sarala > li:not(.centro-logo-item) > a:hover,
.menu-partido-sarala > li:not(.centro-logo-item) > a[aria-current="page"] {
  color: var(--sr-ochre-deep);
  border-bottom-color: var(--sr-ochre);
}

.menu-partido-sarala > li.centro-logo-item > a.sello-central-sarala {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 26px;
  border: 2px solid var(--sr-slate);
  outline: 1px solid var(--sr-ochre);
  outline-offset: 4px;
  background: var(--sr-paper);
  text-align: center;
  border-bottom: 2px solid var(--sr-slate);
}

.sello-central-sarala strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  letter-spacing: 0.22em;
  color: var(--sr-slate-dark);
  line-height: 1.1;
}

.sello-central-sarala span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--sr-ochre-deep);
  margin-top: 3px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 274px;
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  border-top: 3px solid var(--sr-ochre);
  box-shadow: 0 18px 34px rgba(37, 49, 59, 0.14);
  list-style: none;
  margin: 8px 0 0;
  padding: 6px 0;
  z-index: 100;
}

.menu-partido-sarala > li:hover .dropdown-menu,
.menu-partido-sarala > li:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 0.83rem;
  color: var(--sr-ink);
  border-bottom: 1px solid #ece5d8;
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--sr-paper);
  color: var(--sr-ochre-deep);
}

.portada-collage-sarala {
  background: var(--sr-paper);
  padding: 24px 0 46px;
  border-bottom: 1px solid var(--sr-rule);
}

.encabezado-editorial-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 20px;
}

.cinta-rubrica-madrid {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sr-ochre-deep);
  border-top: 1px solid var(--sr-ochre);
  border-bottom: 1px solid var(--sr-ochre);
  padding: 4px 14px;
  margin-bottom: 10px;
}

.encabezado-editorial-hero h1 {
  font-size: clamp(1.9rem, 3.1vw, 2.7rem);
  margin-bottom: 10px;
}

.encabezado-editorial-hero p {
  color: var(--sr-muted);
  font-size: 0.99rem;
  margin: 0;
}

.malla-collage-cascada {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0 22px;
  align-items: start;
}

.foto-collage-principal {
  grid-column: 1 / 10;
  grid-row: 1 / 3;
  margin: 0;
  background: var(--sr-white);
  padding: 9px;
  border: 1px solid var(--sr-rule);
  box-shadow: 0 16px 36px rgba(37, 49, 59, 0.1);
}

.foto-collage-principal img {
  width: 100%;
  aspect-ratio: 1200 / 475;
  object-fit: cover;
  object-position: center 62%;
}

.foto-collage-inserto {
  grid-column: 8 / 13;
  grid-row: 2 / 4;
  z-index: 4;
  margin: 0;
  margin-top: -104px;
  background: var(--sr-white);
  padding: 9px;
  border: 1px solid var(--sr-ochre);
  box-shadow: 0 22px 44px rgba(37, 49, 59, 0.18);
}

.foto-collage-inserto img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.foto-collage-inserto figcaption {
  padding: 8px 4px 2px;
  font-size: 0.76rem;
  color: var(--sr-muted);
  font-style: italic;
}

.ficha-collage-pie {
  grid-column: 1 / 8;
  grid-row: 3 / 4;
  z-index: 3;
  margin-top: 16px;
  background: var(--sr-slate);
  color: #edf1f4;
  padding: 20px 24px;
  border-left: 5px solid var(--sr-ochre);
}

.tira-tres-datos-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(196, 205, 214, 0.25);
}

.tira-tres-datos-hero strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  color: #f4d3a1;
  white-space: nowrap;
}

.tira-tres-datos-hero span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4dce3;
}

.botones-collage-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-atelier-ocre {
  display: inline-block;
  padding: 11px 22px;
  background: var(--sr-ochre);
  border: 2px solid var(--sr-ochre);
  color: #ffffff;
  font-size: 0.79rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.btn-atelier-ocre:hover {
  background: #b0783f;
  border-color: #b0783f;
  color: #ffffff;
}

.btn-atelier-claro {
  display: inline-block;
  padding: 11px 22px;
  background: transparent;
  border: 2px solid rgba(247, 244, 238, 0.72);
  color: #f7f4ee;
  font-size: 0.79rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-atelier-claro:hover {
  background: rgba(247, 244, 238, 0.14);
  color: #ffffff;
}

.banda-lino-sarala {
  background: var(--sr-linen);
  border-bottom: 1px solid var(--sr-rule);
  padding: 54px 0;
}

.banda-papel-sarala {
  background: var(--sr-paper);
  border-bottom: 1px solid var(--sr-rule);
  padding: 54px 0;
}

.kicker-atelier {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sr-ochre-deep);
  margin-bottom: 8px;
}

.tablero-bom-editorial {
  margin-top: 24px;
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  border-top: 4px solid var(--sr-slate);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 28px;
  align-items: start;
}

.grupo-chips-bom {
  margin-bottom: 18px;
}

.grupo-chips-bom:last-child {
  margin-bottom: 0;
}

.etiqueta-chip-bom {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sr-slate);
  margin-bottom: 8px;
}

.fila-chips-bom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-tactil-bom {
  padding: 8px 13px;
  border: 1px solid var(--sr-rule);
  background: var(--sr-paper);
  color: var(--sr-ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.chip-tactil-bom[aria-pressed="true"] {
  background: var(--sr-slate);
  border-color: var(--sr-slate);
  color: #ffffff;
}

.hoja-despiece-bom {
  background: var(--sr-paper);
  border: 1px solid var(--sr-rule);
  border-left: 4px solid var(--sr-ochre);
  padding: 22px 24px;
}

.hoja-despiece-bom h3 {
  font-size: 1.12rem;
  margin-bottom: 12px;
}

.tabla-bom-vivo {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.87rem;
}

.tabla-bom-vivo th,
.tabla-bom-vivo td {
  padding: 8px 4px;
  border-bottom: 1px dashed var(--sr-rule);
  text-align: left;
  vertical-align: baseline;
}

.tabla-bom-vivo td:first-child {
  width: 46%;
  padding-right: 12px;
}

.tabla-bom-vivo td:last-child {
  text-align: right;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--sr-slate-dark);
  white-space: nowrap;
}

.tabla-bom-vivo tr:nth-child(-n+2) td:last-child {
  white-space: normal;
  font-size: 0.83rem;
}

.tabla-bom-vivo tr.fila-total-bom td {
  border-top: 2px solid var(--sr-slate);
  border-bottom: none;
  padding-top: 12px;
  font-size: 0.96rem;
  color: var(--sr-ochre-deep);
}

.resumen-bom-nota {
  font-size: 0.83rem;
  color: var(--sr-muted);
  margin: 0 0 16px;
}

.portada-interior-sarala {
  background: var(--sr-slate);
  color: #edf1f4;
  padding: 36px 0 40px;
  border-bottom: 4px solid var(--sr-ochre);
}

.miga-sarala {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c4cdd6;
  margin-bottom: 10px;
}

.miga-sarala a {
  color: #f4d3a1;
}

.portada-interior-sarala h1 {
  color: #ffffff;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  max-width: 880px;
  margin-bottom: 10px;
}

.portada-interior-sarala p {
  color: #dce4eb;
  max-width: 760px;
  margin: 0;
}

.malla-atelier-dos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.malla-atelier-6535 {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.88fr);
  gap: 30px;
  align-items: start;
}

.malla-atelier-3565 {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.42fr);
  gap: 30px;
  align-items: start;
}

.malla-atelier-tres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.tarjeta-atelier {
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  border-top: 3px solid var(--sr-ochre);
  padding: 22px;
}

.tarjeta-atelier h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.tarjeta-atelier p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--sr-muted);
}

.marco-lamina-atelier {
  margin: 0;
  background: var(--sr-white);
  padding: 9px;
  border: 1px solid var(--sr-rule);
}

.marco-lamina-atelier img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.marco-lamina-ancha img {
  max-height: 420px;
  object-position: center 48%;
}

.marco-lamina-atelier figcaption {
  padding: 9px 4px 2px;
  font-size: 0.79rem;
  color: var(--sr-muted);
  font-style: italic;
}

.marco-lamina-atelier + article,
.malla-atelier-tres + article,
.nota-atelier + article {
  margin-top: 24px;
}

.tabla-atelier-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

.tabla-atelier {
  width: 100%;
  border-collapse: collapse;
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  font-size: 0.89rem;
}

.tabla-atelier th,
.tabla-atelier td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--sr-rule);
  text-align: left;
  vertical-align: top;
}

.tabla-atelier thead th {
  background: var(--sr-slate);
  color: #f4d3a1;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tabla-atelier tbody tr:nth-child(even) {
  background: var(--sr-paper);
}

.dl-atelier {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.dl-atelier > div {
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  border-left: 4px solid var(--sr-slate);
  padding: 14px 16px;
}

.dl-atelier dt {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sr-ochre-deep);
  margin-bottom: 4px;
}

.dl-atelier dd {
  margin: 0;
  font-size: 0.91rem;
}

.lista-atelier {
  padding-left: 22px;
  margin: 18px 0;
}

.lista-atelier li {
  margin-bottom: 11px;
}

.nota-atelier {
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  border-left: 5px solid var(--sr-ochre);
  padding: 20px 22px;
  margin: 18px 0;
}

.nota-atelier h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.nota-atelier p {
  margin: 0;
  font-size: 0.92rem;
}

.acordeon-atelier details {
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  padding: 14px 18px;
  margin-bottom: 10px;
}

.acordeon-atelier summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--sr-slate-dark);
}

.acordeon-atelier p {
  margin: 10px 0 0;
  font-size: 0.91rem;
  color: var(--sr-muted);
}

.solicitud-pliego {
  background: var(--sr-white);
  border: 1px solid var(--sr-rule);
  border-top: 4px solid var(--sr-ochre);
  padding: 28px;
}

.malla-form-atelier {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.campo-atelier {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campo-pleno-atelier {
  grid-column: 1 / -1;
}

.campo-atelier label {
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--sr-slate-dark);
}

.campo-atelier input,
.campo-atelier select,
.campo-atelier textarea {
  padding: 10px 12px;
  border: 1px solid #b9afa0;
  background: #fcfaf6;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--sr-ink);
}

.campo-atelier input:focus,
.campo-atelier select:focus,
.campo-atelier textarea:focus {
  outline: 2px solid var(--sr-ochre);
  border-color: var(--sr-ochre);
  background: #ffffff;
}

.rgpd-atelier {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 20px;
  font-size: 0.84rem;
  color: var(--sr-muted);
}

.rgpd-atelier input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--sr-slate);
}

.btn-enviar-atelier {
  display: inline-block;
  padding: 12px 24px;
  background: var(--sr-slate);
  border: 2px solid var(--sr-slate);
  color: #f4d3a1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.btn-enviar-atelier:hover {
  background: var(--sr-ochre);
  border-color: var(--sr-ochre);
  color: #ffffff;
}

.madrid-pliego-resguardo {
  margin-top: 22px;
  background: var(--sr-paper);
  border: 2px solid var(--sr-slate);
  border-left: 5px solid var(--sr-ochre);
  padding: 18px 20px;
}

.madrid-pliego-resguardo h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--sr-slate-dark);
}

.madrid-pliego-resguardo ol {
  margin: 0;
  padding-left: 20px;
  font-size: 0.89rem;
  color: var(--sr-ink);
}

.madrid-pliego-resguardo li {
  margin-bottom: 6px;
}

.pie-encuadernacion-madrid {
  background: var(--sr-slate-dark);
  color: #d4dce3;
  padding: 46px 0 28px;
  border-top: 4px solid var(--sr-ochre);
  font-size: 0.86rem;
}

.malla-pie-atelier {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.pie-encuadernacion-madrid h4 {
  color: #f4d3a1;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 10px;
}

.pie-encuadernacion-madrid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pie-encuadernacion-madrid li {
  margin-bottom: 6px;
}

.pie-encuadernacion-madrid a {
  color: #edf1f4;
}

.pie-encuadernacion-madrid a:hover {
  color: #f4d3a1;
}

.cierre-pie-atelier {
  border-top: 1px solid rgba(196, 205, 214, 0.22);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.79rem;
  color: #adb8c2;
}

@media (max-width: 960px) {
  .menu-partido-sarala {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 8px 14px;
  }
  .menu-partido-sarala > li.centro-logo-item {
    order: -1;
    flex: 1 0 100%;
    margin-bottom: 8px;
  }
  .malla-collage-cascada {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .foto-collage-inserto {
    margin-top: 0;
  }
  .ficha-collage-pie {
    margin-top: 0;
  }
  .tablero-bom-editorial,
  .malla-atelier-dos,
  .malla-atelier-6535,
  .malla-atelier-3565,
  .malla-atelier-tres,
  .dl-atelier,
  .malla-form-atelier,
  .malla-pie-atelier {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .pliego-marco {
    padding: 0 16px;
  }
  .tira-tres-datos-hero {
    grid-template-columns: 1fr;
  }
  .menu-partido-sarala > li > a {
    padding: 5px 6px;
    font-size: 0.76rem;
  }
}
