@media print {
  /* === BASE RESET === */
  html {
      margin: 0 !important;
      padding: 0 !important;
  }

  * {
    background: white !important;
    color: black !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* === HIDE NON-ESSENTIAL ELEMENTS === */
  .navbar,
  .footer,
  .no-print,
  .btn,
  .alert,
  .pagination,
  .dropdown,
  .modal,
  .carousel,
  .progress,
  .spinner-border,
  .toast,
  .popover,
  .tooltip {
    display: none !important;
  }

  /* === BODY & PAGE SETUP === */
  body {
    background: white !important;
    color: black !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 10px;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  @page {
    size: A4;
    margin: 1cm;
  }

  /* === PRESERVE TWO-COLUMN LAYOUT === */
  .container,
  .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
  }

  .content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Left column (details + education) - typically col-md-4 */
  .col-md-4,
  .col-lg-4,
  .col-4 {
    width: 33% !important;
    flex: 0 0 33% !important;
    max-width: 33% !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    border-right: #555 solid 1px;
  }

  /* Right column (work experience) - typically col-md-8 */
  .col-md-8,
  .col-lg-8,
  .col-8 {
    width: 67% !important;
    flex: 0 0 67% !important;
    max-width: 67% !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  /* Lists */
  ul, ol {
    font-size: 10px !important;
    margin: 0 0 10px 16px !important;
    padding-left: 0 !important;
  }

  li {
    margin: 0 0 5px 0 !important;
  }

  /* === LINKS === */
  a, a:visited, a:link, a:hover {
    color: black !important;
    text-decoration: none !important;
  }


  a[href^="http"]:after,
  a[href^="//"]:after,
  a[href^="mailto:"]:after {
    content: " (" attr(href) ")";
    font-size: 9px;
    color: #555 !important;
  }

  /* === PAGE BREAK CONTROL === */
  .row {
    page-break-inside: auto !important;
  }

  h1, h2, h3, h4, h5, h6 /*, p, ul, ol, li */ {
    page-break-inside: avoid !important;
  }

  /* === BOOTSTRAP UTILITIES === */
  .m-0 { margin: 0 !important; }
  .m-1 { margin: 4px !important; }
  .m-2 { margin: 8px !important; }
  .m-3 { margin: 12px !important; }
  .m-4 { margin: 14px !important; }
  .m-5 { margin: 16px !important; }

  .mb-0 { margin-bottom: 0 !important; }
  .mb-1 { margin-bottom: 4px !important; }
  .mb-2 { margin-bottom: 8px !important; }
  .mb-3 { margin-bottom: 12px !important; }
  .mb-4 { margin-bottom: 14px !important; }
  .mb-5 { margin-bottom: 16px !important; }

  .p-0 { padding: 0 !important; }
  .p-1 { padding: 4px !important; }
  .p-2 { padding: 8px !important; }

  /* Force all background colors to white */
  .bg-primary, .bg-secondary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-dark {
    background: white !important;
    color: black !important;
  }

  /* Force all text colors to black */
  .text-primary, .text-secondary, .text-success, .text-info, .text-warning, .text-danger, .text-light, .text-muted, .text-white {
    color: black !important;
  }

  a[href]:after {
    content: none !important; /* Desactiva la impresión de la URL tras el texto */
  }
}
