/* ISOLASI CSS UTAMA */
.tm-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.tm-wrapper {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: #42b432;
  color: #ffffff;
  width: 100%;
  position: relative;
  z-index: 99999 !important; /* MEMAKSA HEADER BERADA DI ATAS ALL SECTION ELEMENTOR */
}
@media (min-width: 992px) {
  .tm-wrapper {
    overflow: visible !important; /* MEMASTIKAN MEGA MENU TIDAK TERPOTONG BINGKAI DESKTOP */
  }
}
@media (max-width: 991px) {
  .tm-wrapper {
    overflow-x: hidden !important; /* CEGAH SHADOW MOBILE LEAK */
  }
}
/* HEADER & TOPBAR */
.tm-header {
  background-color: #e44c99;
  border-bottom: 2px solid #42b432;
  box-shadow: none !important;
  transition: all 0.3s ease;
  position: relative;
  z-index: 99999 !important;
}
.tm-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}
.tm-mainbar {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* GRID TOPBAR DESKTOP */
@media (min-width: 992px) {
  .tm-mainbar-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .tm-topbar-left {
    justify-self: start;
  }
  .tm-logo-box {
    justify-self: center;
  }
  .tm-topbar-right {
    justify-self: end;
    display: flex;
    gap: 16px;
    align-items: center;
  }
  /* LOGO */
  .tm-logo-box img {
    height: 60px;
    width: auto;
    display: block;
  }
}
/* LAYOUT TOPBAR MOBILE */
@media (max-width: 991px) {
  .tm-mainbar-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .tm-logo-box {
    justify-self: flex-start;
  }
  .tm-topbar-right {
    display: flex;
    gap: 16px;
    align-items: center;
  }
  /* LOGO */
  .tm-logo-box img {
    height: 40px;
    width: auto;
    display: block;
  }
}
/* SOSMED DESKTOP */
.tm-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tm-socials a {
  color: #cbd5e0;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  transition:
    color 0.2s,
    fill 0.2s;
  text-decoration: none;
}
.tm-socials a:hover {
  color: #81d742;
}
.tm-socials a:hover .tm-x-icon {
  fill: #81d742;
}
.tm-x-icon {
  width: 14px;
  height: 14px;
  fill: #cbd5e0;
  transition: fill 0.2s;
  vertical-align: middle;
}
/* BUTTONS & ICONS */
.tm-btn-kirim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 30px;
  padding: 0 16px;
  border: 1.5px solid #81d742;
  background: transparent;
  color: #81d742;
  border-radius: 30px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease-in-out;
}
.tm-btn-kirim:hover {
  background: #81d742;
  color: #e44c99;
}
.tm-icon-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  text-decoration: none;
}
.tm-icon-btn:hover {
  color: #81d742;
}
/* NAVIGASI MENU */
.tm-navbar {
  background-color: #e44c99;
  position: relative;
  z-index: 99999 !important;
}
.tm-nav-container {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}
.tm-nav-container::-webkit-scrollbar {
  display: none;
}
.tm-nav-list {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 992px) {
  .tm-nav-container {
    overflow-x: visible;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.tm-nav-item {
  position: relative;
  display: inline-block;
  margin-left: -15px;
  margin-right: 10px;
}
.tm-nav-item > a {
  display: block;
  padding: 14px 16px;
  color: #e2e8f0 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s;
}
.tm-nav-item > a:hover {
  color: #81d742 !important;
}
.tm-nav-item > a i {
  font-size: 10px;
  margin-left: 4px;
}
/* STANDARD MEGA MENU (Z-INDEX KUNCI PENUH) */
.tm-megamenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #e44c99 !important;
  min-width: 350px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  padding: 12px;
  z-index: 999999 !important;
  border-top: 3px solid #81d742 !important;
  white-space: normal;
}
@media (min-width: 992px) {
  .tm-nav-item:hover .tm-megamenu {
    display: block;
  }
}
.tm-mega-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* STYLING KARTU ARTIKEL UNTUK MENU STANDARD */
.tm-megamenu .tm-api-post {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  padding: 8px;
  border-radius: 6px;
  background: transparent;
  transition: background 0.2s ease;
}
.tm-megamenu .tm-api-post:hover {
  background: rgba(255, 255, 255, 0.05);
}
.tm-megamenu .tm-api-post img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.tm-megamenu .tm-api-post span {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: #e2e8f0 !important;
  transition: color 0.2s ease;
}
.tm-megamenu .tm-api-post:hover span {
  color: #81d742 !important;
}
/* WIDE MEGA MENU (Z-INDEX KUNCI PENUH) */
.tm-static-item {
  position: static !important;
}
.tm-megamenu-wide {
  display: none;
  position: absolute;
  top: 100%;
  left: 15px;
  right: 15px;
  background: #e44c99;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  border-top: 3px solid #81d742;
  z-index: 999999 !important;
  white-space: normal;
}
@media (min-width: 992px) {
  .tm-nav-item.tm-static-item:hover .tm-megamenu-wide {
    display: flex;
  }
}
.tm-mega-sidebar {
  width: 250px;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.tm-liputan-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.tm-liputan-menu li {
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.tm-liputan-menu li a {
  color: #cbd5e0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.tm-liputan-menu li:hover,
.tm-liputan-menu li.active {
  background: rgba(129, 215, 66, 0.1);
  border-left-color: #81d742;
}
.tm-liputan-menu li:hover a,
.tm-liputan-menu li.active a {
  color: #81d742;
}
/* KONTEN ARTIKEL LIPUTAN DI MEGA MENU */
.tm-mega-content-grid {
  flex: 1;
  padding: 25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  align-items: start;
  min-height: 380px;
}
.tm-megamenu-wide .tm-api-post {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none !important;
  color: #ffffff !important;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  transition: background 0.2s ease;
}
.tm-megamenu-wide .tm-api-post:hover {
  background: rgba(255, 255, 255, 0.05);
}
.tm-megamenu-wide .tm-api-post:hover span {
  color: #81d742 !important;
}
.tm-megamenu-wide .tm-api-post img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  border-radius: 6px;
}
.tm-megamenu-wide .tm-api-post span {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  color: #ffffff !important;
  transition: color 0.2s ease;
}
.tm-loading-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #81d742;
  font-size: 14px;
  gap: 8px;
  height: 100%;
}
/* STICKY DESKTOP */
.tm-sticky-logo,
.tm-sticky-search {
  display: none !important;
}
.tm-sticky-logo img {
  height: 28px;
  width: auto;
  display: block;
}
@keyframes tmSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}
@media (min-width: 992px) {
  .tm-header.is-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    box-shadow: none !important;
    animation: tmSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .tm-header.is-sticky .tm-mainbar {
    display: none !important;
  }
  .tm-header.is-sticky .tm-sticky-logo {
    display: flex !important;
    align-items: center;
  }
  .tm-header.is-sticky .tm-sticky-search {
    display: inline-flex !important;
  }
  .tm-header.is-sticky .tm-nav-container {
    justify-content: space-between;
    padding-top: 4px;
    padding-bottom: 4px;
  }
}
/* STICKY MOBILE */
@media (max-width: 991px) {
  .tm-wrapper {
    padding-top: 100px;
  }
  .tm-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    box-shadow: none !important;
  }
  .tm-megamenu,
  .tm-megamenu-wide {
    display: none !important;
  }
}
/* DRAWER MOBILE */
.tm-drawer {
  position: fixed;
  top: 0;
  right: -290px;
  width: 280px;
  height: 100vh;
  background: #e44c99;
  z-index: 1000001 !important;
  transition: right 0.3s ease;
  box-shadow: none;
}
.tm-drawer.active {
  right: 0;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}
