/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    transition: var(--transition);
}
.navbar.scrolled .nav-wrapper {
    padding: 0.75rem 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.02em;
}
.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}
.nav-menu a {
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    position: relative;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand);
    transition: var(--transition);
}
.nav-menu a:hover::after,
.nav-menu a.active-link::after {
    width: 100%;
}
.nav-menu a:hover,
.nav-menu a.active-link {
    color: var(--brand);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}
.hamburger span {
    width: 24px;
    height: 2.5px;
    background: var(--brand);
    border-radius: 2px;
    transition: var(--transition);
    display: block;
}
.hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ===== NAV DROPDOWN ===== */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--text);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    font-family: inherit;
}
.nav-dropdown-toggle:hover { color: var(--brand); }
.nav-dd-icon { font-size: 0.6rem; transition: transform 0.25s ease; }
.nav-dropdown.open .nav-dd-icon { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    min-width: 220px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1001;
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}
.nav-dropdown-menu li a:hover {
    background: var(--brand-pale);
    color: var(--brand);
}
.nav-dropdown-menu li a i {
    width: 16px;
    text-align: center;
    color: var(--brand);
    font-size: 0.8rem;
}
.nav-dd-divider {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0;
}

/* ===== NAV APP BUTTONS ===== */
.btn-partner-app {
    background: transparent;
    color: var(--brand);
    border: 2px solid var(--brand);
    box-shadow: none;
}
.btn-partner-app:hover {
    background: var(--brand);
    color: var(--white);
}

/* ===== CROSS-LINK CTA ===== */
.cross-link-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer { background: var(--footer-bg); color: var(--white); padding: 4rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 3rem; margin-bottom: 3rem; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: var(--brand); margin-bottom: 1rem; }
.footer-logo-img { width: 36px; height: 36px; object-fit: contain; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.88rem; line-height: 1.8; margin-bottom: 0.8rem; }
.company-tag { color: var(--brand-light) !important; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.03em; }
.footer-social { display: flex; gap: 10px; margin-top: 1.2rem; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: var(--transition);
}
.footer-social a:hover { background: var(--brand); transform: translateY(-2px); }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.footer-col ul li a:hover { color: var(--white); padding-left: 4px; }
.footer-col ul li a small { font-size: 0.72rem; color: var(--brand-light); margin-left: 4px; font-weight: 600; }
.footer-col ul li a i { color: var(--brand); font-size: 0.8rem; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { color: rgba(255,255,255,0.4); font-size: 0.85rem; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: rgba(255,255,255,0.4); font-size: 0.85rem; transition: var(--transition); }
.footer-bottom-links a:hover { color: var(--brand); }

/* ===== FOOTER TRUST BADGES ===== */
.footer-trust {
    display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
    padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}
.footer-trust-badge {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.6);
    padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.78rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.08);
}
.footer-trust-badge i { color: var(--brand); }

/* ===== PAGE LOADER ===== */
.page-loader {
    position: fixed; inset: 0; background: var(--white);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 9999; transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { display: flex; align-items: center; gap: 12px; font-size: 1.8rem; font-weight: 800; color: var(--brand); margin-bottom: 1.5rem; }
.loader-logo img { width: 48px; height: 48px; object-fit: contain; }
.loader-bar { width: 200px; height: 4px; background: var(--brand-pale); border-radius: 4px; overflow: hidden; }
.loader-fill { height: 100%; width: 0; background: var(--brand); border-radius: 4px; animation: loadBar 1.2s ease forwards; }
@keyframes loadBar { to { width: 100%; } }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--text); color: var(--white); padding: 1rem 2rem;
    border-radius: 50px; font-size: 0.9rem; font-weight: 500;
    z-index: 9998; transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0; pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--brand); }

/* ===== FLOATING WHATSAPP ===== */
.whatsapp-float {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
    width: 56px; height: 56px; background: #25d366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 1.6rem;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
    transition: var(--transition); animation: floatPulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5); }
.whatsapp-tooltip {
    position: absolute; right: 68px; background: var(--text); color: var(--white);
    padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: var(--transition);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }
@keyframes floatPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 6px 36px rgba(37, 211, 102, 0.7); }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed; bottom: 7rem; right: 1.5rem; z-index: 998;
    width: 44px; height: 44px; background: var(--brand); color: var(--white);
    border: none; border-radius: 50%; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); transition: var(--transition);
    opacity: 0; visibility: hidden; transform: translateY(10px);
}
.back-to-top.visible,
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--brand-dark); transform: translateY(-3px); }

