﻿/* ================= GLOBAL ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f8fafc;
    font-family: 'Inter',sans-serif;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.6;
}
    body::after,
    body::before {
        pointer-events: none !important;
    }
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* ================= TOPBAR ================= */
.topbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(226,232,240,0.6);
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
}

/* ================= BRAND ================= */
.brand {
    display: flex;
    align-items: center;
    font-size: 19px;
    font-weight: 900;
    color: #1d4ed8;
    letter-spacing: 0.3px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 10px;
    box-shadow: 0 6px 18px rgba(37,99,235,0.35);
}

/* ================= NAV ================= */
.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

    /* NAV LINK (premium style) */
    .nav-links a {
        color: #334155;
        font-weight: 600;
        font-size: 14px;
        padding: 6px 10px;
        border-radius: 8px;
    }

        .nav-links a:hover {
            background: #eff6ff;
            color: #2563eb;
        }

/* ================= DROPDOWN ================= */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #334155;
}

    .nav-dropdown span {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 8px;
        cursor: pointer;
    }

        .nav-dropdown span:hover {
            background: #eff6ff;
            color: #2563eb;
        }

/* dropdown panel */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 10px 0;
    min-width: 240px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(226,232,240,0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: all 0.25s ease;
    z-index: 9999;
}

/* hover bridge (fix flicker) */
.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
}

/* show dropdown (hover + click support) */
.nav-dropdown:hover .dropdown-menu-custom,
.nav-dropdown.active .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* dropdown links */
.dropdown-menu-custom a {
    display: block;
    padding: 10px 18px 10px 20px;
    font-size: 14px;
    color: #0f172a;
    position: relative;
}

    /* left accent (legal feel) */
    .dropdown-menu-custom a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 3px;
        background: #2563eb;
        opacity: 0;
        transition: 0.2s;
    }

    .dropdown-menu-custom a:hover {
        background: #eff6ff;
        color: #2563eb;
    }

        .dropdown-menu-custom a:hover::before {
            opacity: 1;
        }

/* ================= ACTION ================= */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login {
    padding: 8px 14px;
    border-radius: 10px;
    color: #1e293b;
    font-weight: 700;
}

    .btn-login:hover {
        background: #f1f5f9;
    }

/* PREMIUM BUTTON */
.btn-register {
    padding: 9px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(37,99,235,0.35);
}

    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(37,99,235,0.45);
    }

/* ================= MOBILE ICON ================= */
.mobile-toggle {
    display: none;
    font-size: 22px;
    color: #1d4ed8;
    cursor: pointer;
}

/* ================= MOBILE MENU ================= */
.mobile-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 270px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 35px rgba(0,0,0,0.15);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.3s ease-in-out;
    z-index: 999999 !important;
    border-left: 1px solid #e2e8f0;
}

    .mobile-menu a {
        color: #0f172a;
        font-weight: 600;
        font-size: 14px;
        padding: 12px 14px;
        border-radius: 10px;
        display: flex;
        align-items: center;
    }

        .mobile-menu a:hover {
            background: linear-gradient(135deg,#eff6ff,#dbeafe);
            color: #1d4ed8;
            transform: translateX(6px);
            box-shadow: 0 4px 12px rgba(37,99,235,0.15);
        }

    .mobile-menu.active {
        right: 0;
    }

/* ================= BACKDROP ================= */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.4);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

    .menu-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

/* ================= CONTENT ================= */
.main-content {
    min-height: 600px;
}

/* ================= FOOTER ================= */
.footer {
    background: #020617;
    color: #cbd5e1;
    margin-top: 80px;
    padding: 70px 0 30px;
}

.footer-title {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.footer-links a {
    display: block;
    color: #cbd5e1;
    margin-bottom: 8px;
    font-size: 13px;
    opacity: 0.85;
}

    .footer-links a:hover {
        opacity: 1;
        color: #93c5fd;
    }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 25px;
    padding-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}
/* ================= LEFT CHAT (WHATSAPP STYLE) ================= */
.chat-support {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: #25d366;
    color: #fff;
    padding: 10px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
}

    .chat-support i {
        font-size: 20px;
    }

    .chat-support:hover {
        transform: translateY(-2px);
    }

/* ================= AI CHAT ================= */
.ai-chat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

/* TOGGLE BUTTON */
.ai-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(37,99,235,0.4);
}

/* PANEL */
.ai-panel {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 320px;
    height: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

    /* ACTIVE */
    .ai-panel.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

/* HEADER */
.ai-header {
    padding: 12px 15px;
    background: #1d4ed8;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.ai-status {
    font-size: 11px;
    opacity: 0.8;
}

/* BODY */
.ai-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f8fafc;
}

/* MESSAGE */
.ai-msg {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    max-width: 80%;
}

.ai-bot {
    background: #e0e7ff;
}

.ai-user {
    background: #2563eb;
    color: #fff;
    margin-left: auto;
}

/* INPUT */
.ai-input {
    display: flex;
    border-top: 1px solid #e2e8f0;
}

    .ai-input input {
        flex: 1;
        border: none;
        padding: 10px;
        outline: none;
    }

    .ai-input button {
        background: #2563eb;
        color: #fff;
        border: none;
        padding: 0 15px;
    }
/* ===== FIX FLOATING BUTTONS (MOBILE SAFE) ===== */

.chat-support {
    position: fixed;
    left: 15px;
    bottom: 15px;
    z-index: 1000000; /* ABOVE EVERYTHING */
}

.ai-chat {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 1000000; /* ABOVE EVERYTHING */
}

/* ensure menu/backdrop is BELOW */
.mobile-menu {
    z-index: 999999;
}

.menu-backdrop {
    z-index: 999998;
}
.chat-support,
.ai-chat {
    z-index: 2147483647 !important; /* absolute top */
    pointer-events: auto;
}

/* 2. BACKDROP SHOULD NOT BLOCK BUTTONS */
.menu-backdrop {
    z-index: 999998;
}

    .menu-backdrop.active {
        pointer-events: auto;
    }

/* allow clicks above backdrop */
.chat-support,
.ai-chat {
    position: fixed;
}

/* 3. ENSURE BUTTON CLICK AREA */
.chat-support {
    cursor: pointer;
}

.ai-toggle {
    cursor: pointer;
}

/* 4. FIX MOBILE TOUCH ISSUES */
@media(max-width:768px) {

    .chat-support {
        bottom: 18px;
        left: 12px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .ai-chat {
        bottom: 18px;
        right: 12px;
    }

    .ai-toggle {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
}
/* ================= MOBILE ================= */
@media(max-width:991px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }
  
}
