/*
Theme Name: Bioconc
Description: Classic bilingual theme for the Bioconc marketing site.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.3
Text Domain: bioconc
*/

body{margin:0;background:#F6F3EC;font-family:'DM Sans',system-ui,sans-serif;color:#17201B}
*{box-sizing:border-box}
a{color:#2F6B47;text-decoration:none}
a:hover{color:#D8232A}

[hidden]{display:none !important}

@keyframes bcMarquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){[style*="bcMarquee"]{animation:none!important}}
.bc-track::-webkit-scrollbar{display:none}

/* Editor text on article / project pages */
.bc-entry img{max-width:100%;height:auto;border-radius:16px}
.bc-entry figure{margin:18px 0}
.bc-entry h2,.bc-entry h3{font-family:'Plus Jakarta Sans',sans-serif;color:#17201B;letter-spacing:-.01em}

.bc-nav {
  margin-left: auto;
  min-width: 0;
  font: 500 13.5px 'Plus Jakarta Sans', sans-serif;
}
.bc-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bc-nav li {
  margin: 0;
  padding: 0;
}
.bc-nav a {
  color: #3A4740;
}
.bc-nav .current-menu-item > a,
.bc-nav .current_page_item > a {
  color: #D8232A;
  border-bottom: 2px solid #D8232A;
  padding-bottom: 3px;
}

.bc-lang {
  display: flex;
  border: 1px solid rgba(23, 32, 27, .15);
  border-radius: 999px;
  overflow: hidden;
  font: 600 11px 'Plus Jakarta Sans', sans-serif;
}
.bc-lang a,
.bc-lang span {
  padding: 6px 11px;
  color: #5A655D;
}
.bc-lang .is-current {
  background: #143A28;
  color: #fff;
}

/* Header: desktop shows the menu inline; phones get the ☰ panel (assets/js/site.js initHeader). */
.bc-header__menu {
  display: contents;
}
.bc-header__menu-lang,
.bc-header__toggle,
.bc-header__wa-icon {
  display: none;
}

@media (max-width: 900px) {
  /* overflow:hidden made .bc-page a scroll container, which stopped the header from sticking. */
  .bc-page {
    overflow: clip !important;
  }
  .bc-header {
    transition: transform .25s ease;
  }
  .bc-header.is-hidden {
    transform: translateY(-100%);
  }
  .bc-header__bar {
    padding: 10px 16px !important;
    gap: 10px !important;
  }
  .bc-header__brand {
    gap: 9px !important;
    min-width: 0;
  }
  .bc-header__brand img {
    height: 34px !important;
  }
  .bc-header__tools {
    margin-left: auto;
    gap: 8px !important;
  }
  .bc-header__menu,
  .bc-header__tools > .bc-lang,
  .bc-header__wa-text {
    display: none;
  }
  .bc-header__wa {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 !important;
  }
  .bc-header__wa-icon {
    display: block;
  }
  .bc-header__toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(23, 32, 27, .15);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
  }
  .bc-header__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #17201B;
    transition: transform .2s ease, opacity .2s ease;
  }
  .bc-header.is-open .bc-header__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .bc-header.is-open .bc-header__toggle span:nth-child(2) {
    opacity: 0;
  }
  .bc-header.is-open .bc-header__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  /* The header's backdrop-filter is the containing block for its descendants, so the panel is sized from the JS-measured header height. */
  .bc-header.is-open .bc-header__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--bc-header-h, 64px));
    height: calc(100dvh - var(--bc-header-h, 64px));
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 8px 16px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #F6F3EC;
    border-top: 1px solid rgba(23, 32, 27, .07);
  }
  .bc-nav {
    margin-left: 0;
    font: 700 18px 'Plus Jakarta Sans', sans-serif;
  }
  .bc-nav ul {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
  }
  .bc-nav li + li {
    border-top: 1px solid rgba(23, 32, 27, .08);
  }
  .bc-nav a {
    display: flex;
    align-items: center;
    min-height: 54px;
    color: #17201B;
  }
  .bc-nav .current-menu-item > a,
  .bc-nav .current_page_item > a {
    border-bottom: 0;
    padding: 0 0 0 12px;
    box-shadow: inset 3px 0 0 #D8232A;
  }
  .bc-header__menu-lang {
    display: block;
  }
  .bc-header__menu-lang .bc-lang {
    display: inline-flex;
    font-size: 14px;
  }
  .bc-header__menu-lang .bc-lang a,
  .bc-header__menu-lang .bc-lang span {
    padding: 12px 24px !important;
  }
  html.bc-menu-open {
    overflow: hidden;
  }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .bc-header,
  .bc-header__toggle span {
    transition: none;
  }
}
@media (max-width: 330px) {
  .bc-header__tagline {
    display: none;
  }
}

