/* ============================================================
   HOENGAGER - Common Shared Styles
   Navbar, Footer, Mobile Menu, Responsive Utilities
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    --color-bg: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-bg-card: #141414;
    --color-border: #222222;
    --color-border-light: #1f1f1f;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-text-dim: #cccccc;
    --color-accent: #00b4d8;
    --color-accent-hover: #0099b8;
    --nav-height: 70px;
    --max-width: 1400px;
    --font-primary: 'Exo 2', sans-serif;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--nav-height);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 10000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo a {
    display: block;
    line-height: 0;
}

.nav-logo .logo-image {
    height: 70px;
    width: auto;
}

/* Desktop Nav Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    align-items: center;
}

.nav-menu a {
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-text);
}

/* ============================================================
   MEGA DROPDOWN (Products hover menu)
   ============================================================ */
.nav-menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    padding: 30px 35px;
    width: 1000px;
    max-width: 90vw;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    z-index: 9999;
}

/* transparent hover bridge — 让鼠标从 Products 平滑移到下拉面板 */
.mega-dropdown::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}

.nav-menu > li:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-dropdown .dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.dropdown-card {
    background: #0a0a0a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #222;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.dropdown-card:hover {
    transform: translateY(-4px);
    border-color: #00b4d8;
}

.dropdown-card img {
    width: 100%;
    aspect-ratio: 1 / 0.9;
    object-fit: contain;
    background: #111;
    display: block;
}

.dropdown-card .card-info {
    padding: 14px 16px 18px;
}

.dropdown-card .card-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff, #00b4d8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dropdown-card .card-info p {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .mega-dropdown {
        width: 90vw;
        padding: 20px;
    }
    .mega-dropdown .dropdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu > li:hover .mega-dropdown {
        display: none;
    }
    .mega-dropdown {
        display: none;
    }
}

/* ============================================================
   MOBILE HAMBURGER MENU
   ============================================================ */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Hamburger open state */
.nav-toggle.open .hamburger {
    background-color: transparent;
}

.nav-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Menu Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}

.nav-overlay.active {
    display: block;
}

/* Mobile Nav Menu */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-bg);
        flex-direction: column;
        padding: 100px 32px 40px;
        gap: 0;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        border-left: 1px solid var(--color-border);
        overflow-y: auto;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu a {
        display: block;
        padding: 16px 0;
        font-size: 16px;
        letter-spacing: 1.5px;
    }

    .nav-container {
        padding: 0 16px;
    }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background-color: #050505;
    border-top: 1px solid var(--color-border);
    padding: 60px 24px 40px;
    margin-top: 60px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 1px;
    color: var(--color-text);
}

.footer-section p {
    font-size: 14px;
    color: var(--color-text-muted);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    font-size: 14px;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--color-text);
}

.social-section {
    margin-bottom: 40px;
    padding-top: 20px;
}

.social-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-item:hover {
    color: var(--color-text);
    background-color: rgba(0, 180, 216, 0.1);
    border-color: rgba(0, 180, 216, 0.3);
    transform: translateY(-2px);
}

.social-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 16px 30px;
        margin-top: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    body {
        padding-top: var(--nav-height);
    }

    .nav-logo .logo-image {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
}