/* Buaya Selatan V15 — deterministic desktop header and menu layout. */

.header-nav .bs-desktop-nav,
.header-nav .bs-desktop-nav__inner,
.header-nav .bs-desktop-nav__link {
  box-sizing: border-box !important;
}

@media (min-width: 901px) {
  body.bs-device-desktop {
    overflow-x: hidden !important;
  }

  body.bs-device-desktop .header-mobile,
  body.bs-device-desktop .bs-mobile-info-links,
  body.bs-device-desktop .footer-mobile {
    display: none !important;
  }

  body.bs-device-desktop .header {
    display: block !important;
    position: relative !important;
    z-index: 1300 !important;
    width: 100% !important;
    margin: 0 !important;
    background: #080808 !important;
    border: 0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .38) !important;
  }

  body.bs-device-desktop .header__top {
    display: none !important;
  }

  body.bs-device-desktop .header__mid {
    display: block !important;
    width: 100% !important;
    min-height: 84px !important;
    padding: 11px 0 !important;
    background: linear-gradient(180deg, #111 0%, #060606 100%) !important;
    border-bottom: 1px solid rgba(238, 190, 63, .28) !important;
  }

  body.bs-device-desktop .header__mid > .container {
    width: calc(100% - 36px) !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  body.bs-device-desktop .header__mid > .container > .row {
    display: grid !important;
    grid-template-columns: minmax(220px, 285px) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 22px !important;
    min-height: 62px !important;
    margin: 0 !important;
  }

  body.bs-device-desktop .header__mid .col-lg-3,
  body.bs-device-desktop .header__mid .col-lg-9 {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.bs-device-desktop .header-logo,
  body.bs-device-desktop .header-logo a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 58px !important;
  }

  body.bs-device-desktop .header-logo img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 270px !important;
    max-height: 58px !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  body.bs-device-desktop .header-form {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.bs-device-desktop .header-form form {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.bs-device-desktop .header-form input {
    display: block !important;
    flex: 1 1 170px !important;
    width: auto !important;
    min-width: 125px !important;
    max-width: 205px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    border: 1px solid #383838 !important;
    border-radius: 8px !important;
    background: #121212 !important;
    color: #fff !important;
    line-height: 42px !important;
    box-shadow: none !important;
  }

  body.bs-device-desktop .header-form input:focus {
    border-color: #e6ba45 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(230, 186, 69, .12) !important;
  }

  body.bs-device-desktop .header-form .button-login,
  body.bs-device-desktop .header-form .btn-daftar,
  body.bs-device-desktop .header-form .btn-profil,
  body.bs-device-desktop .header-form .btn-transaksi,
  body.bs-device-desktop .header-form .btn-signout {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    gap: 7px !important;
    height: 42px !important;
    min-height: 42px !important;
    min-width: 94px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  body.bs-device-desktop .header-form .button-login i,
  body.bs-device-desktop .header-form .btn-daftar i {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    transform: none !important;
  }

  body.bs-device-desktop .header-user {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 7px !important;
  }

  body.bs-device-desktop .header-user + .header-form {
    justify-content: flex-end !important;
  }

  body.bs-device-desktop .header-nav {
    display: block !important;
    position: relative !important;
    top: auto !important;
    z-index: 1250 !important;
    width: 100% !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #090909 !important;
    border-top: 1px solid rgba(255, 255, 255, .035) !important;
    border-bottom: 1px solid rgba(230, 186, 69, .34) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .32) !important;
  }

  body.bs-device-desktop .header-nav > .progress-bar {
    top: 0 !important;
  }

  body.bs-device-desktop .bs-desktop-nav {
    display: block !important;
    width: 100% !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
  }

  body.bs-device-desktop .bs-desktop-nav__inner {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: calc(100% - 28px) !important;
    max-width: 1280px !important;
    min-height: 58px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 58px !important;
    min-height: 58px !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 7px !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, .055) !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #121212 0%, #080808 100%) !important;
    color: #eee5d5 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .1px !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link:last-child {
    border-right: 1px solid rgba(255, 255, 255, .055) !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link > i:first-child,
  body.bs-device-desktop .bs-desktop-nav__link > .bs-lottery-ball:first-child {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 17px !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    color: #efc452 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    transform: none !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link .bs-lottery-ball {
    border-radius: 50% !important;
    background: radial-gradient(circle at 34% 28%, #fff 0 18%, #ffc45d 20% 48%, #ed731d 50% 100%) !important;
    color: #17110b !important;
    font-family: Arial, sans-serif !important;
    font-size: 10px !important;
    font-style: normal !important;
    font-weight: 900 !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link span {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link:hover,
  body.bs-device-desktop .bs-desktop-nav__link.is-active {
    color: #ffd76b !important;
    background: linear-gradient(180deg, rgba(230, 186, 69, .15), rgba(126, 7, 20, .17)) !important;
    border-bottom-color: #e6ba45 !important;
  }
}

@media (min-width: 901px) and (max-width: 1179px) {
  body.bs-device-desktop .header__mid > .container > .row {
    grid-template-columns: 205px minmax(0, 1fr) !important;
    gap: 13px !important;
  }

  body.bs-device-desktop .header-logo img {
    max-width: 200px !important;
    max-height: 50px !important;
  }

  body.bs-device-desktop .header-form,
  body.bs-device-desktop .header-form form {
    gap: 6px !important;
  }

  body.bs-device-desktop .header-form input {
    min-width: 100px !important;
    max-width: 150px !important;
    height: 40px !important;
    line-height: 40px !important;
  }

  body.bs-device-desktop .header-form .button-login,
  body.bs-device-desktop .header-form .btn-daftar,
  body.bs-device-desktop .header-form .btn-profil,
  body.bs-device-desktop .header-form .btn-transaksi,
  body.bs-device-desktop .header-form .btn-signout {
    min-width: 78px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
  }

  body.bs-device-desktop .bs-desktop-nav__inner {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    width: calc(100% - 24px) !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link {
    height: 50px !important;
    min-height: 50px !important;
    font-size: 10.5px !important;
  }
}

/* Some Android browsers keep a mobile UA even when "Desktop site" is enabled.
   Show the same desktop menu whenever the mobile template is rendered on a wide viewport. */
@media (min-width: 769px) {
  body.bs-device-mobile .header-nav {
    display: block !important;
    position: relative !important;
    z-index: 1200 !important;
    width: 100% !important;
    min-height: 58px !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #090909 !important;
    border-bottom: 1px solid rgba(230, 186, 69, .34) !important;
  }

  body.bs-device-mobile .bs-desktop-nav,
  body.bs-device-mobile .bs-desktop-nav__inner {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.bs-device-mobile .bs-desktop-nav__inner {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    width: calc(100% - 24px) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  body.bs-device-mobile .bs-desktop-nav__link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    min-height: 50px !important;
    padding: 0 8px !important;
    border-left: 1px solid rgba(255, 255, 255, .055) !important;
    border-bottom: 2px solid transparent !important;
    background: #0d0d0d !important;
    color: #eee5d5 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
  }

  body.bs-device-mobile .bs-desktop-nav__link > i,
  body.bs-device-mobile .bs-desktop-nav__link > .bs-lottery-ball {
    color: #efc452 !important;
  }
}

@media (max-width: 768px) {
  body.bs-device-mobile .header-nav {
    display: none !important;
  }
}

/* ========================================================================== 
   Buaya Selatan V16 — desktop navigation, home news, spacing, bottom login icon
   ========================================================================== */

/* Desktop header navigation: five primary links + one compact game dropdown. */
@media (min-width: 901px) {
  body.bs-device-desktop .header-nav {
    min-height: 62px !important;
  }

  body.bs-device-desktop .bs-desktop-nav,
  body.bs-device-desktop .bs-desktop-nav__inner {
    min-height: 62px !important;
  }

  body.bs-device-desktop .bs-desktop-nav__inner {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: min(1180px, calc(100% - 40px)) !important;
    max-width: 1180px !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link {
    height: 62px !important;
    min-height: 62px !important;
    padding: 0 18px !important;
    gap: 9px !important;
    overflow: visible !important;
    font-size: 12px !important;
    letter-spacing: .2px !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link > i:first-child {
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 15px !important;
  }

  body.bs-device-desktop .bs-game-dropdown {
    position: relative !important;
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.bs-device-desktop .bs-game-dropdown > summary {
    list-style: none !important;
    cursor: pointer !important;
    user-select: none !important;
  }

  body.bs-device-desktop .bs-game-dropdown > summary::-webkit-details-marker {
    display: none !important;
  }

  body.bs-device-desktop .bs-game-dropdown__trigger {
    width: 100% !important;
    border-right: 1px solid rgba(255, 255, 255, .055) !important;
  }

  body.bs-device-desktop .bs-game-dropdown__chevron {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    margin-left: 2px !important;
    color: #cfa73f !important;
    font-size: 10px !important;
    transition: transform .18s ease !important;
  }

  body.bs-device-desktop .bs-game-dropdown[open] .bs-game-dropdown__chevron {
    transform: rotate(180deg) !important;
  }

  body.bs-device-desktop .bs-game-dropdown.is-active > .bs-game-dropdown__trigger,
  body.bs-device-desktop .bs-game-dropdown[open] > .bs-game-dropdown__trigger,
  body.bs-device-desktop .bs-game-dropdown:hover > .bs-game-dropdown__trigger {
    color: #ffd76b !important;
    background: linear-gradient(180deg, rgba(230, 186, 69, .15), rgba(126, 7, 20, .17)) !important;
    border-bottom-color: #e6ba45 !important;
  }

  body.bs-device-desktop .bs-game-dropdown__menu {
    position: absolute !important;
    top: calc(100% + 1px) !important;
    right: 0 !important;
    z-index: 1800 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
    width: 390px !important;
    padding: 10px !important;
    gap: 7px !important;
    border: 1px solid rgba(230, 186, 69, .42) !important;
    border-radius: 0 0 14px 14px !important;
    background: rgba(9, 9, 9, .98) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .55) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-6px) !important;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
  }

  body.bs-device-desktop .bs-game-dropdown[open] .bs-game-dropdown__menu,
  body.bs-device-desktop .bs-game-dropdown:hover .bs-game-dropdown__menu,
  body.bs-device-desktop .bs-game-dropdown:focus-within .bs-game-dropdown__menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  body.bs-device-desktop .bs-game-dropdown__item {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    min-height: 46px !important;
    gap: 10px !important;
    padding: 0 13px !important;
    border: 1px solid rgba(255, 255, 255, .065) !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, #171717, #0f0f0f) !important;
    color: #e9e2d5 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  body.bs-device-desktop .bs-game-dropdown__item > i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    color: #efc452 !important;
    font-size: 14px !important;
  }

  body.bs-device-desktop .bs-game-dropdown__item .bs-lottery-ball {
    border-radius: 50% !important;
    background: radial-gradient(circle at 34% 28%, #fff 0 18%, #ffc45d 20% 48%, #ed731d 50% 100%) !important;
    color: #17110b !important;
    font-family: Arial, sans-serif !important;
    font-size: 10px !important;
    font-style: normal !important;
    font-weight: 900 !important;
  }

  body.bs-device-desktop .bs-game-dropdown__item:hover,
  body.bs-device-desktop .bs-game-dropdown__item.is-active {
    border-color: rgba(230, 186, 69, .52) !important;
    background: linear-gradient(180deg, rgba(230, 186, 69, .16), rgba(126, 7, 20, .2)) !important;
    color: #ffd76b !important;
  }

  /* Balanced vertical rhythm for the desktop home page. */
  body.bs-device-desktop #main-route.bs-home-page {
    padding: 22px 0 0 !important;
  }

  body.bs-device-desktop .bs-home-page > section {
    margin: 0 !important;
  }

  body.bs-device-desktop .bs-hero {
    padding: 0 0 26px !important;
  }

  body.bs-device-desktop .bs-home-news {
    padding: 0 0 34px !important;
  }

  body.bs-device-desktop .bs-category-section {
    padding: 0 0 34px !important;
  }

  body.bs-device-desktop .bs-games-section {
    padding: 0 0 38px !important;
  }

  body.bs-device-desktop .bs-provider-section {
    padding: 0 0 38px !important;
  }

  body.bs-device-desktop .bs-quick-section {
    padding: 0 0 42px !important;
  }

  body.bs-device-desktop .bs-section-heading,
  body.bs-device-desktop .bs-home-news-heading {
    min-height: 48px !important;
    margin: 0 0 18px !important;
  }

  /* Home news: two clean horizontal rows with consistent image and text heights. */
  body.bs-device-desktop .bs-home-news .container {
    width: min(1240px, calc(100% - 44px)) !important;
    max-width: 1240px !important;
  }

  body.bs-device-desktop .bs-home-news-heading {
    padding: 0 2px !important;
  }

  body.bs-device-desktop .bs-home-news-heading__icon {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
    border-radius: 11px !important;
  }

  body.bs-device-desktop .bs-home-news-heading h2 {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  body.bs-device-desktop .bs-home-news-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  body.bs-device-desktop .bs-home-news-card {
    display: grid !important;
    grid-template-columns: minmax(180px, 38%) minmax(0, 1fr) !important;
    min-height: 176px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  body.bs-device-desktop .bs-home-news-media {
    width: 100% !important;
    min-height: 176px !important;
    aspect-ratio: auto !important;
  }

  body.bs-device-desktop .bs-home-news-body {
    min-width: 0 !important;
    min-height: 176px !important;
    padding: 16px 17px !important;
  }

  body.bs-device-desktop .bs-home-news-body small {
    margin-bottom: 7px !important;
    font-size: 10px !important;
  }

  body.bs-device-desktop .bs-home-news-body strong {
    margin-bottom: 8px !important;
    font-size: 14px !important;
    line-height: 1.38 !important;
  }

  body.bs-device-desktop .bs-home-news-body > span {
    font-size: 11px !important;
    line-height: 1.55 !important;
    -webkit-line-clamp: 3 !important;
  }

  body.bs-device-desktop .bs-home-news-body em {
    padding-top: 9px !important;
    font-size: 10px !important;
  }

  body.bs-device-desktop .bs-category-grid,
  body.bs-device-desktop .bs-game-grid,
  body.bs-device-desktop .bs-provider-grid {
    row-gap: 16px !important;
  }

  body.bs-device-desktop .bs-game-meta {
    padding-top: 11px !important;
    padding-bottom: 12px !important;
  }
}

@media (min-width: 901px) and (max-width: 1120px) {
  body.bs-device-desktop .bs-desktop-nav__inner {
    width: calc(100% - 26px) !important;
  }

  body.bs-device-desktop .bs-desktop-nav__link {
    padding: 0 10px !important;
    gap: 6px !important;
    font-size: 10.5px !important;
  }

  body.bs-device-desktop .bs-game-dropdown__menu {
    right: 0 !important;
    width: 360px !important;
  }

  body.bs-device-desktop .bs-home-news-grid {
    grid-template-columns: 1fr !important;
  }

  body.bs-device-desktop .bs-home-news-card {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    min-height: 164px !important;
  }

  body.bs-device-desktop .bs-home-news-media,
  body.bs-device-desktop .bs-home-news-body {
    min-height: 164px !important;
  }
}

/* Bottom navigation: remove the elevated circular login icon and align all items. */
@media (max-width: 900px) {
  .footer-mobile {
    align-items: stretch !important;
  }

  .footer-mobile .footer-item,
  .footer-mobile .footer-login {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 68px !important;
    margin: 0 !important;
    padding: 6px 2px 5px !important;
    transform: none !important;
  }

  .footer-mobile .footer-item .footer-icon,
  .footer-mobile .footer-login .footer-icon {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 24px !important;
    min-width: 28px !important;
    min-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 17px !important;
    line-height: 24px !important;
    transform: none !important;
  }

  .footer-mobile .footer-item .footer-icon i,
  .footer-mobile .footer-login .footer-icon i {
    position: static !important;
    margin: 0 !important;
    line-height: 1 !important;
    transform: none !important;
  }

  .footer-mobile .footer-item .footer-title,
  .footer-mobile .footer-login .footer-title {
    min-height: 12px !important;
    margin: 4px 0 0 !important;
    font-size: 10px !important;
    line-height: 12px !important;
    text-align: center !important;
  }
}

/* Responsive banner V05: match the desktop artwork reference (1920 x 650). */
@media (min-width: 901px) {
  body.bs-device-desktop .bs-hero-slider {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1920 / 650 !important;
  }
  body.bs-device-desktop .bs-hero-slide,
  body.bs-device-desktop .bs-hero-slide img {
    width: 100% !important;
    height: 100% !important;
  }
  body.bs-device-desktop .bs-hero-slide img {
    object-fit: cover !important;
    object-position: center !important;
  }
}