/* Video accordion ([bioconc_videos]); behaviour in assets/js/site.js. */
.bc-va {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
.bc-va__row {
  display: flex;
  gap: 12px;
  height: clamp(300px, 40vw, 460px);
}
.bc-va__panel {
  position: relative;
  flex: 1;
  min-width: 52px;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 34px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  transition: flex .55s cubic-bezier(.2, .7, .2, 1);
}
.bc-va__panel.is-active {
  flex: 8;
}
.bc-va__panel:focus-visible,
.bc-vm button:focus-visible {
  outline: 3px solid #8FBF6A;
  outline-offset: 3px;
}
.bc-va__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.bc-va__play span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-left: 17px solid #143A28;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}
.bc-va__chip {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font: 600 11.5px 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
}
.bc-va__chip span {
  width: 10px;
  height: 10px;
  flex: none;
  border: 1.5px solid #fff;
  border-radius: 2px;
}
.bc-va__foot {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bc-va__num {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  font: 800 14px 'Plus Jakarta Sans', sans-serif;
}
.bc-va__label {
  min-width: 0;
  font: 700 14px/1.25 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-va__caption {
  display: block;
  font: 400 12px 'DM Sans', sans-serif;
  color: rgba(255, 255, 255, .85);
}
.bc-va__panel:not(.is-active) .bc-va__play,
.bc-va__panel:not(.is-active) .bc-va__chip,
.bc-va__panel:not(.is-active) .bc-va__label {
  display: none;
}

.bc-vm {
  position: fixed;
  inset: 0;
  z-index: 100000; /* above the WordPress admin bar (99999) for logged-in editors */
  background: rgba(5, 14, 9, .95);
  display: flex;
  flex-direction: column;
  color: #fff;
}
.bc-vm[hidden] {
  display: none;
}
.bc-vm__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px clamp(16px, 3vw, 32px);
}
.bc-vm__logo {
  height: 30px;
  width: auto;
  display: block;
}
.bc-vm__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 15px 'Plus Jakarta Sans', sans-serif;
  letter-spacing: .02em;
}
.bc-vm__count {
  flex: none;
  font: 600 12px 'Plus Jakarta Sans', sans-serif;
  letter-spacing: .2em;
  color: #8FBF6A;
}
.bc-vm__tools {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex: none;
}
.bc-vm__fs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 600 13px 'Plus Jakarta Sans', sans-serif;
}
.bc-vm__fs > span:first-child {
  width: 11px;
  height: 11px;
  border: 1.5px solid #fff;
  border-radius: 2px;
}
.bc-vm__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #143A28;
  cursor: pointer;
  font: 700 20px/1 'Plus Jakarta Sans', sans-serif;
}
.bc-vm__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 24px);
  padding: 0 clamp(12px, 3vw, 32px);
}
.bc-vm__nav {
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  font: 700 20px 'Plus Jakarta Sans', sans-serif;
}
.bc-vm__frame {
  position: relative;
  width: min(100%, calc((100vh - 220px) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
.bc-vm__frame iframe,
.bc-vm__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.bc-vm__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 20px 16px 24px;
}
.bc-vm__thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .3);
  background: transparent;
  color: #fff;
  font: 800 13px 'Plus Jakarta Sans', sans-serif;
}
.bc-vm__thumb.is-active {
  border-color: #fff;
  background: #fff;
}
.bc-vm__hint {
  width: 100%;
  text-align: center;
  margin-top: 6px;
  font: 400 12px 'DM Sans', sans-serif;
  color: rgba(255, 255, 255, .55);
}

@media (max-width: 640px) {
  /* Phones: stacked strips; the open panel takes the full width at 16:9. */
  .bc-va__row {
    flex-direction: column;
    height: auto;
  }
  .bc-va__panel {
    flex: none;
    height: 52px;
    border-radius: 26px;
    transition: none;
  }
  .bc-va__panel.is-active {
    flex: none;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .bc-va__panel:not(.is-active) .bc-va__label {
    display: block;
  }
  .bc-va__panel:not(.is-active) .bc-va__caption {
    display: none;
  }
  .bc-vm__fs > span:last-child,
  .bc-vm__hint {
    display: none;
  }
  .bc-vm__nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-va__panel {
    transition: none;
  }
}

.bc-subscribe {
  position: relative;
}
.bc-subscribe:focus-within {
  box-shadow: 0 0 0 2px #143A28, 0 4px 12px rgba(14, 42, 28, .06) !important;
}
.bc-subscribe button:hover {
  background: #0E2A1C !important;
}

/* Enlarge diagrams on phones: images marked data-bc-zoom in page content (assets/js/site.js initZoom). */
.bc-zoom {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  background: rgba(6, 20, 12, .94);
}
.bc-zoom[hidden] {
  display: none;
}
.bc-zoom__stage {
  flex: 1;
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
}
.bc-zoom__stage img {
  display: block;
  margin: auto;
  max-width: none;
  height: auto;
  background: #fff;
}
.bc-zoom__close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #143A28;
  font: 700 26px/1 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}
