/* ═══════════════════════════════════════════════════════════════════
   print.css — Versión imprimible / PDF del brochure
   Activado al hacer Ctrl/Cmd+P o al usar el botón "Descargar PDF"
   ═══════════════════════════════════════════════════════════════════ */

@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {

  /* Reset general */
  *, *::before, *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    background: white !important;
    color: #1a1a1a !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  /* Ocultar UI no imprimible */
  .nav,
  .progress,
  .swipe-hint,
  .back-btn,
  .skip-link {
    display: none !important;
  }

  /* Cada slide en su propia página */
  .slide {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    padding: 1.5cm 0 !important;
    margin: 0 !important;
    page-break-after: always;
    page-break-inside: avoid;
    opacity: 1 !important;
    transform: none !important;
    overflow: visible !important;
    display: block !important;
  }

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

  .slide-inner {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ocultar el slide en blanco initial */
  .slide.active::before { display: none !important; }

  /* Títulos */
  h1, h2, h3, h4 {
    color: #213a68 !important;
    page-break-after: avoid;
  }

  h1 { font-size: 24pt; }
  h2 { font-size: 18pt; margin-bottom: 8pt; }
  h3 { font-size: 14pt; margin-bottom: 6pt; }
  h4 { font-size: 12pt; margin-bottom: 4pt; }

  .slide-heading { font-size: 18pt !important; }
  .slide-text { font-size: 11pt !important; max-width: 100% !important; }

  /* Acento dorado mantiene color */
  .gold,
  .slide-heading .gold,
  .ed-gold {
    color: #b8902a !important;
    font-weight: 800;
  }

  /* Forzar color institucional en headings */
  .slide-label,
  .eyebrow {
    color: #b8902a !important;
    border-color: #b8902a !important;
  }

  /* Cards */
  .card,
  .stat,
  .list-item,
  .numbered,
  .hybrid-card,
  .contrato-card,
  .linea-card,
  .org-node {
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }

  /* Mega-card: el clímax — fondo dorado */
  .mega-card {
    background: linear-gradient(135deg, #fff5d6, #fffaeb) !important;
    border: 2px solid #b8902a !important;
  }

  .mega-card .amount {
    color: #b8902a !important;
    font-size: 36pt !important;
  }

  .mega-card .label,
  .mega-card .breakdown-row strong {
    color: #b8902a !important;
  }

  /* Tablas */
  .data-table {
    width: 100% !important;
    page-break-inside: auto;
  }

  .data-table thead th {
    background: #213a68 !important;
    color: white !important;
    border-color: #213a68 !important;
  }

  .data-table td {
    border: 1px solid #ddd !important;
    color: #333 !important;
  }

  .data-table td:last-child {
    color: #b8902a !important;
    font-weight: 700;
  }

  .data-table tfoot td {
    background: #fff5d6 !important;
    color: #b8902a !important;
    font-weight: 800;
  }

  /* Mostrar todas las columnas en print (incluso col-hide-mob) */
  .col-hide-mob,
  .col-art,
  .col-subreg,
  .col-vig,
  .col-objeto {
    display: table-cell !important;
  }

  /* Tags */
  .tag,
  .badge,
  .vertical-tag,
  .dep {
    background: #f9f9f9 !important;
    border: 1px solid #b8902a !important;
    color: #b8902a !important;
  }

  /* Org tree */
  .org-node.gerente {
    background: #213a68 !important;
    color: white !important;
  }

  .org-node.gerente strong { color: white !important; }

  /* Donut chart: mantener colores */
  .donut-svg circle[stroke="#3498db"] { stroke: #3498db !important; }
  .donut-svg circle[stroke="#2ecc71"] { stroke: #2ecc71 !important; }
  .donut-svg circle[stroke="#c8a23c"] { stroke: #b8902a !important; }
  .donut-svg text { fill: #b8902a !important; }

  /* Slide portada y cierre — destacadas */
  #portada,
  #cierre {
    text-align: center;
  }

  #portada .logo,
  #cierre .cierre-logo {
    width: 100px !important;
  }

  /* Hide animation states (forzar visible) */
  [data-animate],
  [data-animate].animate-in {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Footer informativo en cada página */
  @page {
    @bottom-center {
      content: "E-DESARROLLO S.A.S. — Presentación Institucional";
      font-family: sans-serif;
      font-size: 8pt;
      color: #888;
    }
    @bottom-right {
      content: counter(page) " / " counter(pages);
      font-size: 8pt;
      color: #888;
    }
  }

  /* Links: mostrar URL después del texto */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: '';
  }
}
