:root {
  --color-brand: #2e7d32;
  --color-brand-dark: #1b5e20;
  --color-background: #f9faf8;
  --color-border: #dce2d8;
  --color-text: #1f2a24;
  --color-warning: #ff9800;
  --font-heading: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans Pro", "Segoe UI", Roboto, sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
}

.page {
  display: block;
  background: #fff;
  padding: 2rem;
  min-height: 100vh;
  page-break-after: always;
  page-break-inside: avoid;
}

.page:last-of-type {
  page-break-after: auto;
}

/* PORTADA */
.page--cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #f5f9f5 0%, #ffffff 100%);
  padding: 3rem 2rem;
}

.cover-header {
  width: 100%;
}

.logo {
  width: 100px;
  margin-bottom: 2rem;
}

.page--cover h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin: 0 0 0.5rem;
}

.tagline {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: rgba(31, 42, 36, 0.7);
  margin: 0 0 2rem;
}

.image-placeholder--cover {
  margin: 2rem 0;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 400px;
}

.cover-image {
  display: block;
  width: 100%;
  max-width: 440px;
  margin: 2rem auto;
  border-radius: 18px;
  border: 3px solid rgba(46, 125, 50, 0.2);
  box-shadow: 0 18px 36px rgba(27, 94, 32, 0.18);
}

.cover-content {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 2px solid rgba(46, 125, 50, 0.2);
  max-width: 500px;
}

.cover-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.5rem 0;
}

/* TÍTULOS Y SECCIONES */
.page-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-brand);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-brand);
  letter-spacing: 0.02em;
}

.section {
  margin-bottom: 2rem;
}

.section h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-brand);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(46, 125, 50, 0.3);
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-brand-dark);
  margin: 0 0 0.5rem;
}

p {
  line-height: 1.6;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

/* LISTAS */
.checklist,
.info-list,
.maintenance-list,
.tips-list,
.compact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.checklist li {
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  position: relative;
  font-size: 0.95rem;
}

.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--color-brand);
  font-weight: bold;
}

.info-list li,
.maintenance-list li,
.tips-list li {
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
}

.info-list li::before,
.maintenance-list li::before,
.tips-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-brand);
  font-weight: bold;
}

.compact-list li {
  padding-left: 0;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

/* TABLAS DE INVENTARIO */
.inventory-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid rgba(46, 125, 50, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-table thead {
  background: rgba(46, 125, 50, 0.08);
}

.inventory-table th {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-brand);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(46, 125, 50, 0.2);
}

.inventory-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(46, 125, 50, 0.15);
}

.inventory-table td:first-child {
  font-weight: 600;
}

.inventory-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--color-brand-dark);
}

.inventory-table tbody tr:last-child td {
  border-bottom: none;
}

/* PASOS DE INSTALACIÓN */
.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.steps-list li {
  margin-bottom: 1.5rem;
  padding-left: 3rem;
  position: relative;
}

.steps-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.steps-list h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.steps-list p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* IMÁGENES PLACEHOLDER Y TÉCNICAS */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 2px dashed rgba(46, 125, 50, 0.35);
  border-radius: 12px;
  background: rgba(46, 125, 50, 0.05);
  color: rgba(27, 94, 32, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.8rem;
  text-align: center;
  margin: 1rem 0;
}

/* Technical diagram reference images */
.technical-diagram {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(46, 125, 50, 0.2);
  border-radius: 4px;
  margin: 0.8rem 0;
  background: white;
}

.image-placeholder--narrow {
  aspect-ratio: 5 / 3;
}

.image-placeholder--step {
  aspect-ratio: 16 / 6;
  margin: 0.8rem 0;
}

/* LAYOUTS */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* CAJAS ESPECIALES */
.warning-box {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(255, 255, 255, 0.8));
  border-left: 4px solid var(--color-warning);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.warning-box h3 {
  margin: 0 0 0.5rem;
  color: #e65100;
}

.warning-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.warning-box li {
  padding-left: 1.5rem;
  margin-bottom: 0.4rem;
  position: relative;
  font-size: 0.95rem;
}

.warning-box li::before {
  content: "⚠";
  position: absolute;
  left: 0;
  color: var(--color-warning);
}

/* NOTAS Y TIPS */
.tip {
  background: rgba(46, 125, 50, 0.08);
  border-left: 3px solid var(--color-brand);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.contact-info {
  font-size: 0.9rem;
  margin: 0.4rem 0;
}

.contact-note {
  font-size: 0.85rem;
  color: rgba(31, 42, 36, 0.65);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* ESTILOS DE IMPRESIÓN */
@page {
  size: A4 portrait;
  margin: 1.5cm;
}

@media print {
  body {
    background: #fff;
  }

  .page {
    min-height: 29.7cm;
    padding: 1.5cm;
    box-shadow: none;
    margin: 0;
    border: none;
    page-break-after: always;
  }

  .page--cover {
    min-height: 29.7cm;
  }

  .page:last-of-type {
    page-break-after: auto;
  }

  .image-placeholder {
    border-style: solid;
    border-color: rgba(46, 125, 50, 0.25);
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}

@media screen {
  body {
    padding: 2rem;
  }

  .page {
    margin: 0 auto 2rem;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(31, 42, 36, 0.1);
    border-radius: 8px;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .section h2 {
    font-size: 1.2rem;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .logo {
    width: 80px;
  }

  .page--cover h1 {
    font-size: 2.5rem;
  }
}
