/* ══════════════════════════════════════════ */
/*  Mcnuun AI — Floating Chat Button (Right)  */
/* ══════════════════════════════════════════ */
.mcnuun-chat-window {
    position: fixed;
    bottom: 110px;
    right: 32px;
    z-index: 5000;
    width: 320px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: none;
    background: linear-gradient(135deg, #003366 0%, #004D25 100%);
    border: 1px solid rgba(200, 166, 99, 0.3);
    font-family: system-ui, -apple-system, sans-serif;
}

.mcnuun-chat-window.open {
    display: block;
}

.mcnuun-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.mcnuun-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcnuun-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C8A663, #A08040);
}

.mcnuun-title {
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
    line-height: 1;
}

.mcnuun-status {
    color: #4ade80;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.mcnuun-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.5;
    }
}

.mcnuun-close {
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    outline: none;
}

.mcnuun-close:hover {
    color: white;
}

.mcnuun-messages {
    padding: 16px;
    height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    max-height: 40vh;
}

.mcnuun-msg-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.mcnuun-msg-wrapper.user {
    justify-content: flex-end;
}

.mcnuun-msg-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C8A663, #A08040);
}

.mcnuun-msg-bubble {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
    border-radius: 16px;
    border-bottom-left-radius: 2px;
    padding: 10px 14px;
    max-width: 80%;
    backdrop-filter: blur(4px);
    direction: rtl;
}

.mcnuun-msg-wrapper.user .mcnuun-msg-bubble {
    background: rgba(200, 166, 99, 0.3);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 2px;
}

.mcnuun-input-area {
    padding: 8px 12px 12px;
    background: rgba(0, 0, 0, 0.2);
}

.mcnuun-input-box {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    backdrop-filter: blur(4px);
}

.mcnuun-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    outline: none;
    direction: rtl;
    box-shadow: none;
}

.mcnuun-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.mcnuun-send {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C8A663, #A08040);
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
    outline: none;
}

.mcnuun-send:hover {
    transform: scale(1.1);
}

.mcnuun-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 5000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(135deg, #63ace5, #00ace7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    outline: none;
}

.mcnuun-fab:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.mcnuun-icon-flip {
    transform: scaleX(-1);
}

@media(max-width: 768px) {
    .mcnuun-chat-window {
        bottom: 80px;
        right: 15px;
        width: calc(100vw - 30px);
        height: calc(100vh - 120px);
        max-height: 480px;
    }

    .mcnuun-fab {
        bottom: 25px;
        right: 15px;
        width: 55px;
        height: 55px;
    }

    .mcnuun-fab i {
        font-size: 22px !important;
    }
}

/* Modern Minimalist Nav Style - A Quality Scope */
.header-left .nav-menu li .nav-link,
.nav-menu li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 15px auto !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    color: #64748b !important;
    background: transparent !important;
    border: 2px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
}

.header-left .nav-menu li.active .nav-link,
.nav-menu li a:hover,
.nav-link:hover {
    background: rgba(99, 172, 229, 0.1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(99, 172, 229, 0.15) !important;
    border-color: rgba(99, 172, 229, 0.3) !important;
}

.nav-menu li a svg {
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    color: #64748b !important;
    transition: color 0.3s ease !important;
}

.header-left .nav-menu li.active .nav-link svg,
.nav-menu li a:hover svg,
.nav-link:hover svg {
    color: #63ace5 !important;
    /* Teal/Cyan identity */
}

/* Ensure Scroll-Up button never overlaps Mcnuun FAB */
.scroll-to-top,
.scroll_up,
#back-to-top {
    bottom: 110px !important;
    right: 30px !important;
    z-index: 4900 !important;
    opacity: 0.9 !important;
}

/* Remove lingering solid paths if any */
.nav-menu li a svg path {
    fill: none !important;
}

/* Prevent Header from overlapping the video player on the right */
.hb-top-fixed {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 15px !important;
    z-index: 99 !important;
}

