/**
 * SEVIMA Community header — top bar + wordmark + CTA
 * Extends header-light-community.css
 */

.header.header_community {
  --sc-red: #f43134;
  --sc-navy: #1a2744;
  --sc-hashtag: #7eb8e8;
  --sc-top-bg: #F43134;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06);
}

/* Community only: tinggi bar utama header_lp */
.header.header_lp.header_community {
  min-height: 6rem !important;
  max-height: none !important;
  overflow: visible !important;
}

.header.header_community .header-top,
.header.header_community > .header__wrapper,
.header.header_community .header__wrapper-group,
.header.header_community .header__nav,
.header.header_community .nav__items,
.header.header_community .nav__item#other,
.header.header_community .nav__item#other > .dropdown {
  overflow: visible !important;
}

/* ── Top bar: bg full-bleed, konten tetap ber-padding ── */
.header.header_community .header-top {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--sc-top-bg);
  color: #fff;
  box-sizing: border-box;
}

.header.header_community .header-top__inner,
.header.header_community .header-top__inner.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--lp-container-width, 100%);
  max-width: var(--lp-container-width, 100%);
  margin-left: auto;
  margin-right: auto;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  padding-left: var(--lp-space-screen-x, 1rem);
  padding-right: var(--lp-space-screen-x, 1rem);
  box-sizing: border-box;
  background: transparent;
}

.header.header_community .header-top__date {
  font-family: "Inter", "Instrument Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}

.header.header_community .header-top__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header.header_community .header-top__link {
  font-family: "Inter", "Instrument Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fff !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.header.header_community .header-top__link:hover,
.header.header_community .header-top__link:focus {
  color: #fff !important;
  text-decoration: underline !important;
  opacity: 0.92;
}

/* ── Main bar layout: logo kiri, nav + CTA menempel kanan ── */
.header.header_community > .header__wrapper.container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.header.header_community .header__wrapper-group {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
}

.header.header_community .header__nav {
  margin-left: auto;
  width: auto;
}

.header.header_community .nav__items {
  justify-content: flex-end;
}

.header.header_community .header__cta {
  margin-left: 0;
}

/* ── Logo (image) ── */
.header.header_community .header__logo--community {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  flex-shrink: 0;
  padding-right: 0 !important;
  border-right: none !important;
}

.header.header_community .header__logo--community img {
  display: block;
  height: 2.25rem;
  width: auto;
}

/* ── Nav links ── */
.header.header_community .nav__link {
  font-weight: 600 !important;
  color: var(--sc-navy) !important;
}

.header.header_community .nav__link:hover,
.header.header_community .nav__link:focus,
.header.header_community .nav__link.active,
.header.header_community .nav__item_block:hover > .dropdown > .nav__link,
.header.header_community .nav__item:hover > .dropdown > .nav__link {
  color: var(--sc-red) !important;
  background-color: transparent !important;
}

.header.header_community .nav__link.active::after {
  background-color: transparent;
}

/* ── CTA Gabung Gratis ── */
.header.header_community #nav_gabung.header__cta,
.header.header_community .header__cta {
  flex-shrink: 0;
  border-radius: 0.5rem !important;
  padding: 0.55rem 1.1rem !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  background: var(--sc-red) !important;
  border-color: var(--sc-red) !important;
  color: #fff !important;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: none !important;
}

.header.header_community #nav_gabung.header__cta:hover,
.header.header_community .header__cta:hover {
  filter: brightness(0.95);
  color: #fff !important;
  text-decoration: none !important;
}

/* Hide legacy search control if present */
.header.header_community #toggle-search-global {
  display: none !important;
}

/* ── Mobile top bar ── */
@media only screen and (max-width: 36rem) {
  .header.header_community .header-top__inner {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .header.header_community .header-top__nav {
    gap: 0.85rem;
  }

  .header.header_community .header-top__date {
    font-size: 0.6875rem;
  }

  .header.header_community .header-top__link {
    font-size: 0.6875rem;
  }

  .header.header_community .header__logo--community img {
    height: 1.9rem;
  }

  .header.header_community #nav_gabung.header__cta {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8125rem !important;
  }
}

@media only screen and (max-width: 48rem) {
  .header.header_community .header-top__date {
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Tablet/mobile: hamburger + logo kiri, CTA kanan */
@media only screen and (max-width: 61.99rem) {
  .header.header_community > .header__wrapper.container {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .header.header_community .header__wrapper-group {
    flex: 0 1 auto;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 0.35rem;
  }

  .header.header_community .header__nav {
    margin-left: 0;
    flex: 0 0 auto;
  }

  .header.header_community .nav__items {
    justify-content: flex-start;
  }

  .header.header_community .header__cta {
    margin-left: auto;
    flex-shrink: 0;
  }

  .header.header_community .nav__item#other .nav__link_more {
    padding: 0.5rem !important;
    color: var(--sc-navy) !important;
  }

  .header.header_community .nav__item#other .nav__link_more .icon-bars-3 {
    display: inline-block;
    width: 1.35rem;
    height: 1.35rem;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .header.header_community .nav__item#other .nav-mobile-mirror__dropdown,
  .header.header_community .nav__item#other .dropdown__box.dropdown__box_multi.nav-mobile-mirror__dropdown {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
  }

  .header.header_community .nav__item#other .nav-mobile-mirror__dropdown.show,
  .header.header_community .nav__item#other .dropdown__box.dropdown__box_multi.nav-mobile-mirror__dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: absolute !important;
    inset: auto !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    width: min(100vw - 24px, 360px) !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-width: 0 !important;
    max-height: min(85vh, 640px) !important;
    margin-top: 8px !important;
    z-index: 1060 !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.12) !important;
    background: #fff !important;
    border: 1px solid #dfe5ef !important;
    padding: 12px 16px 16px !important;
    overflow-y: auto !important;
  }

  .header.header_community .nav__item#other .nav__link_more.show,
  .header.header_community .nav__item#other .nav__link_more[aria-expanded="true"] {
    color: var(--sc-red) !important;
    background-color: #fafbff !important;
  }
}

/* ── News ticker (below header) ── */
.sc-ticker {
  background: #1a1a1a;
  color: #fff;
  width: 100%;
}

.sc-ticker__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: var(--lp-container-width, 100%);
  max-width: var(--lp-container-width, 100%);
  margin: 0 auto;
  padding: 0.45rem var(--lp-space-screen-x, 1rem);
  box-sizing: border-box;
  min-height: 2.25rem;
}

.sc-ticker__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: #b91c1c;
  color: #fff;
  font-family: "Inter", "Nunito Sans", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.sc-ticker__track-wrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.sc-ticker__track {
  display: flex;
  width: max-content;
  animation: scTickerScroll 40s linear infinite;
}

.sc-ticker__track:hover {
  animation-play-state: paused;
}

.sc-ticker__text {
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-family: "Inter", "Nunito Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
}

.sc-ticker__sep {
  color: rgba(255, 255, 255, 0.7);
}

@keyframes scTickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 575.98px) {
  .sc-ticker__inner {
    gap: 0.55rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .sc-ticker__badge {
    font-size: 0.65rem;
    padding: 0.18rem 0.45rem;
  }

  .sc-ticker__text {
    font-size: 0.75rem;
  }

  .sc-ticker__track {
    animation-duration: 34s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-ticker__track {
    animation: none;
  }

  .sc-ticker__track-wrap {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .sc-ticker__text[aria-hidden="true"] {
    display: none;
  }
}

