/* style.css */
:root {
    --primary-color: #1a3d1a;
    --secondary-color: #2c5c2c;
    --accent-color: #d4af37;
    --light-bg: #f8f9fa;
    --dark-bg: #0d260d;
    --text-dark: #333;
    --text-light: #fff;
    --text-gray: #666;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 0 10%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

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

.logo img {
    height: 50px;
    margin-right: 15px;
}

.logo-text {
    color: var(--text-light);
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 英雄区域 */
.hero {
    height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('<?php $this->options->themeUrl('img/hero-bg.jpg'); ?>') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: var(--text-light);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background-color: #e6c04d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 栏目介绍 */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 10%;
    margin-bottom: 60px;
    gap: 30px;
}

.feature-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    width: 280px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.feature-content {
    padding: 25px;
}

.feature-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.feature-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.feature-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* 新闻和资源 */
.news-resources {
    background-color: #e9f0e9;
    padding: 60px 10%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.news, .resources {
    flex: 1;
    min-width: 300px;
    margin: 0 15px 40px;
}

.news h3, .resources h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-header {
    display: flex;
    align-items: center;
}

.refresh-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    margin-left: 10px;
    transition: transform 0.3s;
}

.refresh-btn:hover {
    transform: rotate(90deg);
}

.news-item, .resource-item {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.news-item:hover, .resource-item:hover {
    transform: translateX(5px);
}

.news-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.news-date i {
    margin-right: 5px;
}

/* 新闻加载和错误状态样式 */
.news-loader {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
}

.news-loader i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.news-error {
    background: #fff1f1;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #dc3545;
}

.news-error i {
    margin-right: 10px;
}

.news-notice {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.news-notice i {
    margin-right: 5px;
    color: var(--accent-color);
}

.news-notice a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.news-notice a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 刷新按钮动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: rotate 1s linear;
}

#refreshNews {
    cursor: pointer;
    transition: var(--transition);
}

#refreshNews:hover {
    color: var(--accent-color);
}

.resource-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.resource-item:hover {
    transform: translateX(5px);
    background-color: #f8f9fa;
}

.resource-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.resource-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.resource-icon {
    font-size: 24px;
    color: var(--accent-color);
    margin-right: 15px;
    transition: var(--transition);
}

.resource-item:hover .resource-icon {
    transform: scale(1.1);
}

/* 页脚 */
.footer {
    background: linear-gradient(to right, var(--dark-bg), var(--primary-color));
    color: var(--text-light);
    padding: 60px 10% 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.contact-info {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.contact-info i {
    color: var(--accent-color);
    margin-right: 10px;
    width: 20px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* 文章样式 */
.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.post-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    color: #777;
    font-size: 0.95rem;
}

.post-meta span {
    margin: 0 15px;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body h2, .post-body h3 {
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}