/* ==========================================================================
   HPtekLatex Group — Shared Stylesheet (styles.css)
   ========================================================================== */

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

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

::selection {
    background: rgba(224, 79, 22, 0.18);
    color: #0F172A;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0B0F17;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Industrial Grid Backgrounds */
.tech-grid-dark {
    background-color: #0B0F17;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.tech-grid-light {
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
}

/* Glassmorphism Navigation & Cards */
.glass-nav {
    background: rgba(11, 15, 23, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Compact Desktop Navigation (no overflow at 1280px+) */
.nav-brand { flex-shrink: 0; z-index: 20; position: relative; }
.nav-actions { flex-shrink: 0; z-index: 30; position: relative; }
.nav-desktop { gap: 2px; min-width: 0; font-size: 13px; font-weight: 500; position: relative; z-index: 10; }
.nav-link {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 6px 6px; border-radius: 6px; white-space: nowrap; font-size: 12.5px;
    color: rgba(255, 255, 255, 0.75); background: transparent; border: 0;
    font: inherit; cursor: pointer; transition: color .15s ease, background-color .15s ease;
}
.nav-link:hover, .nav-dd.open > .nav-link { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-link-amber { color: #fbbf24; }
.nav-link-amber:hover { color: #fcd34d; background: rgba(245, 158, 11, 0.10); }

/* Universal Omnisearch Button in Header */
.nav-search-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 35;
}
.nav-search-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}
.nav-search-btn kbd {
    display: inline-flex;
    align-items: center;
    padding: 2px 5px;
    font-family: ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
@media (max-width: 1439px) {
    .nav-search-label { display: none !important; }
    .nav-cta-label { display: none !important; }
}
@media (min-width: 1440px) {
    .nav-search-label { display: inline !important; }
    .nav-cta-label { display: inline !important; }
}
.nav-dd { position: relative; }
.nav-dd-menu {
    position: absolute; top: 100%; right: 0; padding-top: 10px; min-width: 240px;
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s; z-index: 60;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu, .nav-dd.open .nav-dd-menu {
    opacity: 1; visibility: visible; transform: none;
}
.nav-dd-panel {
    background: #0B111E; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 14px;
    padding: 6px; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
}
.nav-dd-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    font-size: 13px; color: rgba(255, 255, 255, 0.8); white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.nav-dd-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-amber .nav-link:hover, .nav-amber .nav-dd.open > .nav-link { color: #fbbf24; }
/* Keep header brand & RFQ button compact at all desktop widths inside max-w-7xl (1280px) */
.nav-brand-sub { display: none; }
.nav-rfq-label { display: none !important; }
/* Top utility bar: keep it to a single clean row at all desktop widths */
.topbar-status-text { display: none; }
.topbar-brokers { display: none !important; }

/* Responsive Header Spacing to prevent overlap on 1280px screens */
@media (min-width: 1280px) and (max-width: 1439px) {
    .nav-desktop {
        gap: 3px !important;
    }
    .nav-desktop .nav-link {
        padding: 4px 5px !important;
        font-size: 11.5px !important;
        letter-spacing: -0.01em !important;
    }
    .nav-brand img {
        width: 32px !important;
        height: 32px !important;
    }
    .nav-brand .font-display {
        font-size: 15px !important;
    }
    .nav-actions {
        gap: 5px !important;
    }
    .nav-actions a.bg-accent {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
}

.glass-card-dark {
    background: rgba(22, 31, 48, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.industrial-card {
    background: rgba(18, 26, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.industrial-card:hover {
    border-color: rgba(224, 79, 22, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.img-frame-dark {
    background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06) 0%, rgba(11, 15, 23, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

/* Marquee Ticker */
.mq-track {
    display: flex;
    animation: mq 42s linear infinite;
    width: max-content;
}
.mq-track:hover {
    animation-play-state: paused;
}
@keyframes mq {
    to { transform: translateX(-50%); }
}

/* Status Pulse Indicator */
.pulse-dot {
    animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Error Code & FAQ Accordions */
.err-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}
.err-item.open .err-a {
    max-height: 1200px;
    opacity: 1;
}
.err-item.open .err-chev {
    transform: rotate(180deg);
    background: #E04F16;
    color: #fff;
    border-color: #E04F16;
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}
.faq-item.open .faq-a {
    max-height: 800px;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .mq-track,
    .pulse-dot {
        animation: none !important;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: #E04F16;
    color: #fff;
    border-color: #E04F16;
}

/* Slide-Over RFQ Drawer */
.drawer-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-backdrop.open {
    opacity: 1;
    pointer-events: all;
}
.drawer-panel {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-panel.open {
    transform: translateX(0);
}

/* Completely eliminate Netlify injected badge / drawer iframe */
#nl-badge-frame,
iframe[id*="nl-badge"],
iframe[title*="Powered by Netlify"],
iframe[srcdoc*="Powered by Netlify"],
.nl-badge,
.nl-wrap,
#netlify-drawer,
[data-netlify-drawer] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    z-index: -9999 !important;
}

/* Industrial WhatsApp Triage Widget */
.wa-widget-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483647;
}

.wa-panel {
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 480px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
    background: #0F1623;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    z-index: 2147483647;
}

.wa-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.wa-panel-body {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.wa-fab {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0B0F17;
    color: #FFFFFF;
    border: 1px solid rgba(16, 185, 129, 0.45);
    padding: 12px 18px;
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
    cursor: pointer;
    transition: all 0.25s ease;
}

.wa-fab:hover {
    border-color: #10B981;
    background: #131B2E;
    transform: translateY(-2px);
}

/* Mobile-First Thumb Dock & Native Bottom Sheet (< 768px) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mob-bottom-dock {
    display: none;
}

@media (max-width: 767px) {
    body {
        padding-bottom: 74px; /* Space for thumb dock */
    }
    .wa-fab {
        display: none; /* Replaced by dedicated button in mobile thumb dock */
    }
    .wa-widget-wrap {
        bottom: 70px;
        right: 0;
        left: 0;
        z-index: 70;
    }
    .wa-panel {
        position: fixed;
        bottom: 64px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
        border-radius: 22px;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }
    .mob-bottom-dock {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(11, 15, 23, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 65;
        padding: 4px 6px;
    }
}



/* HIGH CONTRAST HERO ACTION BUTTONS */
.hero-btn-urgent {
    background-color: #10b981 !important;
    color: #030712 !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 20px -3px rgba(16, 185, 129, 0.4) !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
}
.hero-btn-urgent:hover {
    background-color: #34d399 !important;
    color: #030712 !important;
    box-shadow: 0 12px 24px -3px rgba(16, 185, 129, 0.6) !important;
}
