/* WireBus Technical Energy Engineering & Commercial Vendors CSS */
:root {
    --bg-dark: #070a0f;
    --bg-card: rgba(13, 19, 31, 0.85);
    --bg-card-hover: rgba(20, 30, 48, 0.9);
    --border-glass: rgba(0, 240, 255, 0.12);
    --border-highlight: rgba(0, 255, 157, 0.35);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #475569;

    --accent-emerald: #00ff9d;
    --accent-cyan: #00f0ff;
    --accent-blue: #3b82f6;
    --accent-amber: #ffb700;
    --accent-purple: #a855f7;

    --gradient-brand: linear-gradient(135deg, #00ff9d 0%, #00f0ff 50%, #3b82f6 100%);
    --gradient-glow: radial-gradient(circle at 50% 10%, rgba(0, 255, 157, 0.12), transparent 70%);

    --font-main: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-glass: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-neon: 0 0 20px rgba(0, 255, 157, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-emerald); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Header Ticker */
.telemetry-bar {
    background: #040609;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    padding: 6px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
    z-index: 1001;
}

.telemetry-item { display: flex; gap: 8px; align-items: center; }
.tel-label { color: var(--text-dim); }
.tel-val { font-weight: 700; color: var(--text-main); }
.highlight-green { color: var(--accent-emerald); }
.highlight-cyan { color: var(--accent-cyan); }
.highlight-emerald { color: #00b050; }
.highlight-amber { color: var(--accent-amber); }

/* Typography */
.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.highlight { color: var(--accent-emerald); }
.sub-tag {
    font-size: 0.65rem; font-family: var(--font-mono); color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan); padding: 2px 6px; border-radius: 4px; margin-left: 8px;
}

/* Navbar */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(7, 10, 15, 0.9); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass); padding: 14px 0;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text-main); }
.brand-logo-img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(76, 226, 147, 0.4)); }
.inline-footer-logo { width: 24px; height: 24px; vertical-align: middle; margin-right: 6px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-main); }
.mobile-menu-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: all 0.25s ease; border: 1px solid transparent;
}
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 26px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-primary { background: var(--accent-emerald); color: #040609; font-weight: 700; box-shadow: var(--shadow-neon); }
.btn-primary:hover { background: #2effad; transform: translateY(-2px); color: #040609; }
.btn-outline { background: rgba(255, 255, 255, 0.02); border-color: var(--border-glass); color: var(--text-main); }
.btn-outline:hover { border-color: var(--accent-cyan); background: rgba(0, 240, 255, 0.05); }
.btn-secondary { background: rgba(0, 255, 157, 0.1); color: var(--accent-emerald); border-color: rgba(0, 255, 157, 0.25); }

/* Hero Section */
.hero-section { position: relative; padding: 120px 0 80px; }
.hero-bg-glow {
    position: absolute; top: -50px; left: 50%; transform: translateX(-50%);
    width: 1000px; height: 500px; background: var(--gradient-glow); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 20px;
    background: rgba(0, 255, 157, 0.08); border: 1px solid rgba(0, 255, 157, 0.2);
    color: var(--accent-emerald); font-size: 0.82rem; font-weight: 600; font-family: var(--font-mono);
    margin-bottom: 20px;
}
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: var(--accent-emerald); box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 255, 157, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

.hero-title { font-size: 2.8rem; font-weight: 800; line-height: 1.15; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 40px; border-top: 1px solid var(--border-glass); padding-top: 24px; }
.stat-num { font-size: 1.5rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent-cyan); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Terminal */
.hero-terminal {
    background: #030508; border: 1px solid var(--border-glass);
    border-radius: var(--radius-md); box-shadow: var(--shadow-glass); overflow: hidden; font-family: var(--font-mono);
}
.terminal-header { background: #0a0e17; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.terminal-buttons { display: flex; gap: 6px; }
.btn-dot { width: 10px; height: 10px; border-radius: 50%; }
.btn-dot.red { background: #ff5f56; } .btn-dot.yellow { background: #ffbd2e; } .btn-dot.green { background: #27c93f; }
.terminal-title { font-size: 0.78rem; color: var(--text-dim); }
.terminal-body { padding: 20px; min-height: 230px; font-size: 0.82rem; display: flex; flex-direction: column; gap: 8px; }
.term-line { color: var(--text-muted); line-height: 1.4; }
.term-line .prompt { color: var(--accent-cyan); font-weight: 600; }
.term-line.success { color: var(--accent-emerald); }
.term-line.info { color: var(--accent-blue); }
.term-line.highlight { color: var(--accent-amber); font-weight: 600; }
.terminal-controls { background: #080c14; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border-glass); }
.terminal-status { font-size: 0.72rem; color: var(--text-dim); }

/* Panels */
.section { padding: 90px 0; }
.section-header { margin-bottom: 50px; }
.section-badge { color: var(--accent-emerald); font-weight: 700; font-size: 0.8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 8px; }
.section-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 650px; margin: 0 auto; }
.glass-panel { background: var(--bg-card); backdrop-filter: blur(16px); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-glass); }
.glass-card { background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 24px; transition: all 0.25s ease; }
.glass-card:hover { background: var(--bg-card-hover); border-color: var(--border-highlight); transform: translateY(-3px); }

/* Filter Tabs & Cards */
.filter-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-btn { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass); color: var(--text-muted); padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.filter-btn.active { background: rgba(0, 255, 157, 0.12); border-color: var(--accent-emerald); color: var(--accent-emerald); }

.search-box-wrap { max-width: 600px; margin: 0 auto 30px; }
.search-input { width: 100%; background: #06090e; border: 1px solid var(--border-glass); border-radius: 24px; padding: 12px 20px; color: var(--text-main); font-family: var(--font-mono); font-size: 0.88rem; outline: none; }
.search-input:focus { border-color: var(--accent-cyan); }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tool-card { display: flex; flex-direction: column; justify-content: space-between; }
.tool-tag { font-size: 0.7rem; font-family: var(--font-mono); color: var(--accent-cyan); font-weight: 700; margin-bottom: 6px; display: inline-block; }
.tool-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.tool-desc { font-size: 0.88rem; color: var(--text-muted); }
.tool-repo { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-emerald); margin-top: 12px; }

/* SLD Layout */
.sld-controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 36px; background: #06090e; padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border-glass); }
.ctrl-box label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.val-tag { color: var(--accent-emerald); font-family: var(--font-mono); }
.form-range { width: 100%; accent-color: var(--accent-emerald); }

.sld-diagram { display: flex; flex-direction: column; gap: 24px; position: relative; padding: 20px 0; }
.sld-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.sld-node { background: #090e17; border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 20px; text-align: center; position: relative; }
.node-pv { border-color: rgba(255, 183, 0, 0.4); }
.node-wind { border-color: rgba(0, 240, 255, 0.4); }
.node-bess { border-color: rgba(0, 255, 157, 0.4); }
.node-load { border-color: rgba(168, 85, 247, 0.4); }

.node-tag { font-size: 0.65rem; font-family: var(--font-mono); background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 4px; margin-right: 6px; }
.node-header { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.node-metric { font-size: 1.25rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent-emerald); }
.node-sub { font-size: 0.78rem; font-family: var(--font-mono); color: var(--text-dim); margin-top: 4px; }

.sld-busbar { background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald), var(--accent-cyan)); height: 8px; border-radius: 4px; box-shadow: 0 0 15px var(--accent-cyan); margin: 10px 0; position: relative; }
.busbar-label { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; color: var(--accent-cyan); background: var(--bg-dark); padding: 0 10px; }
.busbar-metric { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--accent-emerald); background: var(--bg-dark); padding: 0 10px; }

/* Table */
.table-responsive { overflow-x: auto; margin-top: 20px; }
.tech-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.82rem; text-align: left; }
.tech-table th { background: #090e17; color: var(--accent-cyan); padding: 12px 16px; border-bottom: 2px solid var(--border-glass); font-weight: 700; }
.tech-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: var(--text-muted); }
.tech-table tr:hover td { background: rgba(0, 240, 255, 0.03); color: var(--text-main); }