/* Accurate SVG centering in Nav Menu */
.nav-menu li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.nav-menu li a svg {
    margin: auto !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Top Header Info Flexbox Styling */
.hb-info {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 15px !important;
    /* Space between phones/email */
}

@media (max-width: 767px) {
    /* Hamburger Menu Button Visibility Fix */
    .toggler-menu,
    .navbar-toggler,
    .menu-toggle {
        display: flex !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        left: auto !important;
        z-index: 10000 !important;
        width: 45px !important;
        height: 45px !important;
        background-color: #63ace5 !important;
        border-radius: 5px !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }

    .toggler-menu span,
    .toggler-menu i {
        color: #ffffff !important;
        font-size: 24px !important;
    }

    html,
    body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100% !important;
    }

    .container,
    .about-info,
    .home-banner,
    .section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    /* Fix potentially wide iframes/widgets */
    iframe,
    .mcnuun-chat-container {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .hb-top-fixed {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        max-width: 100vw !important;
        gap: 8px !important;
        padding-top: 15px !important;
    }

    .hb-info {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .hb-info a {
        font-size: 13px !important;
        text-align: center !important;
    }

    /* Drop overlapping background images in hero */
    .home-banner .img,
    .banner-img {
        opacity: 0.2 !important;
        position: relative !important;
        z-index: -1 !important;
    }

    /* Fix language flags spacing */
    .hb-lang {
        margin: 5px auto !important;
        justify-content: center !important;
        display: flex !important;
    }

    .hb-lang .nav li a {
        width: 35px !important;
        height: 35px !important;
    }

    .hb-lang .nav li a img {
        width: 22px !important;
    }

    /* Fix Overlapping Floating Buttons */
    a[href*="whatsapp"] {
        left: 15px !important;
        bottom: 25px !important;
        z-index: 9999 !important;
    }

    .scroll-to-top,
    .scroll_up,
    #back-to-top {
        display: flex !important;
        bottom: 100px !important;
        right: 15px !important;
        z-index: 9998 !important;
        opacity: 0.9 !important;
    }

    /* Overlapping Title fixes */
    .title h3,
    .section-title h2 {
        position: relative !important;
        z-index: 10 !important;
        background-color: rgba(255, 255, 255, 0.7) !important;
        padding: 5px 10px !important;
        border-radius: 5px !important;
    }
}

@media (min-width: 768px) and (max-width: 1400px) {
    .hb-top-fixed {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        max-width: 45vw !important;
        gap: 5px !important;
    }

    .hb-info {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .hb-info a {
        font-size: 11px !important;
    }

    .hb-lang .nav li a {
        width: 28px !important;
        height: 28px !important;
    }

    .hb-lang .nav li a img {
        width: 18px !important;
    }
}

/* --- Social Media Icons Fix --- */
.about-me .img {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.about-me .img-in {
    position: relative !important;
    z-index: 2 !important;
    margin-bottom: 20px !important;
}

.about-me .img .nav.social-icons {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    width: 100% !important;
    z-index: 10 !important;
}

.about-me .img .nav.social-icons a {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    background: rgba(100, 100, 100, 0.2) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.about-me .img .nav.social-icons a:hover {
    background: rgba(200, 166, 99, 0.8) !important;
    transform: translateY(-3px) !important;
}

.about-me .img .nav.social-icons a svg {
    width: 20px !important;
    height: 20px !important;
    fill: #fff !important;
    display: block !important;
    max-width: 100% !important;
    margin: auto !important;
}

/* Specific fix for TikTok icon or any exceptionally large SVG */
.about-me .img .nav.social-icons a svg path[d^="M448"] {
    transform-origin: center !important;
    transform: scale(0.9) !important;
}

@media (min-width: 1401px) {
    .hb-top-fixed {
        flex-direction: row !important;
        align-items: center !important;
        max-width: 45vw !important;
    }

    .hb-info {
        flex-direction: row !important;
        align-items: center !important;
        gap: 20px !important;
    }
}

.hb-info a {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    transition: color 0.2s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.hb-info a:hover {
    color: #63ace5 !important;
}

.hb-info a[href^="tel:"]::before {
    content: "📞";
    font-size: 13px !important;
}

.hb-info a[href^="mailto:"]::before {
    content: "✉️";
    font-size: 13px !important;
}

.hb-lang .nav {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hb-lang .nav li {
    list-style: none !important;
}

.hb-lang .nav li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
}

.hb-lang .nav li.active a {
    border-color: #63ace5 !important;
    background: rgba(75, 179, 163, 0.1) !important;
    box-shadow: 0 4px 10px rgba(75, 179, 163, 0.2) !important;
}

.hb-lang .nav li a img {
    width: 24px !important;
    height: auto !important;
    border-radius: 4px !important;
    transition: transform 0.3s ease !important;
}

.hb-lang .nav li a:hover img {
    transform: scale(1.1) !important;
}

/* ====== Social Icons Brand Color Overrides ====== */
.social-icons a {
    color: #4a5568 !important; /* Base color grey/neutral */
    transition: color 0.3s ease, transform 0.3s ease !important;
}

/* Force brand color on hover (Aqualityscope Blue/Gold or Primary Theme) */
.social-icons a:hover, 
.social-icons a:hover svg path {
    color: #2F64C8 !important; /* Aqualityscope Primary Blue */
    fill: #2F64C8 !important;
    transform: translateY(-2px);
}

/* TikTok Specific (Optional - if it uses stroke instead of fill) */
.social-icons a[href*="tiktok"]:hover svg path {
    fill: #000000 !important; /* TikTok official color or keep it brand blue */
    stroke: #000000 !important;
}

/* LinkedIn Specific */
.social-icons a[href*="linkedin"]:hover svg path {
    fill: #0A66C2 !important;
}

/* Twitter/X Specific */
.social-icons a[href*="twitter"]:hover svg path,
.social-icons a[href*="x.com"]:hover svg path {
    fill: #000000 !important;
}
