/* Local responsive safeguards for the archived anoBoy theme. */
/* `overflow-x: hidden` can disable sticky positioning on mobile browsers. */
html, body { max-width: 100%; overflow-x: clip; }
html { background: #fff; }
:root { --bg-color: #fff; }
body { background: var(--bg-color); }

/* Apply the B/W switch to the page surfaces, not only to text variables. */
body, .wrap, .container, .home_index, .sub, .contentdeks, .contenttable {
  color: var(--font-color);
}
[data-theme="dark"] body {
  background-color: #000;
  color: #ddd;
}
[data-theme="dark"] .home_index,
[data-theme="dark"] .sub,
[data-theme="dark"] .contentdeks,
[data-theme="dark"] .contenttable,
[data-theme="dark"] .anoboy-index-toolbar {
  background-color: #1e1f26;
  color: #ddd;
}
[data-theme="dark"] .home_index {
  background-image: url('../img/news-update.png');
  background-position: left top;
  background-repeat: no-repeat;
}
[data-theme="dark"] select {
  background: #434557 !important;
  color: #fff;
}

/* Keep the mobile navigation visible while the page is being scrolled. */
#menu-icon {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

/* Keep the logo and all controls inside the same header bar. */
#menu-icon > div:first-child {
  display: flex;
  align-items: center;
  flex: 0 0 150px;
  min-width: 0;
  height: 40px;
}

#menu-icon > div:first-child .custom-logo-link,
#menu-icon > div:first-child .m-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 150px;
  height: 40px;
  overflow: hidden;
  float: none;
}

#menu-icon > div:first-child .custom-logo-link img,
#menu-icon > div:first-child .m-header img {
  display: block;
  width: 150px;
  max-width: 150px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  object-position: left center;
}

#menu-icon .menukanan {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  float: none;
  white-space: nowrap;
}

#menu-icon .theme-switch-wrapper,
#menu-icon .menukanan select {
  margin: 0 !important;
  float: none;
  vertical-align: middle;
}

#menu-icon .theme-switch-wrapper {
  display: flex;
  align-items: center;
  height: 40px;
}

#menu-icon .menukanan select {
  display: block;
  height: 23px;
  line-height: 23px;
}

#menu-icon .menukanan > .theme-switch-wrapper,
#menu-icon .menukanan > select,
#menu-icon .menukanan > .m-search,
#menu-icon .menukanan > .m-menu {
  align-self: center;
}
img { max-width: 100%; }
.container { width: min(1066px, 100%); padding-inline: 12px; }
.home_index, .side_home, .column-three-fourth, .column-one-fourth, .column-content { max-width: 100%; }
.container, .home_index, .side_home, .column-three-fourth, .column-one-fourth, .column-content { box-sizing: border-box; }
.amv, #amv { vertical-align: top; }
.amv > img { width: 175px; height: 110px; object-fit: cover; }
#amv > img { width: 142px; height: 100px; object-fit: cover; }

/* Compact header controls so the complete menu fits narrow mobile screens. */
@media (max-width: 639px) {
  #menu-icon {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
  }

  #menu-icon > div:first-child {
    display: flex;
    align-items: center;
    height: 40px;
    flex: 0 0 clamp(90px, 25vw, 120px);
    min-width: 0;
  }

  #menu-icon .m-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(90px, 25vw, 120px);
    height: 40px;
    float: none;
  }

  #menu-icon > div:first-child .custom-logo-link {
    width: clamp(90px, 25vw, 120px);
    height: 40px;
  }

  #menu-icon > div:first-child .custom-logo-link img {
    width: clamp(90px, 25vw, 120px);
    max-width: 100%;
    max-height: 32px;
    margin: 0;
    object-position: left center;
  }

  #menu-icon .m-header img {
    display: block;
    width: clamp(90px, 25vw, 120px);
    height: auto;
    max-height: 32px;
    margin: 0 auto;
    object-fit: contain;
  }

  #menu-icon .menukanan {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    float: none;
    white-space: nowrap;
  }

  #menu-icon .theme-switch-wrapper {
    flex: 0 0 45px;
    margin: 0;
  }

  #menu-icon select {
    flex: 0 0 60px;
    width: 60px !important;
    height: 23px;
    margin: 0 !important;
    padding: 0;
    font-size: 10px;
  }

  #menu-icon .slider {
    width: 40px;
    background-color: #000;
    color: #fff;
    cursor: pointer;
  }

  #menu-icon .theme-switch input:checked + .slider {
    background-color: #fff;
    color: #000;
  }

  #menu-icon .m-search,
  #menu-icon .m-menu {
    flex: 0 0 32px;
    width: 32px;
    height: 40px;
  }

  #menu-icon .m-search {
    background-size: 40px 561px;
  }

  #menu-icon .m-menu {
    background-size: 30px 561px;
  }

  #menu-icon .theme-switch-wrapper,
  #menu-icon select,
  #menu-icon .m-search,
  #menu-icon .m-menu {
    flex-shrink: 0;
  }
}

@media (max-width: 767px) {
  .container { padding-inline: 8px; }
  .home_index, .side_home, .column-one-fourth, .column-content, .footerwrap { width: 100%; }
  .home_index { padding-inline: 4px; }
  .home_index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
  }
  .home_index > a { min-width: 0; }
  .home_index > .clear,
  .home_index > .wp-pagenavi { grid-column: 1 / -1; }
  .amv { width: min(175px, calc(50vw - 18px)); }
  #amv { width: min(142px, calc(50vw - 22px)); }
  .amv, #amv { vertical-align: top; overflow: hidden; }
  .amv img { width: 100%; height: 110px; object-fit: cover; }
  #amv img { width: 100%; height: 100px; object-fit: cover; }
  table { display: block; max-width: 100%; overflow-x: auto; }
}
