/* ==============================================================
   FILE: assets/css/custom-header.css
   ============================================================== */

/* Variabel Warna Utama Statis */
:root {
    --primary-blue: #275db8;
    --accent-green: #66c2b1;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #666666;
}

/* Mengambil Variabel Tema dari PHP (di-inject via HTML) */
.btn-primary { background-image: var(--tema-light); }

.badge-primary, 
.bg-primary, 
.hov-primary:hover, 
.btn-primary:hover { 
    background-image: var(--tema-hover); 
}

a.text-primary:hover, 
.text-hov-primary:hover, 
.text-primary {
    background: var(--tema-hover);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

a.text-primary {
    background: var(--tema-light);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-foot, 
.playstore-section { 
    background-color: var(--tema-foot); 
}

.bg-foot-gradient { 
    background-image: var(--tema-foot-gradient); 
}

.sec-title {
    font-family: poppins-black;
    text-transform: uppercase;
    background: var(--tema-hover);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-family: poppins-bold;
    text-transform: uppercase;
    background: var(--tema-hover);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.testimoni-item { 
    background-image: var(--tema-testimoni); 
}

/* ==============================================================
   HEADER MODERN 2 LAYER (TOP BAR & NAVBAR)
   ============================================================== */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1040;
    background-color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-top {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}

.header-top .sosmed-link {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-right: 20px;
    transition: color 0.3s ease;
}

.header-top .sosmed-link:hover { color: var(--primary-blue); }

.top-account-icon {
    color: var(--text-dark);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.top-account-link:hover .top-account-icon { color: var(--primary-blue); }

.top-account-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    margin-left: 8px;
    transition: color 0.3s ease;
}

.top-account-link:hover .top-account-text { color: var(--primary-blue); }

.btn-login-outline-blue {
    color: var(--primary-blue) !important;
    border: 1.5px solid var(--primary-blue);
    border-radius: 50px;
    padding: 6px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    background-color: transparent;
}

.btn-login-outline-blue:hover {
    background-color: var(--primary-blue);
    color: #ffffff !important;
}

/* LAYER 2: Navbar Utama */
.header-bottom {
    background-color: var(--primary-blue);
    background-image: linear-gradient(135deg, var(--primary-blue) 0%, #1e4b9c 100%);
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header-wrapper .header-bottom .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 15px !important;
    padding: 10px 20px !important;
    transition: all 0.3s ease;
}

.header-wrapper .header-bottom .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.header-wrapper .header-bottom .dropdown-toggle::after {
    color: rgba(255, 255, 255, 0.7);
}

/* MODERN SEARCH BAR DI NAVBAR */
.navbar-search-main {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.navbar-search-main .form-control {
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding-left: 20px;
    padding-right: 50px;
    transition: all 0.3s ease;
}

.navbar-search-main .form-control::placeholder { color: rgba(255, 255, 255, 0.7); }

.navbar-search-main .form-control:focus {
    background-color: #ffffff;
    color: #333333;
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.navbar-search-main .form-control:focus::placeholder { color: #999999; }

.navbar-search-main .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px;
    transition: color 0.3s ease;
}

.navbar-search-main .form-control:focus + .search-btn { color: var(--primary-blue); }

.header-wrapper .header-bottom .action-icon {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.4rem !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

.header-wrapper .header-bottom .nav-item:hover .action-icon {
    transform: scale(1.1);
    color: #ffffff !important;
}

.header-wrapper .badge-notif {
    top: 0px !important;
    right: -6px !important;
    padding: 4px 6px;
    font-size: 0.65rem;
    border-radius: 50px;
    background-color: #dc3545;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: 2px solid var(--primary-blue);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-wrapper .dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-top: 15px;
    padding: 10px;
}

.dropdown-kategori {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .dropdown-kategori { min-width: 600px; }
}

.header-wrapper .dropdown-menu-right {
    min-width: 220px;
    right: 0;
    left: auto;
}

.header-wrapper .dropdown-item {
    border-radius: 6px;
    font-weight: 500;
    padding: 10px 15px;
    color: var(--text-dark);
    transition: all 0.2s;
}

.header-wrapper .dropdown-item:hover {
    background-color: #f4f6f9;
    color: var(--primary-blue);
    padding-left: 20px;
}

.header-wrapper .dropdown-item i {
    width: 24px;
    text-align: center;
}

.top-account-dropdown .dropdown-menu {
    position: absolute !important;
    right: 0;
    left: auto;
    top: 100%;
    margin-top: 15px;
    z-index: 1050;
}

/* Bottom Toolbar Styles */
#bottom-toolbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 24px;
    max-width: 500px;
    margin: 0 auto;
    left: 0;
    right: 0;
    z-index: 999;
}

.nav-box {
    display: flex;
    padding: 8px;
    background-color: #fff;
    box-shadow: 0px 0px 16px 0px #4444;
    border-radius: 8px;
}

.nav-container {
    display: flex;
    width: 100%;
    list-style: none;
    justify-content: space-around;
    margin: 0;
    padding: 0;
}

.nav__item {
    display: flex;
    position: relative;
    padding: 2px;
}

.nav__item.active .nav__item-icon {
    margin-top: -26px;
    box-shadow: 0px 0px 16px 0px #4444;
}

.nav__item.active .nav__item-text { transform: scale(1); }

.nav__item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #2f3046;
    text-decoration: none;
}

.nav__item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    background-color: #fff;
    border-radius: 50%;
    height: 46px;
    width: 46px;
    transition: margin-top 250ms ease-in-out, box-shadow 250ms ease-in-out;
}

.nav__item-text {
    position: absolute;
    bottom: 0;
    transform: scale(0);
    transition: transform 250ms ease-in-out;
    font-size: 11px;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 991.98px) {
    .header-top { padding: 10px 0; }
    .navbar-search-main {
        margin-right: 0;
        max-width: 100%;
        margin-bottom: 0;
    }
    .navbar-search-main .form-control { height: 42px; }
    .mobile-account-icon {
        color: var(--text-dark) !important;
        font-size: 1.4rem;
        cursor: pointer;
    }
    .mobile-container-pad {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }
}