/* ===== LIVE CHAT WIDGET ===== */
.chat-launcher {
    position: fixed; bottom: 8.5rem; right: 1.5rem; z-index: 999;
    width: 56px; height: 56px; background: var(--brand); border-radius: 50%;
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 1.5rem; box-shadow: 0 6px 24px rgba(231, 90, 90, 0.4);
    transition: var(--transition); animation: chatPulse 2.5s infinite;
}
.chat-launcher:hover { transform: scale(1.1); box-shadow: 0 10px 30px rgba(231, 90, 90, 0.5); }
.chat-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--success); color: var(--white); width: 20px; height: 20px;
    border-radius: 50%; font-size: 0.7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--white);
}
@keyframes chatPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(231, 90, 90, 0.4); }
    50% { box-shadow: 0 6px 36px rgba(231, 90, 90, 0.7); }
}

.chat-widget {
    position: fixed; bottom: 9.5rem; right: 1.5rem; z-index: 1000;
    width: 360px; max-width: calc(100vw - 3rem);
    background: var(--white); border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}
.chat-widget.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chat-widget-header {
    background: var(--brand); color: var(--white); padding: 1rem 1.2rem;
    border-radius: 16px 16px 0 0; display: flex; align-items: center;
    justify-content: space-between;
}
.chat-header-content { display: flex; align-items: center; gap: 0.8rem; }
.chat-avatar {
    width: 40px; height: 40px; background: rgba(255,255,255,0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; position: relative;
}
.chat-status-dot {
    position: absolute; bottom: 2px; right: 2px;
    width: 10px; height: 10px; background: var(--success);
    border-radius: 50%; border: 2px solid var(--brand);
}
.chat-header-text strong { display: block; font-size: 0.95rem; }
.chat-header-text span { font-size: 0.8rem; opacity: 0.9; }
.chat-close-btn {
    background: none; border: none; color: var(--white);
    cursor: pointer; font-size: 1.1rem; padding: 4px;
    opacity: 0.8; transition: var(--transition);
}
.chat-close-btn:hover { opacity: 1; }

.chat-widget-body {
    padding: 1.2rem; max-height: 400px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 1rem;
}
.chat-message {
    display: flex; gap: 0.6rem; align-items: flex-start;
    animation: fadeInUp 0.3s ease;
}
.chat-message-avatar {
    width: 32px; height: 32px; background: var(--brand-pale);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--brand); font-size: 0.9rem; flex-shrink: 0;
}
.chat-message-content {
    background: var(--bg); padding: 0.7rem 1rem;
    border-radius: 12px; max-width: 75%;
}
.chat-message-content p { font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.chat-message.user { flex-direction: row-reverse; }
.chat-message.user .chat-message-content {
    background: var(--brand); color: var(--white);
}

.chat-quick-replies {
    display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem;
}
.quick-reply-btn {
    background: var(--white); border: 1.5px solid var(--brand);
    color: var(--brand); padding: 0.6rem 1rem; border-radius: 20px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: var(--transition); text-align: left;
}
.quick-reply-btn:hover { background: var(--brand); color: var(--white); }

.chat-widget-footer {
    padding: 1rem; border-top: 1px solid var(--border);
    display: flex; gap: 0.6rem; align-items: center;
}
.chat-widget-footer input {
    flex: 1; padding: 0.7rem 1rem; border: 1.5px solid var(--border);
    border-radius: 20px; font-size: 0.88rem; font-family: inherit;
    transition: var(--transition);
}
.chat-widget-footer input:focus { outline: none; border-color: var(--brand); }
.chat-send-btn {
    width: 36px; height: 36px; background: var(--brand);
    border: none; border-radius: 50%; color: var(--white);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: var(--transition);
}
.chat-send-btn:hover { background: var(--brand-dark); transform: scale(1.05); }

/* ===== CHAT BOT ENHANCEMENTS ===== */

/* Avatar uses logo image */
.chat-message-avatar img {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: contain; background: var(--brand-pale);
    border: 1.5px solid var(--brand-pale);
}

/* Bot bubble */
.chat-message.bot .chat-message-content {
    background: var(--bg);
    border-radius: 0 14px 14px 14px;
    padding: 0.75rem 1rem;
    max-width: 82%;
}
.chat-message.bot .chat-message-content p {
    font-size: 0.875rem; color: var(--text); line-height: 1.6;
}
.chat-message.bot .chat-message-content strong { color: var(--text); }
.chat-message.bot .chat-message-content a { color: var(--brand); font-weight: 600; }

/* User bubble */
.chat-message.user .chat-message-content {
    background: var(--brand);
    border-radius: 14px 0 14px 14px;
    padding: 0.75rem 1rem;
    max-width: 82%;
}
.chat-message.user .chat-message-content p { color: var(--white); font-size: 0.875rem; line-height: 1.6; }

/* Typing dots */
.typing-dots {
    display: flex !important;
    align-items: center;
    gap: 5px;
    padding: 0.75rem 1rem !important;
    min-width: 56px;
}
.typing-dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.2s infinite ease-in-out;
    display: inline-block;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Option buttons grid */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.25rem 0 0.5rem 0;
    animation: fadeInUp 0.25s ease;
}
.chat-option-btn {
    background: var(--white);
    border: 1.5px solid var(--brand);
    color: var(--brand);
    padding: 0.55rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    line-height: 1.4;
}
.chat-option-btn:hover {
    background: var(--brand);
    color: var(--white);
    transform: translateX(3px);
}

