*{
    --base: white;
    --text: black;
    --hijau: #00858D;
    --hijau1: #93C6CE;
    --hijau2: #333333;
    --hijau3: #fdc91b;
    --hijau4: #F5F9FA;
    --hijau5: #3199A3;
    --merah: #d32f2f;
    --abu: #083137;
    --abu1: #adadad;
    /* --top-height: 20px; */
    --bottom-height: 40px;
}

body{
    width: 100%;
    margin: 0;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
    padding-top: calc(var(--top-height) + var(--bottom-height));
}

:root{ --top-height: 0px; --bottom-height: 0px; }

.top{
    background-color: var(--hijau);
    padding: 0.6% 3%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    transition: transform 240ms ease, opacity 240ms ease;
}

.top a{
    color: var(--base);
    text-decoration: none;
    font-size: 16px;
}

.top .contact a{
    margin: 0 5px;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
} 

.top .media a i{
    font-size: 20px;
    margin: 0 5px;
}

.bottom{
    background-color: var(--hijau4);
    padding: 0 3%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: var(--top-height);
    left: 0;
    right: 0;
    z-index: 1000;
    transition: top 200ms ease, transform 240ms ease;
}

.bottom .logo{
    width: 180px;
    height: 65px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.bottom .logo img{
    width: 190px;
    height: 100%;
    object-fit: cover;
}

.bottom .logo .text{
    width: 160px;
    height: 50px;
    object-fit: cover;
}

.bottom .header-cda-right{
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style-type: none;
    .bottom .header-cda-right { position: relative; }
}

.header-cda-right a {
    display: flex;
    margin: 0;
    font-size: 15px;
    justify-content: center;
}

.header-cda-right .nav-dropdown .nav-dropdown-content a {
    display: flex;
    margin: 0;
    font-size: 15px;
    justify-content: start;
}

.submenu {
    display: none !important; /* keep hidden unless .open is added */
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    min-width: 200px;
    z-index: 1150;
    white-space: nowrap;
}

.top.top-hidden{
    transform: translateY(-100%);
    opacity: 0;
}

.mediaSosial i{
    font-size: 25px;
    color: var(--hijau);
}

/* BUTTON LOGIN */
button{
    padding: 10px 20px;
    background-color: var(--base);
    border: var(--hijau) 1px solid;
    border-radius: 5px;
    font-size: 16px;
    color: var(--hijau);
    font-weight: 600;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
}

button i{
    font-size: 20px;
    margin-right: 5px;
    display: flex;
    text-align: center;
}

button:hover{
    color: var(--base);
    background-color: var(--hijau);
}

.bottom{
    align-items: center; 
    gap: 12px;
}

.bottom .logo,
.bottom .login{
    flex: 0 0 auto; 
}
.bottom .header-cda-right{
    flex: 1 1 auto; 
    display: flex;
    justify-content: center; 
}
.bottom .header-cda-right{
    gap: 10px; 
    padding: 0;
    margin: 0;
}
.bottom .header-cda-right{
    margin: 0 6px;
    padding: 8px 12px; 
    white-space: nowrap;
}

.bottom .login{ margin-left: 12px; }

.sideMobile{
    background-color: var(--hijau4);
    padding: 0 3%;
    display: flex;
    flex-direction: row;
    align-items: start;
    position: fixed;
    top: var(--top-height);
    margin: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    transition: top 200ms ease, transform 240ms ease;
}

.sideMobile .logo{
    width: 180px;
    height: 65px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.sideMobile .logo img{
    width: 100px;
    height: 100%;
    object-fit: cover;
}

.sideMobile .logo .text{
    width: 160px;
    height: 50px;
    object-fit: cover;
}

.sideMobile i{
    font-size: 30px;
}

.menu-toggle{ color: var(--base); z-index: 1300; }

@media (max-width: 1020px){
    .top{ display: none; }
    .bottom{
        position: fixed;
        top: 0;
        left: 0;
        width: 260px; 
        height: 100%;
        transform: translateX(-110%);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 18px 12px;
        overflow-y: auto;
        background: var(--base);
        color: var(--hijau);
        box-shadow: 4px 0 18px rgba(0,0,0,0.08);
        z-index: 1300;
    }
    .bottom .logo, .bottom .header-cda-right{ display:block; width: auto; height: 60px; margin-bottom: 8px; }
    .bottom .logo img, .bottom .header-cda-right{ max-width: 180px; height: auto; }
    .bottom .header-cda-right{
        display: block;
        justify-content: flex-start;
    }
    .bottom .header-cda-right { flex-direction: column; gap: 6px; padding: 8px 0; text-align: left; }
    .bottom .header-cda-right { margin: 0; width: 100%; }
    .bottom .header-cda-right a{ display: inline-block; width: 100%; padding: 12px 8px; color: var(--hijau); white-space: normal; }
    .bottom .mediaSosial{
        display: flex;
        gap: 12px;
        align-items: center;
        margin-top: auto; 
        padding: 12px 8px 18px 8px;
    }
    .bottom .mediaSosial a{ color: var(--hijau); font-size: 20px; display: inline-flex; align-items:center; justify-content:center; }
        .bottom .header-cda-right{
            position: static;
            /* display: none; */
            box-shadow: none;
            background: transparent;
            padding: 0;
            margin-left: 0;
            margin-top: 20px;
            display: flex; flex-direction: column;
        }
        .nav-dropdown {
            position: relative;
            display: block;
        }

        .nav-dropdown > a {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #ffffff;
            color: #075860;
            padding: 10px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .nav-dropdown > a:hover {
            background: #b3dad5;
        }

        .nav-dropdown-content {
            display: none;
            position: absolute;
            top: 100%; /* muncul di bawah tombol */
            left: 0;
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            z-index: 9999;
            width: max-content;
            min-width: 180px;
        }

        .nav-dropdown-content a {
            display: block;
            padding: 8px 12px;
            color: #075860;
            text-decoration: none;
        }

        .nav-dropdown-content a:hover {
            background: #f2f9f9;
        }

        .nav-dropdown.open .nav-dropdown-content {
            display: block;
        }

}

/* menu toggle button (mobile) */
.sideMobile{
    display: none;
    background: var(--hijau4);
    border: 0;
    position: fixed;
    color: var(--base);
    font-size: 22px;
    padding: 8px;
    margin-right: 8px;
}

.floating-wa {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    font-size: 45px;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    z-index: 999999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s ease;
}

    .floating-wa:hover {
        transform: scale(1.1);
    }

.floating-visitor {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background-color: white;
    color: black;
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 6px;
}


@media(max-width: 768px) {
    .floating-wa {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .floating-visitor {
        bottom: 20px;
        left: 20px;
    }
}

.popup-ads {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.popup-content {
    background: white;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    animation: popupFade 0.3s ease;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
}

.ads-image {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes popupFade {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


@media (max-width: 1020px){
    .sideMobile{ display: inline-flex; align-items:center; justify-content:start; }
    /* position the toggle absolutely inside the top bar so it's always reachable */
    .top{ position: fixed; }
    .top .menu-toggle{
        position: absolute;
        right: 12px;
        top: 0%;
        transform: translateY(-50%);
        z-index: 1200;
    }
    /* drawer open/close (left) */
    .bottom{ transform: translateX(-110%); transition: transform 260ms ease; }
    .bottom.open{ transform: translateX(0); }

    /* floating hamburger visible on mobile */
    .float-toggle{ display: inline-flex !important; left: 12px; top: 10px; z-index: 1400; background: transparent; border: 1px solid rgba(0,0,0,0.05); padding: 8px; border-radius: 6px; color: var(--text); }
    .bottom .menu-toggle{ display: none; }

    /* overlay when sidebar open */
    .sidebar-overlay{
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.32);
        color: black;
        /* place overlay below both navbars so it never covers them */
        z-index: 1;
        overflow-x: hidden;
        opacity: 0;
        transition: opacity 180ms ease;
        pointer-events: none;
    }
    .sidebar-overlay.visible{ opacity: 1; pointer-events: auto; }

    div.modal-dialog{
        padding: 0 5%;
    }
    div.modal-content{
        width: 23rem;
    }

    .bottom .logo{
        width: 80px;
        height: 65px;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .bottom .logo img{
        width: 90px;
        height: 100%;
        object-fit: cover;
    }

    .bottom .logo .text{
        width: 160px;
        height: 50px;
        object-fit: cover;
    }
}
