/* =====================================================================
   PRINT STYLESHEET – Department of Consumer Affairs (home.blade.php)
   Load AFTER bootstrap/theme CSS, e.g. in layouts/themes.blade.php:
   <link rel="stylesheet" media="print"
         href="{{ asset('public/themes/th3/assets/css/print.css') }}">
   (Or paste everything inside an @media print { ... } block.)
   ===================================================================== */

/* ---------- 1. Page setup ---------- */
@page {
    size: A4 portrait;
    margin: 12mm 10mm 14mm 10mm;
}

/* ---------- 2. Global reset for paper ---------- */
*,
*::before,
*::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
}

html,
body {
    background: #fff !important;
    color: #000 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-size: 11pt;
    line-height: 1.4;
    -webkit-print-color-adjust: exact;   /* keep red heading borders & logos */
    print-color-adjust: exact;
}

.container,
.container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

img {
    max-width: 100% !important;
    break-inside: avoid;
    page-break-inside: avoid;
}

h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
    break-after: avoid;
    page-break-after: avoid;
}

a,
a:visited {
    color: #000 !important;
    text-decoration: none;
}

/* Fixed / sticky things would repeat on every page or overlap content */
.fixed-top,
.fixed-bottom,
.sticky-top,
[style*="position:fixed"],
[style*="position: fixed"] {
    position: static !important;
}

/* Remove the "vh" heights – the viewport has no meaning on paper */
.vh-50,
.vh-100,
.h-100,
.h-inherit {
    height: auto !important;
}

/* ---------- 3. Things that make no sense on paper ---------- */
/* Interactive controls */
.btn,
.slider-controls,
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators,
.owl-nav,
.owl-dots,
.banner-slider__toggle,
.banner-slider__prev,
.banner-slider__next,
.banner-slider__status,
.profile_social_icons,
.overlay,
/* Embeds print as blank boxes */
iframe,
#fb-root,
.fb-col,
.fb-page,
#videoCarousel,
.col-lg-6:has(#videoCarousel),
/* Duplicate copy of the news ticker list made by JS */
.logo-slider-Y > .logos-slide-Y + .logos-slide-Y,
/* Layout chrome – ADJUST these to the class names used in layouts.themes */
.skip-link,
.top-bar,
.accessibility-bar,
.navbar,
nav,
.mega-menu,
.back-to-top,
#back-to-top,
.scrollup,
.brand-logo,
.footer-links,
.footer-logos,
.external-links,
.visitor-counter,
.d-print-none {
    display: none !important;
}

/* ---------- 4. Top banner (Owl carousel): print only the current slide ---------- */
.banner_carousel,
.owl-carousel1 {
    display: block !important;
    height: auto !important;
    margin-bottom: 5mm;
}
.banner_carousel .owl-stage-outer {
    overflow: visible !important;
    height: auto !important;
}
.banner_carousel .owl-stage {
    transform: none !important;
    width: auto !important;
}
.banner_carousel .owl-item {
    display: none !important;
}
.banner_carousel .owl-item.active:not(.cloned) {
    display: block !important;
    width: 100% !important;
    float: none !important;
}
.banner_carousel img,
.banner_img {
    width: 100% !important;
    height: auto !important;          /* overrides inline height:60vh */
    max-height: 70mm;
    object-fit: contain;
}

/* ---------- 5. Ministers | Poster | Latest News ---------- */
/* At A4 width Bootstrap falls back to the mobile (stacked) grid,
   so the column widths are set explicitly here. */
.about_detail {
    padding: 0 !important;
}
.about_detail .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
}
.about_detail .minister-section {
    flex: 0 0 58% !important;
    max-width: 58% !important;
    border: 1px solid #ccc;
    padding: 2mm !important;
}
.about_detail .minister_image_slider {
    flex: 0 0 42% !important;
    max-width: 42% !important;
    padding-left: 4mm !important;
}
.about_detail .right-section {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-top: 5mm !important;
    border: 1px solid #ccc;
    padding: 2mm !important;
}