/* Wider widget for better readability */
.chat-widget {
    width: 380px;
}
.chat-widget-body {
    max-height: 420px;
    padding: 1rem;
    gap: 0.75rem;
}

/* Header subtitle */
.chat-header-text span { font-size: 0.75rem; opacity: 0.85; }

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    background: var(--brand); color: var(--white);
    padding: 0.6rem 0; font-size: 0.85rem; text-align: center;
    position: relative; z-index: 1001;
}
.announcement-bar .container { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.announcement-bar a { color: var(--white); font-weight: 700; text-decoration: underline; }
.announcement-bar a:hover { opacity: 0.85; }
.announcement-close {
    background: none; border: none; color: var(--white); cursor: pointer;
    font-size: 0.9rem; padding: 2px 6px; opacity: 0.8; transition: var(--transition);
    position: absolute; right: 1rem;
}
.announcement-close:hover { opacity: 1; }
.announcement-bar.hidden { display: none; }

/* Offset navbar when bar is visible */
.navbar { top: 36px; transition: top 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease; }
.navbar.bar-hidden { top: 0; }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9997;
    background: var(--dark); color: var(--white);
    padding: 1.2rem 2rem; display: flex; align-items: center;
    justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
    transform: translateY(100%); transition: transform 0.4s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner.hidden { display: none; }
.cookie-content { display: flex; align-items: center; gap: 1rem; flex: 1; }
.cookie-icon { font-size: 1.5rem; color: var(--brand); flex-shrink: 0; }
.cookie-content p { font-size: 0.88rem; color: rgba(255,255,255,0.85); }
.cookie-content a { color: var(--brand-light); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.8rem; align-items: center; flex-shrink: 0; }
.cookie-decline {
    background: none; border: 1px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.7);
    padding: 0.6rem 1.2rem; border-radius: 50px; cursor: pointer; font-size: 0.85rem;
    transition: var(--transition);
}
.cookie-decline:hover { border-color: var(--white); color: var(--white); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed; top: 70px; left: -100%; width: 100%;
        flex-direction: column; background: var(--white);
        padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transition: var(--transition); z-index: 999;
    }
    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .btn-nav { display: none; }

    /* Dropdown: full-width in mobile menu */
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        min-width: unset;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.3s ease;
        background: var(--bg);
        border-radius: var(--radius-sm);
        margin-top: 0.5rem;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 400px;
        padding: 0.5rem 0;
        transform: none;
    }
    .nav-dropdown-menu li a { padding: 0.5rem 1rem; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
    .chat-widget { width: calc(100vw - 3rem); right: 1.5rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; }
    .announcement-bar .container { padding: 0 3rem 0 1rem; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .chat-launcher { bottom: 7.5rem; right: 1rem; }
    .chat-widget { bottom: 8rem; right: 1rem; width: calc(100vw - 2rem); }
    .chat-option-btn { font-size: 0.8rem; padding: 0.5rem 0.8rem; }
    .whatsapp-float { bottom: 1rem; right: 1rem; }
    .back-to-top { bottom: 1rem; right: 7rem; }
    .footer-trust { gap: 0.6rem; }
    .footer-trust-badge { font-size: 0.72rem; }
}
