/*
 * Fujian Xinghua Power Energy Technology Co., Ltd.
 * Design Language: "绿色能源·驱动未来"
 * Theme: Deep tech noir with neon energy gradients and flowing circuitry visuals
 */

:root {
    --color-primary: #00c853;
    --color-secondary: #2979ff;
    --color-accent: #ff6d00;
    --color-bg: #040810;
    --color-panel: #091326;
    --color-card: #0f1f36;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-text: #e3f2ff;
    --color-muted: #8ca0c3;
    --color-white: #ffffff;
    --gradient-primary: linear-gradient(120deg, rgba(0, 200, 83, 0.95), rgba(41, 121, 255, 0.9));
    --gradient-secondary: linear-gradient(120deg, rgba(41, 121, 255, 0.8), rgba(0, 200, 171, 0.65));
    --gradient-surface: linear-gradient(145deg, rgba(0, 200, 83, 0.08), rgba(41, 121, 255, 0.04));
    --shadow-glow: 0 25px 65px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.35);
    --shadow-md: var(--shadow-soft);
    --shadow-lg: var(--shadow-glow);
    --font-base: 'Exo 2', 'Poppins', 'Source Han Sans', 'Microsoft YaHei', sans-serif;
    --header-height: 78px;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 32px;
    --max-width: 1200px;

    /* legacy spacing tokens for inline styles */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.9rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* legacy radius tokens */
    --border-radius-sm: 10px;
    --border-radius-md: 18px;
    --border-radius-lg: 32px;

    /* legacy color aliases */
    --color-text-light: var(--color-text);
    --color-text-primary: var(--color-text);
    --color-text-secondary: var(--color-muted);
    --color-background-dark: var(--color-panel);
    --color-background-light: rgba(255, 255, 255, 0.02);
}

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

body {
    font-family: var(--font-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 200, 83, 0.15), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(41, 121, 255, 0.35), transparent 55%),
        radial-gradient(circle at 50% 80%, rgba(255, 109, 0, 0.18), transparent 60%);
    background-attachment: fixed;
}

::selection {
    background: rgba(0, 200, 83, 0.35);
    color: #ffffff;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--color-primary);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.container {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    backdrop-filter: blur(18px);
    background: rgba(5, 13, 25, 0.85);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    letter-spacing: 0.28rem;
    color: var(--color-text);
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--color-muted);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-link.active,
.nav-link:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(5, 10, 25, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: 12px;
    list-style: none;
    display: none;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-item a {
    display: block;
    padding: 10px 14px;
    color: var(--color-text);
    border-radius: var(--radius-sm);
}

.dropdown-item a:hover,
.dropdown-item a.active {
    background: rgba(0, 200, 83, 0.12);
    color: var(--color-primary);
}

.main-content {
    padding-top: calc(var(--header-height) + 30px);
}

/* --- Hero Sections --- */
.hero-energy,
.page-hero {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.hero-energy {
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-energy::after,
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(4, 8, 16, 0.9), rgba(4, 8, 16, 0.4));
}

.hero-energy-content,
.page-hero .hero-wrap {
    position: relative;
    z-index: 2;
}

.hero-energy-content h1 {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    margin-bottom: 1rem;
    text-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
}

.hero-energy-content p {
    font-size: 1.15rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* --- Buttons & Pills --- */
.btn {
    border-radius: var(--radius-full, 999px);
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 200, 83, 0.25);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-text);
    background: transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.pill,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Sections --- */
section {
    padding: 90px 0;
}

.section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 60px auto;
}

.section-heading .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.section-heading h2 {
    font-size: clamp(2.2rem, 3vw, 3rem);
    margin: 0.6rem 0;
}

.section-heading p {
    color: var(--color-muted);
}

/* --- Cards & Panels --- */
.card,
.glow-card,
.panel {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.card::before,
.glow-card::before,
.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-surface);
    opacity: 0.8;
    z-index: 0;
}

.card > *,
.glow-card > *,
.panel > * {
    position: relative;
    z-index: 2;
}

.card h3,
.card h4,
.glow-card h3 {
    margin-bottom: 0.75rem;
}

.feature-grid,
.grid,
.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 28px;
}

.grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat {
    background: rgba(255, 255, 255, 0.02);
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 2.2rem;
    color: var(--color-primary);
}

/* --- Content Layout --- */
.sidebar-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.35fr) 1fr;
    gap: 32px;
}

.sidebar {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.sidebar h3 {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li + li {
    margin-top: 12px;
}

.sidebar a {
    color: var(--color-text);
    padding: 8px 0;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar a.active {
    color: var(--color-primary);
}

.content-shell,
.content-detail {
    background: var(--color-panel);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 40px;
    box-shadow: var(--shadow-soft);
}

.content-detail h1 {
    font-size: 2.4rem;
    margin-bottom: 24px;
}

.content-detail h2 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.content-detail p {
    color: var(--color-muted);
    margin-bottom: 1.25rem;
}

.highlight-box {
    background: rgba(0, 200, 83, 0.08);
    border-left: 4px solid var(--color-primary);
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    margin: 24px 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 32px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-list-item {
    display: flex;
    gap: 22px;
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    transition: transform 0.3s ease, border 0.3s ease;
}

.news-list-item img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.news-list-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 200, 83, 0.5);
}

.news-content h3 {
    margin-bottom: 0.35rem;
}

.news-date {
    color: var(--color-muted);
    font-size: 0.85rem;
}

/* --- Tables & Lists --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
}

table th,
table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table th {
    background: rgba(255, 255, 255, 0.04);
    text-align: left;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

ul.check-list {
    list-style: none;
}

ul.check-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
}

ul.check-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-secondary);
}

/* --- Page Hero (Subpages) --- */
.page-hero {
    padding: 120px 0 80px;
    margin-bottom: 40px;
}

.page-hero .hero-wrap {
    max-width: 820px;
}

.page-hero .hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    color: var(--color-muted);
}

.page-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
}

/* --- Footer --- */
.footer {
    background: #020610;
    padding: 80px 0 40px;
    margin-top: 80px;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer h4 {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer li + li {
    margin-top: 8px;
}

.footer a {
    color: var(--color-text);
}

.footer a:hover {
    color: var(--color-primary);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.bg-panel { background: var(--color-panel); }

@media (max-width: 1024px) {
    .nav-menu {
        gap: 10px;
    }
}

@media (max-width: 860px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    header .container {
        flex-direction: column;
        gap: 8px;
    }

    .header {
        height: auto;
        padding: 12px 0;
    }

    .main-content {
        padding-top: 120px;
    }

    section {
        padding: 70px 0;
    }

    .content-shell,
    .content-detail {
        padding: 28px;
    }

    .news-list-item {
        flex-direction: column;
    }

    .news-list-item img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 540px) {
    .hero-actions {
        flex-direction: column;
    }
}
