/* Print styles: text and the ECA logo only.
   Loaded with media="print", so it never affects the screen.
   To keep a specific picture in print (a chart, a map), give the image
   or its WPBakery element the class "print-keep".

   Pictures use display:none, so they take no space. Most blank space in
   print comes from the screen layout instead (fixed widths, row padding,
   spacers, full-width rows positioned by script), which is reset below. */

@page { margin: 15mm; }

/* ── Base type: sized for paper, not the screen ── */
html { font-size: 11pt !important; }
body {
  font-size: 11pt !important;
  line-height: 1.45 !important;
  background: #fff !important;
  color: #000 !important;
}
p, li, td, th, dd, blockquote { font-size: 11pt !important; line-height: 1.45 !important; }
h1, .stm-page-head__title { font-size: 20pt !important; line-height: 1.2 !important; }
h2 { font-size: 16pt !important; line-height: 1.25 !important; }
h3 { font-size: 13pt !important; }
h4, h5, h6 { font-size: 11.5pt !important; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 3mm !important; }
p, ul, ol, table { margin: 0 0 3mm !important; }

* {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ── Layout: one column at the page's width ──
   The screen layout uses fixed container widths and columns sized for a
   wide window, which pushes content sideways and cuts it off on paper. */
.container, .container-fluid, .row,
.vc_row, .vc_column-inner, .wpb_column, .vc_column_container,
[class*="col-"] {
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  left: auto !important;
  right: auto !important;
}
/* WPBakery "stretch row": script sets left/width from the window size */
[data-vc-full-width], .vc_row[data-vc-stretch-content] {
  left: 0 !important;
  width: auto !important;
}
.vc_row-full-width, .vc_clearfix, .vc_empty_space, .stm-spacing {
  display: none !important;
}
/* WPBakery "Design options" padding/margins (vc_custom_123…) and heights.
   WPBakery prints those as `.vc_custom_123 { … !important }` in a <style>
   block after this file, so equal specificity loses; "html body" adds
   enough to win. */
html body [class*="vc_custom_"], html body .vc_row, html body .vc_column-inner {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 4mm !important;
  min-height: 0 !important;
}
.vc_row-o-full-height, .vc_row-o-equal-height { min-height: 0 !important; height: auto !important; }

/* Fixed heights (theme rules, Design options, inline styles) leave big
   gaps once the pictures inside are gone. Only boxes with content are
   reset, so empty decorative lines keep their size. */
div:not(:empty), section:not(:empty) {
  height: auto !important;
  min-height: 0 !important;
}
/* Rows with a background colour or image get extra padding on screen */
.vc_row-has-fill,
.vc_row-has-fill > .vc_column_container > .vc_column-inner,
[class*="stm-bg"],
[style*="padding"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* WPBakery puts 35px under every element; tighten it, and none after the last */
.wpb_content_element, .vc_tta-container, .vc_message_box, .stm-title, .stm-separator {
  margin-bottom: 4mm !important;
}
.wpb_wrapper > :last-child { margin-bottom: 0 !important; }
/* Text blocks with a narrow max-width on screen use the full page */
.wpb_text_column, .stm-text-box, .stm-cta, [class*="__content"] {
  max-width: none !important;
}

/* ── Hide pictures, except the logo and anything marked print-keep ── */
img:not(.print-keep):not(.print-keep img):not(.eca-print-logo),
picture, video, iframe, svg:not(.print-keep svg),
.hero-fade__slide, .rev_slider_wrapper, .owl-carousel,
.vc_single_image-wrapper:not(.print-keep .vc_single_image-wrapper),
/* whole image elements, so their margins go too */
.wpb_single_image:not(.print-keep),
.wp-block-image:not(.print-keep),
figure:not(.print-keep):not(:has(blockquote)),
/* icons beside list items: some are pictures (hidden) and some are icon
   fonts (still shown), which looked inconsistent */
.stm-icon-box__ic-container, .stm-icon-list__icon {
  display: none !important;
}

/* ── Logo ──
   The header logo is white and vanishes on paper, so the header is hidden
   and a full-colour copy (added by inc/print.php, hidden on screen) prints
   at the top instead. */
.eca-print-logo {
  display: block !important;
  height: 18mm !important;
  width: auto !important;
  margin: 0 0 6mm !important;
}

/* ── Hide navigation and interactive bits ── */
#wpadminbar,
#masthead,
.top-bar,
.stm-nav, .stm-nav__menu_type_header,
.mobile-menu-trigger, [class*="hamburger"],
.search-bar, .stm-search-form, .widget_search,
.breadcrumbs, [class*="breadcrumb"],
.sidebar, .stm-vc-sidebar,
.widget_social-networks, .list_social-networks,
.widget_nav_menu,
.cta-row, .stm-btn, .hero-fade__button,
.vc_tta-tabs-container,           /* tab buttons; panels print below */
.comments-area, .comment-respond,
.eca-404__search, .eca-404__links {
  display: none !important;
}

/* Header: logo only, not overlaid on content */
#masthead, .header {
  position: static !important;
  height: auto !important;
  background: none !important;
  padding: 0 0 6mm !important;
  margin: 0 !important;
}

/* ── Text over images: plain black text on paper ── */
.stm-page-head,
.hero-fade {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 4mm !important;
  display: block !important;
  color: #000 !important;
}
.stm-page-head__overlay, .stm-page-head__separator { display: none !important; }
.hero-fade__text {
  position: static !important;
  max-width: none !important;
  padding: 0 !important;
  text-align: left !important;
}
.hero-fade__text h1, .hero-fade__text h2 { font-size: 20pt !important; }
.stm-page-head__title,
.hero-fade, .hero-fade h1, .hero-fade h2, .hero-fade p,
.blue-row, .blue-row p, .blue-row h5, .blue-row li {
  color: #000 !important;
}
.hero-fade h1::after, .hero-fade h2::after { display: none !important; }

/* ── Tabs and accordions: print every panel, not just the open one ── */
.vc_tta-panel-body {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
}
.vc_tta-panel-heading { background: none !important; border: 0 !important; }
.vc_tta-panel-title > a { color: #000 !important; font-weight: 700; padding: 0 !important; }

/* ── Links: show where external links go ── */
a { color: #000 !important; text-decoration: underline; }
main a[href^="http"]:not([href*="eca.edu.co"])::after,
.entry-content a[href^="http"]:not([href*="eca.edu.co"])::after,
.wpb_text_column a[href^="http"]:not([href*="eca.edu.co"])::after {
  content: " (" attr(href) ")";
  font-size: 0.85em;
  word-break: break-all;
}

/* ── Page breaks ── */
h1, h2, h3, h4 { break-after: avoid; }
table, figure, blockquote, li { break-inside: avoid; }

/* ── Footer: keep only contact details ── */
.footer, .footer_type_default {
  margin-top: 6mm !important;
  padding: 4mm 0 0 !important;
  border-top: 1px solid #999;
  background: none !important;
}
.footer .widget_text,
.footer .widget_nav_menu,
.footer .widget_title::after,
.footer .copyright {
  display: none !important;
}
.footer .list_contact-details .list__item::before { display: none !important; }
.footer .list_contact-details .list__item { padding-left: 0 !important; }
