/* ========================= MEDUSA RAN Landing Theme (Tersortir) ========================= */

/* ---------- VARIABEL ---------- */
:root {
    --content-max: 900px;
}

/* ---------- GLOBAL ---------- */
html,
body {
    width: 100%;
}

body.sky-bg {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #4da5ff url('/images/Basic/background.jpg') center top no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #2a2a2a;
    overflow-x: hidden;
}

/* ---------- TOP INFO BAR ---------- */
.top-info-bar {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 8px 18px;
    font-size: 12px;
    color: #1a243a;
    background: linear-gradient(#fff, #f2f7ff);
    border: 1px solid #d6deea;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- CONTAINER ---------- */
.page-wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 8px 16px 60px;
}

/* ---------- HEADER / LOGO ---------- */
.header-top {
    text-align: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.header-logo {
    display: inline-block;
    max-width: 340px;
}

.header-logo img {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width:1280px) {
    .header-logo {
        max-width: 380px;
    }
}

/* ---------- NAVBAR ---------- */
.main-nav-bar {
    background: linear-gradient(#1a668f, #0b4e6f);
    border: 1px solid rgba(0, 0, 0, .4);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
    display: flex;
    justify-content: center;
    padding: 8px 12px;
    margin: 0 auto 16px;
    max-width: var(--content-max);
    position: relative;
    overflow: visible;
    /* penting utk dropdown */
}

.main-nav-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: visible;
    width: 100%;
}

.main-nav-bar li {
    list-style: none;
    position: relative;
}

/* <li> = anchor dropdown */
.main-nav-bar a {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    border: 1px solid transparent;
    white-space: nowrap;
}

.main-nav-bar li.active>a,
.main-nav-bar a:hover {
    background: linear-gradient(#fff, #cfe9ff);
    color: #123c56;
    border: 1px solid rgba(0, 0, 0, .3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}

@media (max-width:900px) {
    .main-nav-bar {
        max-width: calc(100% - 24px);
    }

    .main-nav-bar ul {
        flex-wrap: wrap;
        gap: 10px 12px;
    }
}

/* ---------- DROPDOWN SHOP (Polish + Anti “Nyerong”) ---------- */
/* Trigger */
.main-nav-bar .nav-drop {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px 0 14px;
    cursor: pointer;
}

.main-nav-bar .nav-drop::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(255, 255, 255, .9);
    border-bottom: 2px solid rgba(255, 255, 255, .9);
    transform: translateY(1px) rotate(45deg);
    transition: transform .18s ease, border-color .18s ease, opacity .18s ease;
    opacity: .9;
}

.main-nav-bar .dropdown.show>.nav-drop::after {
    transform: translateY(2px) rotate(225deg);
    opacity: 1;
}

/* Menu (center tepat di bawah tombol) */
.main-nav-bar .dropdown {
    position: relative;
}

/* anchor posisi */
.main-nav-bar .dropdown-menu {
    display: none;
}

/* default (aman bootstrap) */
.main-nav-bar .dropdown-menu.no-bs {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    /* CENTER */
    margin: 0 !important;
    min-width: 240px;
    padding: 8px 8px;
    border: 1px solid rgba(0, 0, 0, .35);
    border-radius: 12px;
    background: linear-gradient(180deg, #1a668f 0%, #0b4e6f 100%) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .28), 0 3px 8px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .06);
    z-index: 4500;
    opacity: 0;
    transform-origin: 50% 0;
    transition: opacity .18s ease, transform .18s ease;
}

.main-nav-bar .dropdown.show>.dropdown-menu.no-bs {
    display: block !important;
    opacity: 1;
    transform: translateX(-50%) translateY(0) !important;
}

/* Arrow kecil */
.main-nav-bar .dropdown-menu.no-bs::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #155e85;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2));
}

/* Item */
.main-nav-bar .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    color: #eaf4fb !important;
    white-space: nowrap;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1px;
    transition: background-color .15s ease, color .15s ease, transform .12s ease;
}

.main-nav-bar .dropdown-item+.dropdown-item {
    margin-top: 4px;
}

.main-nav-bar .dropdown-item:hover,
.main-nav-bar .dropdown-item:focus {
    background: rgba(255, 255, 255, .12);
    color: #fff !important;
}

/* Hover open (opsional, utk device yg support hover) */
@media (hover:hover) {
    .main-nav-bar .dropdown:hover>.dropdown-menu.no-bs {
        display: block !important;
        opacity: 1;
    }
}

@media (max-width:680px) {
    .main-nav-bar .dropdown-menu.no-bs {
        min-width: 200px;
    }
}

/* ---------- GRID (LEFT + RIGHT) ---------- */
.main-content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    max-width: var(--content-max);
    margin: 0 auto;
}

.left-col,
.right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width:600px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- PANEL ---------- */
.panel-card {
    background:linear-gradient(180deg,#000000,#ed0000);
    border:1px solid rgba(0,0,0,.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 24px rgba(0,0,0,.25);
    overflow: hidden;
    color: #2a2a2a;
    font-size: 14px;
}

.panel-head {
    background: linear-gradient(#000000, #ff0000);
    border-bottom: 1px solid #000000;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}

.panel-head .panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.panel-body {
    padding: 12px;
    background: #fff;
}

/* ---------- TABLES ---------- */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ranking-table thead th {
    background: #bd0404;
    color: #fff;
    font-weight: 600;
    padding: 6px 8px;
    text-align: left;
}

.ranking-table tbody td {
    background: #f8faff;
    border-bottom: 1px solid #d6dbe8;
    padding: 6px 8px;
    color: #1a243a;
}

.ranking-table tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- HERO SLIDER (no crop) ---------- */
.slider-card {
    padding: 8px;
}

.hero-slider {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
    background: #ffffff00;
    padding: 10px;
}

.hero-slider .slides {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    display: none;
}

.hero-slide.active {
    display: block;
}

.hero-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    opacity: .55;
    border: 1px solid rgba(0, 0, 0, .4);
    cursor: pointer;
}

.slider-dot.active {
    opacity: 1;
}

/* ---------- NEWS ---------- */
.news-block .news-head-tabs {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    gap: 10px;
    color: #1a243a;
}

.news-head-tabs span.active {
    color: #007acb;
}

.news-entry {
    border: 1px solid #d0d4da;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .12);
    padding: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #1a243a;
}

.entry-header {
    font-size: 13px;
    font-weight: 600;
    color: #1a243a;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.news-tag {
    display: inline-block;
    background: #007acb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.news-title-link {
    color: #007acb;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.news-date {
    margin-left: auto;
    font-size: 12px;
    color: #555;
}

.news-image {
    margin: 8px 0 12px;
}

.news-image img {
    max-width: 100%;
    border-radius: 4px;
    display: block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.news-body-text {
    white-space: pre-line;
    color: #1a243a;
    line-height: 1.4;
    font-size: 13px;
}

/* ---------- OVERLAY / MODAL ---------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-alert {
    background: #ffe6e6;
    border: 1px solid #ffb3b3;
    color: #8a0000;
    border-radius: 6px;
    padding: 20px;
    max-width: 360px;
    width: 90%;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    position: relative;
}

.modal-alert button.close-btn {
    position: absolute;
    right: 10px;
    top: 8px;
    background: none;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    color: #8a0000;
    cursor: pointer;
}

/* ---------- FOOTER ---------- */
.footer-large {
    width: 100%;
    margin: 24px 0 0;
}

.footer-large .footer-wrap {
    width: 100%;
    border-radius: 0;
    padding: 26px 0;
    background: #fff;
    border-top: 1px solid #c8ceda;
    border-bottom: 1px solid #c8ceda;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.footer-large .footer-wrap .footer-cols {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: 28px;
}

.footer-brand {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-brand img {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.footer-brand .brand-text {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.footer-col h4 {
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e6edf7;
    color: #123c56;
    font-size: 14px;
}

.footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.footer-links-list a {
    color: #0d5f99;
    text-decoration: none;
}

.footer-links-list a:hover {
    text-decoration: underline;
}

.download-box .download-btn {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, .2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
}

.download-box .sysreq {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.connect-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.connect-pill {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.prime-footer {
    display: none;
}

@media (max-width:1180px) {
    .footer-large .footer-wrap .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }
}

@media (max-width:640px) {
    .footer-large .footer-wrap .footer-cols {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 20px;
    }
}

/* === NAVBAR FIX: width selaras konten + menu center === */

/* .page-wrap inner width = var(--content-max) - 32px (karena padding 16px kiri/kanan) */
/* Samakan nav ke ukuran itu. */
.main-nav-bar {
    box-sizing: border-box;
    width: 100%;
    max-width: calc(var(--content-max) - 32px);
    margin-left: auto;
    margin-right: auto;

    /* gutter sama seperti .page-wrap */
    padding-left: 16px;
    padding-right: 16px;
}

/* Jangan tambahkan padding lagi di <ul>, biar benar-benar center */
.main-nav-bar ul {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
    /* center item */
}

/* Pastikan teks item betul-betul center secara vertikal */
.main-nav-bar a {
    height: 38px;
    line-height: 38px;
    /* backup untuk browser lama */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* === DROPDOWN STABILIZER: anti auto-close saat mouse turun === */

/* 1) Rapatkan jarak menu ke tombol (kurangi gap) */
.main-nav-bar .dropdown-menu.no-bs {
    top: calc(100% + 4px) !important;
    /* semula 8–10px, sekarang 4px */
}

/* 2) Hover-bridge transparan: menutup CELAH antara tombol & menu */
.main-nav-bar .dropdown>.dropdown-menu.no-bs::before {
    content: "";
    position: absolute;
    /* bikin jembatan selebar menu + sedikit keluar kiri/kanan */
    left: -8px;
    right: -8px;
    top: -12px;
    height: 12px;
    /* tinggi “jembatan” 12px */
    /* transparan—hanya untuk menangkap hover/pointer */
}

/* 3) (opsional) biar aman ketika bergerak miring, tambah sedikit padding visual */
.main-nav-bar .dropdown-menu.no-bs {
    padding-top: 8px;
    /* isi tetap nyaman diklik */
}

/* ========== DROPDOWN STABIL (anti auto-close) ========== */

/* Rapetin jarak menu ke tombol */
.main-nav-bar .dropdown-menu.no-bs {
    top: calc(100% + 4px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: none;
    /* default: tertutup */
    pointer-events: auto;
    z-index: 5000;
}

/* TAMPIL saat .show (bukan karena :hover) */
.main-nav-bar .dropdown.show>.dropdown-menu.no-bs {
    display: block !important;
}

/* Matikan “buka saat hover” supaya tidak flicker */
@media (hover:hover) {
    .main-nav-bar .dropdown:hover>.dropdown-menu.no-bs {
        display: none !important;
    }
}

/* Hover-bridge: tutup celah antara tombol & menu */
.main-nav-bar .dropdown>.dropdown-menu.no-bs::before {
    content: "";
    position: absolute;
    left: -10px;
    right: -10px;
    top: -14px;
    height: 14px;
    /* jembatan lebih lebar untuk aman */
}

/* Sedikit padding biar klik nyaman */
.main-nav-bar .dropdown-menu.no-bs {
    padding-top: 8px;
}

/* === FIX: jangan sembunyikan menu saat hover, tetap tampil kalau .show === */
@media (hover:hover) {

    /* hilangkan efek hide-on-hover yang sebelumnya */
    .main-nav-bar .dropdown:hover>.dropdown-menu.no-bs {
        display: block;
    }

    /* dan pastikan state .show selalu menang */
    .main-nav-bar .dropdown.show:hover>.dropdown-menu.no-bs {
        display: block !important;
    }
}

/* === Center the buttons + helper text in Member Panel === */
.member-panel .login-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    /* center horizontally */
}

.member-panel .login-btn,
.member-panel .register-btn {
    text-align: center;
    /* center label inside button */
    display: inline-block;
    min-width: 110px;
    /* biar rapi sama-panjang */
}

.member-panel .help-text {
    text-align: center;
    /* center the “Having trouble…” line */
    width: 100%;
}