html.bc-zoom-open {
  overflow: hidden;
}
.bc-zoom-wrap {
  position: relative;
  display: block;
}
.bc-zoom-btn {
  display: none;
}
@media (max-width: 900px) {
  img[data-bc-zoom] {
    cursor: zoom-in;
  }
  .bc-zoom-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 58, 40, .88);
    color: #fff;
    cursor: pointer;
  }
  /* Jobmix: the stacked controls must not stick over the results once the header sticks. */
  #jobmix [style*="position:sticky"] {
    position: static !important;
  }
}

/*
 * Phones. Page HTML (content/pages, editable by admins) carries the designer's inline styles,
 * so these overrides match on those inline declarations; scope = everything below the header.
 */
@media (max-width: 640px) {
  /* Page gutters and section rhythm */
  .bc-page section[style*="max-width:1200px"],
  .bc-page > main[style*="max-width:1200px"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .bc-page section[style*="padding:44px 24px 0"] {
    padding-top: 40px !important;
  }
  .bc-page section[style*="padding:64px 24px 0"] {
    padding-top: 48px !important;
  }

  /* Cards: one inner padding, one corner radius, single column */
  :where(.bc-page > :not(.bc-header)) :is([style*="padding:34px"], [style*="padding:32px 34px"], [style*="padding:28px 30px"], [style*="padding:28px 32px"], [style*="padding:40px 38px"], [style*="padding:26px 28px"]) {
    padding: 24px 20px !important;
  }
  :where(.bc-page > :not(.bc-header)) [style*="padding:56px 44px"] {
    padding: 32px 20px 28px !important;
  }
  :where(.bc-page > :not(.bc-header)) :is([style*="border-radius:32px"], [style*="border-radius:28px"]) {
    border-radius: 24px !important;
  }
  :where(.bc-page > :not(.bc-header)) [style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  /* Stacked columns: dividers move from the left edge to the top */
  :where(.bc-page > :not(.bc-header)) [style*="border-left:1px solid rgba(23,32,27,.08)"] {
    border-left: 0 !important;
    border-top: 1px solid rgba(23, 32, 27, .08);
  }
  /* Grey list wrappers (Proyek, Riset, project page): cards sit straight on the page */
  .bc-page section > div[style*="background:#EFEDE4"][style*="padding:34px"] {
    padding: 0 !important;
    background: none !important;
    border-radius: 0 !important;
  }

  /* Type: headings scale with the screen, nothing under 12px */
  :where(.bc-page > :not(.bc-header)) h1 {
    font-size: clamp(26px, 7.4vw, 30px) !important;
  }
  :where(.bc-page > :not(.bc-header)) h2[style*="font:800"] {
    font-size: clamp(22px, 6.4vw, 26px) !important;
  }
  :where(.bc-page > :not(.bc-header)) :is([style*="00 9px"], [style*="00 10px"], [style*="00 11px"], [style*="00 11.5px"]) {
    font-size: 12px !important;
  }
  /* iOS zooms into fields under 16px */
  :where(.bc-page > :not(.bc-header)) input:is([type="email"], [type="number"], [type="text"]) {
    font-size: 16px !important;
  }

  /* Home: gallery shows whole photos (some carry their caption in the image) */
  [data-bc-gallery] {
    height: auto !important;
    aspect-ratio: 16 / 10;
  }
  [data-bc-gallery] img[data-bc-slide] {
    object-fit: contain !important;
  }
  [data-bc-gallery] > div:last-child {
    bottom: 2px !important;
    gap: 0 !important;
  }
  [data-bc-gallery-dot] {
    width: 42px !important;
    height: 30px !important;
    padding: 12.5px 4px !important;
    background-clip: content-box !important;
  }
  [data-bc-gallery-prev],
  [data-bc-gallery-next] {
    width: 40px !important;
    height: 40px !important;
  }
  /* Home: hero product photo */
  :where(.bc-page > :not(.bc-header)) [style*="min-height:520px"] {
    min-height: 0 !important;
  }
  :where(.bc-page > :not(.bc-header)) [style*="min-height:340px"] {
    min-height: 260px !important;
  }
  /* Home: "Jelajahi" cards peek at the edge, shorter text, arrows under the cards */
  section:has(> [data-bc-scroller]) {
    display: flex;
    flex-direction: column;
  }
  section:has(> [data-bc-scroller]) > div:first-child {
    display: contents !important;
  }
  section:has(> [data-bc-scroller]) > div:first-child > div:last-child {
    order: 2;
    align-self: flex-end;
    margin-top: 16px;
  }
  [data-bc-scroller] {
    order: 1;
    gap: 12px !important;
    margin: 20px -16px 0 !important;
    padding: 0 16px 4px !important;
    scroll-padding-left: 16px !important;
  }
  [data-bc-scroller] > a {
    width: 78vw !important;
    max-width: 300px;
  }
  [data-bc-scroller] > a p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  [data-bc-scroller] > a > div:last-child {
    flex-basis: 210px !important;
  }
  .bc-va__chip {
    background: rgba(6, 20, 12, .55);
  }

  /* Teknologi: variant rows align to the title */
  .bc-product-row {
    align-items: flex-start !important;
  }
  .bc-product-row > img {
    margin-top: 2px;
  }

  /* Produk: brochure link as a button */
  .bc-brochure-btn {
    display: block !important;
    margin-top: 14px !important;
    padding: 12px 16px;
    border: 1.5px solid rgba(142, 27, 32, .3);
    border-radius: 999px;
    text-align: center;
    font-size: 13.5px !important;
  }

  /* Proyek: map at its own proportions */
  #proyek div[style*="min-height:320px"] {
    min-height: 0 !important;
  }
  #proyek div[style*="min-height:320px"] > img {
    position: static !important;
    display: block;
    height: auto !important;
    padding: 12px !important;
  }

  /* Proyek / Riset cards: the whole card opens the page, the button becomes a link */
  .bc-card {
    position: relative;
  }
  .bc-card__cta {
    padding: 2px 0 !important;
    background: none !important;
    color: #143A28 !important;
    text-align: left !important;
    font-size: 14px !important;
  }
  .bc-card__cta::before {
    content: "";
    position: absolute;
    inset: 0;
  }
  .bc-card__cta::after {
    content: " →";
  }

  /* Simulasi Jobmix */
  [data-jm="fc"] button {
    padding: 13px 0 !important;
  }
  [data-jm="r-input"] {
    height: 32px;
  }
  [data-jm="adv-toggle"] {
    padding: 10px 0 !important;
  }
  #jobmix [style*="overflow-x:auto"] {
    background:
      linear-gradient(to left, #fff 40%, rgba(255, 255, 255, 0)) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%, rgba(14, 42, 28, .2), rgba(14, 42, 28, 0)) right center / 12px 100% no-repeat scroll;
  }
  #jobmix table tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 128px;
    max-width: 150px;
    background: #fff;
    box-shadow: 1px 0 0 rgba(23, 32, 27, .1);
  }
  #jobmix a[href^="https://wa.me/"] {
    width: 100%;
    text-align: center;
    white-space: normal !important;
  }

  /* Kemitraan: distributor regions as a 2-column grid */
  #distributor div[style*="flex-wrap:wrap"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }
  #distributor div[style*="flex-wrap:wrap"] > div {
    text-align: center;
  }

  /* Karier: long email address fits the button */
  .bc-apply-email {
    font-size: 14px !important;
    overflow-wrap: anywhere;
  }

  /* Footer */
  .bc-footer {
    padding: 40px 16px 28px !important;
  }
  .bc-footer__logo {
    margin-left: -30px; /* logo-footer.png has ~22% transparent margin on the left */
  }
  .bc-footer__links {
    gap: 0 !important;
  }
  .bc-footer__links a {
    display: block;
    padding: 9px 0;
  }
  .bc-footer__product {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0 !important;
  }
  .bc-footer__product > a:first-child {
    padding-bottom: 2px;
  }
  .bc-footer__brochure {
    padding-top: 2px !important;
    font-size: 12.5px !important;
  }
  .bc-subscribe input[type="email"] {
    padding: 12px 14px !important;
  }
  .bc-subscribe button {
    padding: 12px 18px !important;
    font-size: 13px !important;
  }
  .bc-footer__bottom {
    flex-direction: column;
    gap: 8px !important;
  }
  .bc-footer__phones {
    display: grid;
    gap: 2px;
  }
  .bc-footer__sep {
    display: none;
  }
  .bc-footer__phones a {
    display: inline-block;
    padding: 8px 0;
    color: #2F6B47 !important;
    font-weight: 600;
  }
}
