/* ==========================================================================
   Consultanță Tehnică — Print stylesheet
   --------------------------------------------------------------------------
   Loaded with media="print" only. Optimised for A4, black & white friendly,
   strips chrome (header nav, footer links, language switcher), keeps the
   logo, main content and legal contact block.
   ========================================================================== */

@page {
  size: A4;
  margin: 1.5cm 2cm;
}

/* --------------------------------------------------------------------------
   Reset backgrounds, force readable colours
   -------------------------------------------------------------------------- */
* {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: #000 !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11pt;
  line-height: 1.5;
  color: #000;
  background: #fff !important;
}

/* --------------------------------------------------------------------------
   Hide chrome: navigation, footer links, language switcher, skip link,
   cookie banners, share buttons, video / iframe embeds
   -------------------------------------------------------------------------- */
header nav,
.site-header nav,
.main-nav,
.nav,
.navigation,
.lang-switch,
.language-switcher,
.locale-switcher,
.skip-link,
.cookie-banner,
.share,
.social,
form,
button,
input[type="submit"],
iframe,
video,
audio,
.no-print {
  display: none !important;
}

/* Footer: hide link blocks, but keep the legal/contact info that we will
   re-render at the bottom of the page. */
footer nav,
footer .footer-nav,
footer .footer-links,
footer .footer-columns {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Logo (keep it, monochrome friendly)
   -------------------------------------------------------------------------- */
.print-logo,
header img[alt*="Consultanță" i],
header img[alt*="Consultanta" i],
header img[alt*="Webpina" i],
header .logo,
.site-logo {
  display: block !important;
  max-height: 60px;
  max-width: 220px;
  margin: 0 0 18pt 0;
  filter: grayscale(100%) contrast(1.2);
}

header {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 12pt 0 !important;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3 {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: #000 !important;
  page-break-after: avoid;
  break-after: avoid;
  line-height: 1.25;
  margin-top: 14pt;
  margin-bottom: 6pt;
}

h1 { font-size: 22pt; margin-top: 0; }
h2 { font-size: 18pt; }
h3 { font-size: 14pt; }
h4 { font-size: 12pt; }
h5, h6 { font-size: 11pt; }

p, li, blockquote, dd, dt {
  orphans: 3;
  widows: 3;
}

p { margin: 0 0 8pt 0; }

ul, ol { margin: 0 0 8pt 1.2em; padding: 0; }

blockquote {
  margin: 8pt 0 8pt 1em;
  padding-left: 0.6em;
  border-left: 1pt solid #444 !important;
  font-style: italic;
}

code, pre, kbd, samp {
  font-family: "Courier New", Courier, monospace;
  font-size: 9.5pt;
}

pre {
  border: 0.5pt solid #999 !important;
  padding: 6pt 8pt;
  white-space: pre-wrap;
  word-wrap: break-word;
  page-break-inside: avoid;
  break-inside: avoid;
}

/* --------------------------------------------------------------------------
   Links — show the URL after the anchor for context
   -------------------------------------------------------------------------- */
a, a:visited {
  color: #000 !important;
  text-decoration: underline;
}

a[href^="http"]:after,
a[href^="mailto:"]:after,
a[href^="tel:"]:after {
  content: " (" attr(href) ")";
  font-size: 9pt;
  font-family: Georgia, serif;
  font-style: italic;
  word-break: break-all;
}

/* Don't append URLs for anchors that are wrapping images or are the logo */
a:has(img):after,
a.no-url:after,
a[href^="#"]:after { content: ""; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 8pt 0;
  page-break-inside: auto;
}

thead { display: table-header-group; }
tr { page-break-inside: avoid; break-inside: avoid; }

th, td {
  border: 0.5pt solid #444 !important;
  padding: 4pt 6pt;
  text-align: left;
  vertical-align: top;
  font-size: 10pt;
}

th {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  background: #eee !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
img, svg {
  max-width: 100% !important;
  height: auto !important;
  page-break-inside: avoid;
  break-inside: avoid;
}

figure {
  margin: 8pt 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

figcaption {
  font-size: 9pt;
  font-style: italic;
  margin-top: 3pt;
}

/* --------------------------------------------------------------------------
   Page breaks between major sections
   -------------------------------------------------------------------------- */
section,
article,
.page-break,
.section,
.major-section {
  page-break-before: auto;
  break-before: auto;
}

section + section,
article + article,
.page-break {
  page-break-before: always;
  break-before: page;
}

h1, h2 {
  page-break-before: auto;
  break-before: auto;
}

hr {
  border: 0;
  border-top: 0.5pt solid #444 !important;
  margin: 10pt 0;
}

/* --------------------------------------------------------------------------
   Main content container
   -------------------------------------------------------------------------- */
main, #main, .main-content {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --------------------------------------------------------------------------
   Legal / contact block printed at the bottom of every print job.
   Add <div class="print-legal-block"> ... </div> inside <Footer/> to
   surface the firm details, or rely on the @page bottom margin and
   running footer (browser support varies).
   -------------------------------------------------------------------------- */
.print-only,
.print-legal-block {
  display: block !important;
  margin-top: 18pt;
  padding-top: 8pt;
  border-top: 0.5pt solid #444 !important;
  font-size: 9pt;
  line-height: 1.45;
  font-family: Helvetica, Arial, sans-serif;
  color: #000 !important;
}

.print-legal-block .firm-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Page footer with page numbers
   -------------------------------------------------------------------------- */
@page {
  @bottom-right {
    content: "Pagina " counter(page) " / " counter(pages);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 8pt;
    color: #444;
  }
  @bottom-left {
    content: "Consultanță Tehnică · Operat de Webpina SRL · CUI RO44982888 · consultanta-tehnica.ro";
    font-family: Helvetica, Arial, sans-serif;
    font-size: 8pt;
    color: #444;
  }
}
