﻿/* common.css - 公共样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    /*    --primary: #1a3a6c;
    --primary-dark: #0d2440;
    --primary-light: #2a5caa;
    --accent: #ff6b00;
    --light: #f5f8fc;
    --gray: #e1e8f0;
    --text: #333;
    --text-light: #666;*/
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --accent: #ff9800;
    --light: #f5f8fc;
    --gray: #e1e8f0;
    --text: #333;
    --text-light: #666;
}

body {
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}


.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

    .section-title h2 {
        color: var(--primary);
        font-size: 24px;
        position: relative;
        display: inline-block;
    }

        .section-title h2::after {
            content: '';
            position: absolute;
            bottom: -12px;
            left: 0;
            width: 50px;
            height: 3px;
            background: var(--accent);
        }

    .section-title .more {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s;
    }

        .section-title .more:hover {
            color: var(--accent);
        }

.more i {
    margin-left: 5px;
    font-size: 14px;
}
.breadcrumb {
    padding: 15px 0;
    color: var(--text-light);
    font-size: 14px;
}

    .breadcrumb a {
        color: var(--text-light);
        text-decoration: none;
        transition: all 0.3s;
    }

        .breadcrumb a:hover {
            color: var(--primary);
        }

    .breadcrumb span {
        color: var(--text);
    }
/* 头部导航 */
header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    
    border-bottom-right-radius: 10px;
    
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

    .logo i {
        margin-right: 10px;
        color: var(--accent);
    }

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

    .search-bar input {
        width: 100%;
        padding: 12px 20px;
        border-radius: 30px;
        border: none;
        background: rgba(255, 255, 255, 0.15);
        color: white;
        font-size: 16px;
        transition: all 0.3s;
    }

        .search-bar input:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
        }

        .search-bar input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

    .search-bar button {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: white;
        cursor: pointer;
        font-size: 18px;
    }

nav ul {
    display: flex;
    list-style: none;
    margin-top: 15px;
    flex-wrap: wrap;
}

    nav ul li {
        margin: 0 10px;
    }

        nav ul li a {
            color: rgba(255, 255, 255, 0.85);
            text-decoration: none;
            font-weight: 500;
            padding: 8px 15px;
            border-radius: 20px;
            transition: all 0.3s;
        }

            nav ul li a:hover,
            nav ul li a.active {
                background: rgba(255, 255, 255, 0.15);
                color: white;
            }

/* 页脚 */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 40px 5% 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

    .footer-column h3::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 40px;
        height: 2px;
        background: var(--accent);
    }

.footer-column ul {
    list-style: none;
}

    .footer-column ul li {
        margin-bottom: 10px;
    }

        .footer-column ul li a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            transition: all 0.3s;
        }

            .footer-column ul li a:hover {
                color: white;
                padding-left: 5px;
            }

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        margin-bottom: 15px;
        justify-content: center;
    }

    .search-bar {
        max-width: 100%;
        margin: 10px 0 15px;
    }

    nav ul {
        justify-content: center;
    }

    .headline-container {
        flex-direction: column;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 20px;
    }

    .tab {
        padding: 12px 20px;
        font-size: 14px;
    }

    .ad-banner h2 {
        font-size: 24px;
    }

    .carousel-caption h3 {
        font-size: 20px;
    }

    .carousel-caption p {
        font-size: 14px;
    }

    .category-column {
        flex: 0 0 100%;
    }
}

@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .tab-news {
        grid-template-columns: 1fr;
    }

    .tabs-header {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 0 auto;
        text-align: center;
    }

    nav ul li {
        margin: 5px;
    }

        nav ul li a {
            font-size: 14px;
            padding: 6px 12px;
        }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .headline-carousel {
        height: 300px;
    }
}



.title {
    flex: 1;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.3s;
}
    .title:hover {
        color: var(--accent);
    }