/* =============================================
   OUR OFFICE PAGE  (page-our-office.html)
   Patterns: office-banner.php (hero), contact-visit-us.php (address + map,
   styled in contact.css), home-cta.php.
   ============================================= */

/* Hero banner ------------------------------------------------ */
.ib-office-banner.wp-block-cover {
  padding: 167px 0;
  align-items: center;
  justify-content: center;
}

/* Gradient scrim over the background image. Sits above the img and below the
   inner container, which core ships at z-index:auto so it needs lifting. */
.ib-office-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    360deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 76.36%
  );
  opacity: 0.8;
  pointer-events: none;
}

.ib-office-banner .wp-block-cover__image-background {
  object-fit: cover;
}

.heading-banner-our-office {
  color: white !important;
  text-align: center;
  line-height: 1;
  text-shadow: 0px 0px 6px #00000040;
  font-weight: 800;
}

.ib-office-banner .wp-block-cover__inner-container {
  width: 100%;
  z-index: 2;
}

@media screen and (max-width: 767px) {
  .ib-office-banner.wp-block-cover {
    min-height: 200px !important;
    padding: 24px 0;
  }
}

/* Office listing (office-listing.php) ------------------------- */
.ib-office-listing {
  margin: 0 auto;
  box-sizing: border-box;
}

/* Head-office hero: address card floating over a full-box photo */
.ib-office-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin: 40px 0;
  aspect-ratio: 11/4;
}

.ib-office-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  z-index: 0;
}

.ib-office-hero__card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 46%;
  height: 100%;
}

/* Shared address pill: rounded panel with a colour fill behind the rows.
   Hero uses the default (primary fill, white text); the info card uses
   --light, which reverses the two colours. */
.ib-office-pill {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  border-bottom-right-radius: 50% 65%;
  background-color: #fff;
}
.ib-office-pill::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 98%;
  height: 100%;
  border-bottom-right-radius: 50% 65%;
  background: var(--wp--preset--color--primary);
}

.ib-office-pill .ib-office-pill__content,
.ib-office-pill .ib-office-pill__content * {
  font-family: var(--wp--preset--font-family--noto-sans-jp);
}

.ib-office-pill__content {
  padding: 0 84px 0 60px;
  width: 100%;
}

.ib-office-pill__title {
  color: #fff !important;
  margin: 0;
  text-transform: capitalize;
}

.ib-office-pill .ib-office-row__label,
.ib-office-pill .ib-office-row__value {
  color: #fff;
  line-height: 1.35;
}
.ib-office-pill .ib-office-row__label::first-letter {
  text-transform: uppercase;
}

/* Info-card variant: colours reversed from the hero pill */
.ib-office-pill--light {
  background-color: var(--wp--preset--color--primary);
}
.ib-office-pill--light::after {
  background: #fff;
}
.ib-office-pill--light .ib-office-pill__title,
.ib-office-pill--light .ib-office-row__label,
.ib-office-pill--light .ib-office-row__value {
  color: var(--wp--preset--color--foreground);
}
.ib-office-pill--light .ib-office-row {
  border-bottom-color: #3333334D;
}

/* Branch section */
.ib-office-sec {
  padding: 40px 0;
}

.ib-office-sec__head {
  text-align: center;
  margin: 0 auto 40px;
}

.ib-office-sec__title {
  margin: 0 0 20px;
}

.ib-office-sec__desc {
  margin: 0;
  text-align: center;
}
.ib-office-sec__desc > p {
  margin: 0 0 24px;
}
.ib-office-sec__desc > p::last-child {
  margin-bottom: 0;
}

/* Feature bullets */
.ib-office-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 40px;
}

.ib-office-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  flex: 1 1 0;
  padding: 20px 0;
}

.ib-office-feature:not(:last-child) {
  border-right: 1px dashed #77ACF1
}

.ib-office-feature__icon {
  color: var(--wp--preset--color--primary);
  flex-shrink: 0;
}

.ib-office-feature__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--wp--preset--color--primary);
}

.ib-office-feature__body span {
  color: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--noto-sans-jp);
}

.ib-office-feature__text,
.ib-office-feature__note {
  color: var(--wp--preset--color--primary);
}

/* Address + map card: full-box map with the info panel overlaid on top */
.ib-office-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 11/4;
  margin: 0 auto;
  border: 1px solid var(--wp--preset--color--primary);
}

.ib-office-card__map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  /* Wider than the box so the map centre (marker) lands at ~75% — right-of-centre,
       clear of the info panel. Overflow on the right is clipped by the card. */
  width: 150%;
}

.ib-office-card__info {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: fit-content;
  min-width: 46%;
  height: 100%;
}

.ib-office-card__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Shared address / tel / fax rows */
.ib-office-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 40px;
  align-items: start;
  padding: 20px 0;
border-bottom: 1px dashed #FFFFFF4D;
}

/* Below 900px: split each block into two stacked cards — image/map on top,
   address content below. */
@media (max-width: 900px) {
  /* Hero: photo stacked on top, card below */
  .ib-office-hero {
    aspect-ratio: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .ib-office-hero__img {
    position: static;
    width: 100%;
    height: 220px;
  }

  /* Office card: map on top, info panel below */
  .ib-office-card {
    aspect-ratio: auto;
    border-radius: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: none;
  }
  .ib-office-card__map {
    order: -1;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
    width: 100%;
    height: 240px;
    border: 1px solid var(--wp--preset--color--primary);
    border-bottom: none;
    overflow: hidden;
  }
  .ib-office-card__map iframe {
    width: 100%;
    height: 100%;
    transform: none;
  }

  /* Both address panels: full-width blocks, no floating overlay */
  .ib-office-hero__card,
  .ib-office-card__info {
    position: relative;
    transform: none;
    width: auto;
    max-width: none;
    height: auto;

  }

  .ib-office-pill {
    border-left: 1px solid var(--wp--preset--color--primary);
    border-bottom: 1px solid var(--wp--preset--color--primary);
    border-bottom-left-radius: 20px;
    height: auto;
    overflow: hidden;
  }

  .ib-office-hero__card{
   border-right: 1px solid var(--wp--preset--color--primary);
  }

  .ib-office-pill__content {
    padding: 20px;
  }
  .ib-office-row{
    padding: 10px 0;
  }
}

/* Below 680px: features stack into a single column — the divider moves from
   the right edge to the bottom. */
@media (max-width: 680px) {
  .ib-office-sec__head{
    margin: 0 auto;
  }
  .ib-office-features {
    flex-direction: column;
      margin: 0 auto;
  }
  .ib-office-sec{
    padding: 28px 0;
  }
  .ib-office-feature:not(:last-child) {
    border-right: none;
    border-bottom: 1px dashed #77ACF1;
  }
}
@media (max-width: 480px) {
  .ib-office-row {
    gap: 30px;
  }
}
