/*
 * components/banner-hero.css — PT Asuransi Intra Asia
 * Shared hero banner styles for all pages with .banner_man2.
 * Loaded via index1.php and index2.php.
 *
 * Desktop (≥ 992px): hero image absolutely positioned at top-right,
 *   touching both top and right edges, capped at 42% width.
 * Mobile/tablet (≤ 991px): image stacks full-width, proportional, no crop.
 *   Container + column horizontal padding zeroed so image touches banner edges
 *   (mirrors what responsive.css already does at ≤ 600px, but extends to 991px).
 * All sizes: banner text guaranteed white.
 *
 * !important inventory — 18 total, all fighting responsive.css rules:
 *   Desktop (≥ 992px): 2 — width: auto, max-width: none on .hero2 img
 *     (fighting .hero2 img { max-width/width: 100% !important } global)
 *   Mobile/tablet (≤ 991px): 16 — height: auto, overflow, align-items, margin-top,
 *     container/row/column padding zeroed (601–991px gap not covered by responsive.css),
 *     text padding restored. Fighting @media 600/480/360px fixed heights + bottom-align.
 *   Will reduce to 2 when responsive.css mobile hero section is refactored.
 */

/* Clip overflow, provide positioning context for absolute image */
.banner_man2 {
  overflow: hidden;
  position: relative;
}

/* ============================================================
   DESKTOP (≥ 992px) — image pinned to top-right corner
   ============================================================ */
@media (min-width: 992px) {

  /* Row fills full banner height so text column has room to center */
  .banner_man2 .container > .row {
    min-height: 520px;
  }

  /* Remove Bootstrap y-gutter gap that pushes image down */
  .banner_man2 .hero-img {
    margin-top: 0;
    padding-top: 0;
    padding-right: 0;
  }

  /* ── Old structure: .hero-img > .hero2 > img ── */
  .banner_man2 .hero-img .hero2 {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 42%;
    max-width: 42%;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .banner_man2 .hero-img .hero2 img,
  .banner_man2 .hero-img img.hero2 {
    /* override responsive.css global: .hero2 img { max-width: 100% !important; width: 100% !important } */
    height: 100%;
    width: auto !important;
    max-width: none !important;
    max-height: none;
    display: block;
    flex-shrink: 0;
  }

  /* ── New structure: .hero-img > .hero2-wrapper > img.hero2-img ── */
  .banner_man2 .hero-img .hero2-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 42%;
    max-width: 42%;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .banner_man2 .hero-img .hero2-img {
    height: 100%;
    width: auto;
    max-width: none;
    max-height: none;
    display: block;
    flex-shrink: 0;
  }
}

/* ============================================================
   MOBILE/TABLET (≤ 991px) — gambar full-width, proporsional, tanpa whitespace
   ============================================================ */
@media (max-width: 991px) {

  /* ── Container: full-width, tanpa Bootstrap horizontal padding/centering ──
     Responsive.css sudah lakukan ini di ≤ 600px; di sini extend ke 601–991px.
     Tanpa ini, Bootstrap container (max-width: 720px at 768px) buat 24px gap
     biru di kiri-kanan gambar yang terlihat sebagai whitespace. */
  .banner_man2 > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  /* ── Row: hapus Bootstrap negative margin (kompensasi col padding) ── */
  .banner_man2 .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* ── Image column: tanpa Bootstrap column padding ── */
  .banner_man2 .hero-img {
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* Override .hero-img { height: 210/185/165px; overflow: hidden; align-items: flex-end; margin-top: -15/-10px } */
    height: auto !important;
    overflow: visible !important;
    align-items: flex-start !important;
    margin-top: 0 !important;
  }

  /* Override .hero2-wrapper { height: 100%; align-items: flex-end } */
  .banner_man2 .hero-img .hero2-wrapper {
    height: auto !important;
    align-items: flex-start !important;
  }

  /* Override img { height: 230/200/180px } — tampilkan penuh, lebar penuh */
  .banner_man2 .hero-img img,
  .banner_man2 .hero-img .hero2 img,
  .banner_man2 .hero-img img.hero2 {
    height: auto !important;
    width: 100%;
    object-position: center top;
  }

  .banner_man2 .hero-img .hero2-img {
    height: auto;
    width: 100%;
  }

  /* ── Text: tambah horizontal padding agar tidak nempel ke tepi viewport ──
     Diperlukan karena container padding sudah dihapus. Nilai 20px selaras
     dengan yang responsive.css pakai di .huruf_banner pada ≤ 600px. */
  .banner_man2 .huruf_banner,
  .banner_man2 .huruf_banner_contact {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ============================================================
   WHITE TEXT — all .huruf_banner / .huruf_banner_contact variants
   ============================================================ */
.banner_man2 .huruf_banner h1,
.banner_man2 .huruf_banner h2,
.banner_man2 .huruf_banner h3,
.banner_man2 .huruf_banner h4,
.banner_man2 .huruf_banner p,
.banner_man2 .huruf_banner_contact h1,
.banner_man2 .huruf_banner_contact h2,
.banner_man2 .huruf_banner_contact h3,
.banner_man2 .huruf_banner_contact p {
  color: #ffffff;
}