.tm-drawer-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tm-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  color: #81d742;
}
.tm-drawer-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.tm-drawer-body {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.tm-drawer-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tm-drawer-link i {
  color: #81d742;
}
.tm-drawer-socials {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.tm-drawer-socials p {
  font-size: 12px;
  color: #a0aec0;
  margin-bottom: 10px;
}
.tm-drawer-social-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}
.tm-drawer-social-icons a {
  color: #fff;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
}
.tm-drawer-social-icons a:hover {
  color: #81d742;
}
/* MODAL & BACKDROP */
.tm-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000000 !important;
}
.tm-backdrop.active {
  display: block;
}
.tm-search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 32, 46, 0.95);
  z-index: 1000002 !important;
  justify-content: center;
  align-items: center;
}
.tm-search-modal.active {
  display: flex;
}
.tm-search-modal-body {
  position: relative;
  width: 90%;
  max-width: 500px;
}
.tm-search-modal-body input {
  width: 100%;
  padding: 14px 20px;
  background: #e44c99;
  border: 2px solid #81d742;
  border-radius: 30px;
  color: #fff;
  font-size: 15px;
  outline: none;
}
.tm-search-modal-body button[type="submit"] {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #81d742;
  font-size: 16px;
  cursor: pointer;
}
.tm-search-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}
/* DISPLAY SWITCH */
.tm-desktop-only {
  display: flex;
}
.tm-mobile-only {
  display: none;
}
@media (max-width: 991px) {
  .tm-desktop-only {
    display: none !important;
  }
  .tm-mobile-only {
    display: inline-flex !important;
  }
}
