/* ============================================================
   enhancements.css — Purely additive styles for LANSPECT SG
   This file does NOT modify any existing CSS rule in styles.css
   ============================================================ */

/* ----------------------------------------------------------
   0. MOBILE RESPONSIVE — prevent horizontal overflow
   ---------------------------------------------------------- */
html {
    overflow-x: hidden;
}
body {
    overflow-x: hidden;
    max-width: 100vw;
}
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}
@media (max-width: 768px) {
    /* Ensure all direct content containers don't overflow */
    .container, [class*="max-w-"] {
        max-width: 100% !important;
        padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
    }
    /* Mobile strip — clamp to viewport */
    #ls-mobile-strip {
        max-width: 100vw;
        box-sizing: border-box;
    }
    /* Prevent text from forcing horizontal scroll */
    h1, h2, h3, h4, h5, p {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ----------------------------------------------------------
   1. COOKIE CONSENT BANNER
   ---------------------------------------------------------- */
#ls-cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px 20px;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.82rem;
    border-top: 2px solid #2563eb;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
#ls-cookie-banner.show { display: flex; }
#ls-cookie-banner a { color: #60a5fa; text-decoration: underline; }
.ls-cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ls-cookie-accept {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ls-cookie-accept:hover { background: #1d4ed8; }
.ls-cookie-decline {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}
.ls-cookie-decline:hover { color: #e2e8f0; border-color: #64748b; }

/* ----------------------------------------------------------
   2. BACK-TO-TOP BUTTON
   ---------------------------------------------------------- */
#ls-back-to-top {
    position: fixed;
    bottom: 155px;
    right: 24px;
    z-index: 990;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #092a4b;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(9,42,75,0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s;
    pointer-events: none;
}
#ls-back-to-top.ls-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#ls-back-to-top:hover { background: #2563eb; }
#ls-back-to-top svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
    #ls-back-to-top { bottom: 130px; right: 14px; }
}

/* ----------------------------------------------------------
   3. ANNOUNCEMENT / PROMO BAR (dismissible)
   ---------------------------------------------------------- */
#ls-announce-bar {
    display: none;
    background: #2563eb;
    color: #fff;
    text-align: center;
    padding: 8px 48px;
    font-size: 0.82rem;
    font-weight: 500;
    position: relative;
    z-index: 10000;
    letter-spacing: 0.01em;
}
#ls-announce-bar.show { display: block; }
#ls-announce-bar a { color: #bfdbfe; font-weight: 700; text-decoration: underline; }
#ls-announce-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}
#ls-announce-close:hover { color: #fff; }

/* ----------------------------------------------------------
   4. MOBILE STICKY CONTACT STRIP
   ---------------------------------------------------------- */
#ls-mobile-strip {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9800;
    background: #092a4b;
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 768px) {
    #ls-mobile-strip { display: none !important; }
}
.ls-strip-btn {
    color: #fff;
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.ls-strip-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.ls-strip-wa { background: rgba(37,211,102,0.3); }
.ls-strip-wa:hover { background: rgba(37,211,102,0.45); }

/* ----------------------------------------------------------
   5. BREADCRUMB NAV (auto-injected on inner pages)
   ---------------------------------------------------------- */
#ls-breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 7px max(1rem, env(safe-area-inset-left, 0px));
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.ls-bc-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.ls-bc-link:hover { text-decoration: underline; }
.ls-bc-sep { color: #94a3b8; padding: 0 4px; }
.ls-bc-current { color: #334155; font-weight: 600; }

/* ----------------------------------------------------------
   6. ACTIVE NAV HIGHLIGHT (current page)
   ---------------------------------------------------------- */
nav a.nav-link.ls-nav-active {
    color: #2563eb !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #2563eb;
}

/* ----------------------------------------------------------
   7. TRUSTED BY LOGO STRIP (homepage only)
   ---------------------------------------------------------- */
.ls-trusted-strip {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding-block: 15px;
    overflow: hidden;
}
.ls-trusted-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-inline: max(16px, env(safe-area-inset-left,0px));
}
.ls-trusted-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 12px;
    border-right: 1px solid #e2e8f0;
}
.ls-marquee {
    flex: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #fff 10%, #fff 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #fff 10%, #fff 90%, transparent);
}
.ls-track {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    animation: ls-scroll 24s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .ls-track { animation: none; } }
.ls-marquee:hover .ls-track { animation-play-state: paused; }
.ls-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    letter-spacing: 0.3px;
    user-select: none;
}
@keyframes ls-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ----------------------------------------------------------
   9. AI BANNER — moving light border beam (all pages)
   ---------------------------------------------------------- */
.ls-ai-outer {
    position: relative;
    border-radius: 1.25rem;
    margin-top: 2.5rem;
    overflow: hidden;
    background: rgba(255,255,255,0.035);
}

/* Rotating conic gradient — the moving light beam */
.ls-ai-outer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 65%,
        rgba(37, 99, 235, 0.55) 76%,
        rgba(147, 197, 253, 0.85) 80%,
        rgba(255, 255, 255, 0.95) 82%,
        rgba(147, 197, 253, 0.85) 84%,
        rgba(37, 99, 235, 0.55) 88%,
        transparent
    );
    animation: ls-border-rotate 3.5s linear infinite;
    z-index: 0;
    pointer-events: none;
}

/* Dark inner fill — masks interior, leaves only the 2px border ring */
.ls-ai-outer::after {
    content: '';
    position: absolute;
    inset: 1.5px;
    border-radius: calc(1.25rem - 1.5px);
    background: #111827;
    z-index: 1;
    pointer-events: none;
}

@keyframes ls-border-rotate {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .ls-ai-outer::before { animation: none; }
}

/* Banner content sits above the beam layers */
.ls-ai-outer .ask-ai-banner {
    position: relative;
    z-index: 2;
    margin-top: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    align-items: center !important;
}
.ls-ai-outer .ask-ai-banner-right {
    gap: 0.35rem !important;
}
.ls-ai-outer .ask-ai-caption {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ----------------------------------------------------------
   8. PRINT STYLESHEET
   ---------------------------------------------------------- */
@media print {
    nav, footer, #ls-cookie-banner, #ls-back-to-top,
    #ls-announce-bar, #ls-mobile-strip, .floating-buttons { display: none !important; }
    body { font-size: 12pt; color: #000; background: #fff; }
    h1,h2,h3 { page-break-after: avoid; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #555; }
}
