:root {
    --primary-color: #1E40AF;
    --primary-light: #3B82F6;
    --secondary-color: #0EA5E9;
    --accent-color: #10B981;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --gray-color: #6B7280;
    --white: #FFFFFF;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    width: 100%;
}

.nav-item-has-dropdown {
    position: relative;
}

.nav-item-has-dropdown > .nav-link-dropdown::after {
    display: none;
}

.nav-link-dropdown {
    cursor: pointer;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 320px;
    max-width: min(720px, 90vw);
    padding-top: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1001;
}

.nav-item-has-dropdown:hover > .nav-dropdown,
.nav-item-has-dropdown.is-open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 20px;
}

.nav-dropdown-col {
    min-width: 140px;
    flex: 1 1 140px;
}

.nav-dropdown-title {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

a.nav-dropdown-title:hover {
    color: var(--primary-color);
}

.nav-dropdown-articles {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-dropdown-articles li {
    margin-bottom: 6px;
}

.nav-dropdown-articles a {
    display: block;
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.nav-dropdown-articles a:hover {
    color: var(--primary-color);
}

.nav-dropdown-articles .nav-dropdown-text {
    display: block;
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: default;
}

.nav-dropdown-empty {
    color: var(--gray-color);
    font-size: 0.85rem;
    margin: 0;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--dark-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    background-size: 60px 60px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.cta-primary {
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Features Section */
.features {
    padding: 100px 20px;
    background: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--dark-color);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--white);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-desc {
    color: var(--gray-color);
    line-height: 1.8;
}

/* Stats Section */
.stats {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    color: var(--white);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    -webkit-text-fill-color: var(--white);
    margin-bottom: 20px;
    display: block;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-title a {
    color: inherit;
    transition: opacity 0.2s ease;
}

.footer-title a:hover {
    opacity: 0.85;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

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

.footer-links span {
    color: rgba(255, 255, 255, 0.55);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portal article pages */
.portal-article-header {
    margin-top: 70px;
    padding: 80px 20px;
    background: linear-gradient(135deg, #1E40AF 0%, #0EA5E9 100%);
    text-align: center;
    color: var(--white);
}

.portal-article-header .page-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.portal-article-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

.portal-article-content {
    line-height: 1.8;
    color: var(--dark-color);
    font-size: 1.05rem;
}

.portal-article-content img {
    max-width: 100%;
    height: auto;
}

.portal-article-actions {
    margin-top: 40px;
    display: flex;
    gap: 16px;
}

.portal-article-actions .cta-primary,
.portal-article-actions .cta-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 500;
}

.portal-article-actions .cta-secondary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.portal-article-list-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

.portal-article-layout {
    max-width: 1100px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.portal-article-sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 16px 0;
}

.portal-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--dark-color);
}

.portal-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-sidebar-list li {
    margin-bottom: 10px;
}

.portal-sidebar-list a,
.portal-sidebar-list span {
    color: var(--gray-color);
    font-size: 0.95rem;
}

.portal-sidebar-list a:hover {
    color: var(--primary-color);
}

.portal-sidebar-list li.is-active a,
.portal-sidebar-list li.is-active span {
    color: var(--primary-color);
    font-weight: 600;
}

.portal-article-main {
    flex: 1;
    min-width: 0;
}

.portal-article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-article-list li {
    border-bottom: 1px solid #E5E7EB;
}

.portal-article-list a,
.portal-article-item-static {
    display: block;
    padding: 20px 0;
    transition: color 0.2s ease;
}

.portal-article-list h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.portal-article-list p {
    color: var(--gray-color);
    margin-bottom: 8px;
}

.portal-article-list span {
    font-size: 0.85rem;
    color: #9CA3AF;
}

.portal-article-list a:hover h3 {
    color: var(--primary-color);
}

.portal-article-empty {
    text-align: center;
    color: var(--gray-color);
    padding: 40px 0;
}

@media (max-width: 768px) {
    .portal-article-layout {
        flex-direction: column;
        gap: 24px;
    }

    .portal-article-sidebar {
        width: 100%;
        border-bottom: 1px solid #E5E7EB;
        padding-bottom: 20px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
        padding: 12px 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #F3F4F6;
    }

    .nav-menu > li > .nav-link {
        display: block;
        padding: 14px 20px;
    }

    .nav-item-has-dropdown > .nav-dropdown {
        position: static;
        transform: none;
        padding: 0 20px 12px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
        min-width: 0;
        max-width: none;
    }

    .nav-item-has-dropdown.is-open > .nav-dropdown {
        display: block;
    }

    .nav-dropdown-inner {
        box-shadow: none;
        border: none;
        padding: 0;
        flex-direction: column;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-btn.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .portal-article-header .page-title {
        font-size: 1.6rem;
    }
}