/* Quickstart & Footer */
.quickstart-box { position: relative; background: #030508; border: 1px solid var(--border-highlight); border-radius: var(--radius-md); padding: 18px; margin: 24px 0; text-align: left; font-family: var(--font-mono); color: var(--accent-emerald); }
.copy-btn { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, 0.1); border: none; color: var(--text-muted); font-size: 0.68rem; padding: 3px 8px; border-radius: 4px; cursor: pointer; }
.copy-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.2); }
.download-actions { display: flex; justify-content: center; gap: 16px; }

.footer { border-top: 1px solid var(--border-glass); padding: 36px 0; font-size: 0.85rem; color: var(--text-muted); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text-main); }

/* Modal Form Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 6, 9, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal-card {
    width: 100%;
    max-width: 620px;
    background: #0b1019;
    border: 1px solid var(--border-highlight);
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
}

.modal-header h3 { font-size: 1.25rem; font-weight: 700; color: var(--accent-emerald); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.8rem; cursor: pointer; }
.modal-close:hover { color: var(--text-main); }

.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }

.form-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-input, .form-select {
    width: 100%;
    background: #04070d;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    outline: none;
}
.form-input:focus, .form-select:focus { border-color: var(--accent-cyan); }

.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .form-group-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .mobile-menu-toggle { display: block; }
}