/* Minister cards */
.minister-section .d-flex.gap-2 {
    align-items: center;
    break-inside: avoid;
    page-break-inside: avoid;
}
.minister-section img {
    width: 22mm !important;
    height: auto !important;
}
.profile_heading { font-size: 11pt; }
.profile_sub_head { font-size: 9.5pt; margin: 0; }

/* Square poster slider: show only the slide currently in view */
.banner-slider {
    overflow: hidden !important;
}
.banner-slider__slide img {
    height: auto !important;
    max-height: 75mm;
    object-fit: contain;
}

/* Latest News ticker -> static list */
.logo-slider-Y,
.holder {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
.logos-slide-Y {
    transform: none !important;
    height: auto !important;
    padding-left: 0 !important;
}
.logos-slide-Y li {
    list-style: none;
    padding: 1.5mm 0;
    font-size: 10pt;
    break-inside: avoid;
    page-break-inside: avoid;
}
.logos-slide-Y li img {          /* PDF icon */
    height: 12px !important;
    vertical-align: middle;
}
.logos-slide-Y hr {
    border-top: 1px solid #ddd;
    opacity: 1;
}

/* ---------- 6. Jan Sunvai + Important Links ---------- */
.imp-news-sec .row {
    display: flex !important;
    flex-wrap: wrap !important;
}
.imp-news-sec .col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 1.5mm !important;
}
.imp-news-sec .col-md-8,
.imp-news-sec .col-md-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}
.important-links {
    border: 1px solid #ccc !important;
    padding: 3mm !important;
    margin-bottom: 4mm !important;
}
.important-links .card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Print the meeting URLs for the Jan Sunvai links – needed on paper */
.important-links .card-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    display: block;
    font-size: 8pt;
    color: #333;
    word-break: break-all;
}
.important-links .card-body a {
    text-decoration: underline;
}

/* Important Links tiles: one row of small tiles */
.important-links-box {
    height: auto !important;
    overflow: visible !important;
}
.important-links-box .row {
    display: flex !important;
    flex-wrap: wrap !important;
}
.important-links-box .row > .col {
    flex: 1 1 18% !important;
    max-width: 25% !important;
    padding: 1mm !important;
}
.important-links-box .card.wallet {
    min-height: 0 !important;
    text-align: center;
}
.important-links-box .card.wallet img {
    max-height: 18mm !important;
    width: auto !important;
    object-fit: contain;
}
.important-links-box .card.wallet p {
    font-size: 9pt;
    margin: 1mm 0 0;
}

/* ---------- 7. National Consumer Day publications ---------- */
.gallery-section .row {
    display: flex !important;
    flex-wrap: wrap !important;
}
.gallery-section .col-lg-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
}
.img-w img {
    max-height: 60mm !important;
    width: auto !important;
}
.gallery-section .heading,
.heading.w-25,
.heading.w-30 {
    width: auto !important;
    min-width: 50%;
}

/* ---------- 8. Media section: photo only (videos can't print) ---------- */
#photoCarousel .carousel-item {
    display: none !important;
}
#photoCarousel .carousel-item.active {
    display: block !important;
    float: none !important;
    transform: none !important;
}
#photoCarousel img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 90mm;
    margin: 0 auto;
}
.col-lg-6:has(#photoCarousel) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* ---------- 9. Success stories: two columns ---------- */
section .row > .col-lg-6.p-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 1.5mm !important;
}
section .row > .col-lg-6.p-3 > .border {
    padding: 3mm !important;
}

/* ---------- 10. Section spacing & page breaks ---------- */
section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.gallery-section,
.mt-5 {
    margin-top: 6mm !important;
}
.card,
.minister-section,
.carousel,
.border.rounded-3 {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* ---------- 11. Header & footer (from layouts.themes) ---------- */
header {
    border-bottom: 2px solid #000;
    margin-bottom: 4mm;
    padding-bottom: 2mm;
}
header img {
    max-height: 18mm !important;
    width: auto !important;
}
footer {
    border-top: 1px solid #000;
    margin-top: 6mm;
    padding-top: 3mm;
    font-size: 9pt;
    background: #fff !important;
    color: #000 !important;
    break-inside: avoid;
    page-break-inside: avoid;
}
footer * {
    color: #000 !important;
    background: transparent !important;
}