:root {
    --primary: #003366;
    --accent: #00d4ff;
    --success: #10b981;
    --white: #ffffff;
    --text: #1e293b;
    --glass: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f8fafc;
    color: var(--text);
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1300px;
    height: 80px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo { height: 48px; width: auto; }

.brand-info { display: flex; flex-direction: column; }
.brand-label { font-size: 18px; font-weight: 800; color: var(--primary); line-height: 1; }
.brand-sub { font-size: 15px; color: rgb(207, 6, 6); font-weight: 800; text-transform: uppercase; margin-top: 4px; }

/* --- MENU --- */
.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    border-radius: 100px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* --- DROPDOWN --- */
.dropdown { position: relative; }
.submenu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: white;
    border-radius: 16px;
    width: 240px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    padding: 8px;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); }
}

.dropdown.open .submenu { display: flex; }

.submenu a {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    border-radius: 8px;
    transition: 0.2s;
}

.submenu a:hover { background: #f1f5f9; color: var(--primary); }
.submenu-divider { height: 1px; background: #eee; margin: 6px 0; }

/* --- BURGER TOGGLE --- */
.menu-toggle { 
    display: none; 
    cursor: pointer; 
    flex-direction: column; 
    gap: 6px; 
}
.bar { width: 24px; height: 3px; background: var(--primary); border-radius: 10px; transition: 0.3s; }

/* --- CHAT WIDGET --- */
#chat-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,51,102,0.3);
    z-index: 2000;
    transition: 0.3s;
}

#chat-toggle:hover { transform: scale(1.1); }

.notification-ping {
    position: absolute;
    top: 0; right: 0;
    width: 14px; height: 14px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
}

#chat-panel {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 320px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: none;
    overflow: hidden;
    z-index: 2000;
}
#chat-panel.active { display: block; animation: slideUp 0.3s ease; }

.chat-header {
    background: var(--primary);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
}
.header-user { display: flex; align-items: center; gap: 12px; }
.header-user img { width: 40px; border-radius: 50%; background: white; padding: 5px; }
.status-wrap { display: flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
.chat-close { background: none; border: none; color: white; cursor: pointer; font-size: 18px; }

.chat-body { padding: 20px; }
.chat-option {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}
.messenger { background: #0084FF; }
.call { background: #10b981; }
.apply { background: #f59e0b; }
.chat-option:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}
.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 380px;
    padding: 24px;
    display: none;
}
.modal.active { display: block; animation: slideUp 0.3s ease; }

.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 800; }
.modal-header button { background: none; border: none; cursor: pointer; font-size: 20px; }

.modal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: 0.3s;
}
.modal-item:hover { background: #f1f5f9; border-color: var(--accent); }
.modal-item .icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #003366; }

.globe .icon { background: #007bff; }
.smart .icon { background: #10b981; }
.residential .icon { background: #f59e0b; }
.business .icon { background: var(--primary); }
.samar .icon, .leyte .icon { background: #003366; }

.modal-item strong { display: block; color: var(--text); font-size: 15px; }
.modal-item span { color: #64748b; font-size: 13px; }

/* --- RESPONSIVE LOGIC --- */
@media (max-width: 992px) {

.nav-right {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 0; 
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: all 0.4s ease-in-out;
        border-top: 1px solid #eee;
        display: flex;
    }

    .nav-right.open {
        max-height: 90vh;
        opacity: 1;
        visibility: visible;
        padding: 16px;
    }

    .nav-btn, .dropdown-toggle {
        width: 100%;
        padding: 16px;
        border-radius: 12px;
        justify-content: flex-start;
    }

    .dropdown { width: 100%; }

    .submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 0;
        margin-top: 6px;
        gap: 6px;
    }

    .submenu a {
        background: #f8fafc;
        padding: 14px 16px;
    }

    .submenu-divider { display: none; }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 576px) {
    .nav-container { height: 70px; padding: 0 16px; }
    .nav-right { top: 70px; }
    .brand-label { font-size: 16px; }
    .brand-sub { font-size: 12px; }

    #chat-panel {
        width: 95%;
        right: 2.5%;
        bottom: 85px;
    }
}
