/* ==========================================================================
   print.css — Reglas de impresión para la versión web (index.html)
   La versión visual puede ocupar más de dos páginas solo si se imprime
   expresamente. Para postulaciones usar cv-ats.html.
   ========================================================================== */

@media print {
  @page {
    size: A4;
    margin: 14mm 13mm;
  }

  html {
    scroll-behavior: auto;
  }

  body,
  body.modo-impresion {
    background: #fff !important;
    color: #1c2430 !important;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  /* Sin fondos que gasten tinta, sin elementos flotantes ni controles */
  .fondo,
  .nav,
  .hero__cta,
  .skip-link,
  .footer__controles,
  .btn {
    display: none !important;
  }

  .seccion {
    padding: 0 0 8mm;
    max-width: none;
  }

  .hero {
    padding-top: 4mm;
  }

  .tarjeta,
  .reconocimiento,
  .proyecto,
  .cert,
  .skill-cat {
    background: #fff !important;
    border: 1px solid #cfd6df !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border-radius: 8px;
  }

  /* Sin cortes dentro de una experiencia, proyecto o credencial */
  .experiencia,
  .proyecto,
  .cert,
  .skill-cat,
  .formacion__item,
  .reconocimiento {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    color: #101826 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  .hero h1 .gradiente {
    background: none;
    color: #101826;
    -webkit-text-fill-color: initial;
  }

  .hero__titulo-principal,
  .hero__subtitulo,
  .seccion__bajada,
  .experiencia__contexto,
  .cert__meta,
  .proyecto__resumen,
  .formacion__detalle,
  .reconocimiento figcaption,
  .reconocimiento__nota {
    color: #45536a !important;
  }

  .seccion__kicker {
    color: #1d4ed8 !important;
  }

  .chip,
  .meta-chip,
  .tag,
  .skill-cat__items li,
  .reconocimiento__aspectos li,
  .proyecto__estado,
  .hero__estado {
    background: #fff !important;
    border: 1px solid #b9c2cf !important;
    color: #2a3648 !important;
    box-shadow: none !important;
  }

  .hero__estado::before {
    box-shadow: none;
    background: #2a3648;
  }

  /* Enlaces legibles: mostrar la URL escrita */
  a {
    color: #1d4ed8 !important;
    text-decoration: none;
  }

  .cert__acciones a::after,
  .contacto__lista a::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #5b6a80;
    word-break: break-all;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before,
  .experiencia::before {
    display: none;
  }

  .proyecto__visual {
    display: none;
  }

  .diagrama-flujo {
    display: none;
  }

  .proyectos__filtros,
  .proyectos__filtros-label {
    display: none;
  }

  .proyecto__funciones,
  .proyecto__funciones-preview {
    columns: 1;
  }

  .proyecto__resumen--clamp {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .proyecto__privacidad {
    border: 1px solid #b9c2cf;
    background: #fff;
  }

  .cert__imagen {
    display: none;
  }

  .qr-card {
    box-shadow: none;
    border: 1px solid #b9c2cf;
  }

  .revelar {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
