/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 清除浮动 */
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}




/* ========== 头部样式 ========== */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 300;
}

.logo p {
    color: #7f8c8d;
    font-size: 1rem;
}

.logo h1 a{
    color: #2c3e50;
    text-decoration: none;
}





/* 导航栏 */
nav {
    text-align: center;
    margin-top: 20px;
}

nav ul {
    list-style: none;
    display: inline-block;
}

nav ul li {
    float: left;
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #34495e;
    font-size: 1.1rem;
    padding: 5px 10px;
    transition: color 0.3s;
    display: block;
}

nav ul li a:hover, 
nav ul li a.active {
    color: #e74c3c;
}


/* 手机部份 */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 10px;
    position: relative;
    cursor: pointer;
    margin: 5px auto;
}

.mobile-menu-btn span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #666666;
    border-radius: 33px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.1s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) {
    top: 0px;
}

.mobile-menu-btn span:nth-child(2) {
    top: 6px;
}
.mobile-menu-btn span:nth-child(3) {
    top: 12px;
}


@media (max-width: 768px) {
    nav ul {
        display: none; 
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .mobile-menu-toggle:checked ~ ul {
        display: block;
        max-height: 500px;
        padding: 20px 20px 0px 20px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    nav ul li {
        float: none;
        display: block;
        margin: 0;
        text-align: center;
    }
    
    nav ul li a {
        padding: 6px 15px;
        display: block;
        border-bottom: 1px solid #eee;
        font-size: 20px;
    }
    

    .mobile-menu-toggle:checked + .mobile-menu-btn span:nth-child(1) {
        top: 10px;
        transform: rotate(45deg);
    }
    
    .mobile-menu-toggle:checked + .mobile-menu-btn span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle:checked + .mobile-menu-btn span:nth-child(3) {
        top: 10px;
        transform: rotate(-45deg);
    }
}




/* ========== 主要内容区 ========== */
.main-content {
    margin-bottom: 30px;
    overflow: hidden;
}

/* ========== 广告位 ========== */
.ad-banner {
    background-color: #ecf0f1;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 4px;
}

.ad-banner p {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.ad-placeholder {
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    padding: 15px 0;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #e74c3c;
}

/* ========== 首页和列表页国旗展示区 ========== */
.flags-section {
    float: left;
    width: 70%;
    margin-right: 5%;
}

.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 300;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.section-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: #e74c3c;
}



/* 筛选栏 */
.filter-bar {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    margin-right: 10px;
    color: #7f8c8d;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    min-width: 150px;
}





                    .alphabet-container {
                        margin-bottom: 30px;
                    }
                    
                    .alphabet-title {
                        text-align: center;
                        font-size: 1.4rem;
                        color: #34495e;
                        margin-bottom: 10px;
                        font-weight: bold;
                    }
                    
                    .alphabet-nav {
                        display: flex;
                        flex-wrap: wrap;
                        justify-content: center;
                        gap: 5px;
                        background-color: #fff;
                        padding: 10px;
                        border-radius: 4px;
                        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
                    }
                    
                    .alphabet-link {
                        display: block;
                        width: 30px;
                        height: 30px;
                        line-height: 30px;
                        text-align: center;
                        font-size: 1.2rem;
                        color: #34495e;
                        text-decoration: none;
                        border-radius: 4px;
                        transition: all 0.3s;
                    }
                    
                    .alphabet-link:hover,
                    .alphabet-link.active {
                        background-color: #e74c3c;
                        color: white;
                    }
                 
                    @media (max-width: 992px) {
                        .country-list-columns {
                            column-count: 3;
                        }
                    }
                    
                    @media (max-width: 768px) {           
                        .alphabet-link {
                            width: 35px;
                            height: 35px;
                            line-height: 35px;
                            font-size: 1.1rem;
                        }
                    }
                    
                    @media (max-width: 480px) {
                        .alphabet-link {
                            width: 30px;
                            height: 30px;
                            line-height: 30px;
                            font-size: 1.2rem;
                        }
                    }











/* 国旗容器 */
.flags-container-compat {
    margin-right: -20px;
    font-size: 0;
    overflow: hidden;
}
.flags-container-compat a{
    color: #333333;;
}
.flag-item {
    width: 20%;
    padding-right: 20px;
    margin-bottom: 20px;
    display: inline-block;
    vertical-align: top;
    font-size: 14px;
    box-sizing: border-box;
}

.flag-item-inner {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.flag-item:hover .flag-item-inner {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.flag-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.flag-img img {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid #eee;
}

.flag-name {
    padding: 10px;
    background-color: #f5f5f5;
    font-size: 0.9rem;
}

/* 国旗区块容器 */
.flags-block {
    margin-bottom: 20px;
    overflow: hidden;
}

/* ========== 内容页特有样式 ========== */
.country-header {
    background-color: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.country-flag-large {
    width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 40px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    padding: 20px;
}

.country-flag-large img {
    max-width: 100%;
    max-height: 100%;
}

.country-info {
    flex: 1;
    min-width: 300px;
}

.country-name {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 300;
}

.country-name-local {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-style: italic;
}

.country-meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.meta-item {
    margin-right: 30px;
    margin-bottom: 10px;
}

.meta-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.meta-value {
    font-size: 1.1rem;
    color: #2c3e50;
}

/* 内容区块 */
.content-section {
    background-color: #fff;
    padding: 30px 30px 15px 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.content-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 300;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.content-text {
    line-height: 1.8;

}

.content-text p {
    margin-bottom: 15px;
}

/* 内容页图片自适应样式 */
.content-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border: 1px solid #eee;
    box-sizing: border-box;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content-text img {
        margin: 10px auto;
    }
}

/* 相关国家 */
.related-countries {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.related-country {
    width: 20%;
    padding: 0 10px;
    margin-bottom: 20px;
}
.related-country a{
    color: #333333;
    text-decoration: none;
}



/* ========== 侧边栏 ========== */
.sidebar {
    float: left;
    width: 25%;
}

.sidebar-widget {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 300;
}

.continent-list,
.country-list {
    list-style: none;
}

.continent-list li,
.country-list li {
    margin-bottom: 10px;
}

.continent-list a,
.country-list a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
}

.continent-list a:hover,
.country-list a:hover,
.continent-list a.active {
    color: #e74c3c;
}

.country-list strong {
    color: #2c3e50;
}

.download-box {
    background-color: #e74c3c;
    color: white;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 30px;
}

.download-box h3 {
    margin-bottom: 15px;
    font-weight: 300;
}

.download-btn {
    display: inline-block;
    background-color: #fff;
    color: #e74c3c;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.download-btn:hover {
    background-color: #c0392b;
    color: white;
}












/* ========== 下载按钮样式 ========== */
.download-container {
    text-align: center;
    margin: 20px 0px 0px 0px;
}

.zip-download-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 55px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.zip-download-btn:hover {
    background-color: #e74c3c;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .zip-download-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
}


/* ========== 友情链接样式 ========== */
.friend-links {
    padding: 15px 0;
    margin-top: 20px;
}

.friend-links .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.friend-links-label {
    margin-right: 10px;
    color: #7f8c8d;
}

.friend-links a {
    color: #888888;
    text-decoration: none;
    margin-right: 15px;
    white-space: nowrap;
    font-size: 0.8rem;
}

.friend-links a:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .friend-links {
        padding: 10px 0;
    }
    
    .friend-links a {
        margin-right: 10px;
        margin-bottom: 5px;
    }
}












/* ========== 页脚 ========== */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    text-align: center;
    margin-top: 20px;
    clear: both;
}

.footer-links {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-links a {
    color: #bdc3c7;
    margin: 0 15px;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: #e74c3c;
}

.copyright {
    font-size: 0.9rem;
    color: #7f8c8d;
}
.copyright a{
    font-size: 0.9rem;
    color: #7f8c8d;
    text-decoration: none;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .flag-item,
    .related-country {
        width: 25%; /* 中等屏幕每行显示4个 */
    }
    
    .country-flag-large {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        height: auto;
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    .flags-section, .sidebar {
        float: none;
        width: 100%;
        margin-right: 0;
    }
    
    .flag-item,
    .related-country {
        width: 33.333%; /* 小屏幕每行显示3个 */
    }
    
    nav ul li {
        float: none;
        display: inline-block;
        margin: 5px 10px;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex-grow: 1;
    }
    
    .country-info {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .flag-item,
    .related-country {
        width: 50%; /* 超小屏幕每行显示2个 */
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    nav ul {
        display: block;
    }
    
    nav ul li {
        display: block;
        margin: 10px 0;
    }
    
    .pagination a, 
    .pagination span {
        padding: 6px 8px;
        margin: 0 2px;
    }
    
    .country-header {
        padding: 20px;
    }
    
    .country-name {
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .flag-item,
    .related-country {
        width: 100%; /* 极小屏幕每行显示1个 */
    }
    
    .pagination a, 
    .pagination span {
        padding: 5px;
        font-size: 0.9rem;
    }
}







/* ========== 兼容性最好的3列文章列表样式 ========== */

.article-columns-container {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.article-column {
    width: 49%;
    float: left;
    margin-right: 2%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.article-column:last-child {
    margin-right: 0;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
    position: relative;
    line-height: 1.5;   
    
}
.article-list li:before {
    content: "\2022";
    color: #e74c3c;
    position: absolute;
    left: 0;
    font-size: 1em;
}
.article-list li:last-child {
    border-bottom: none;
}

.bullet {
    color: #e74c3c;
    margin-right: 8px;
    font-weight: bold;
}

.article-list a {
    color: #34495e;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    font-size: 0.95rem;
    margin-left: 15px;
}

.article-list a:hover {
    color: #e74c3c;
}

/* 响应式调整 - 保证兼容性 */
@media screen and (max-width: 992px) {
    .article-column {
        width: 48%;
        margin-right: 4%;
    }
    
    .article-column:nth-child(2n) {
        margin-right: 0;
    }
    
    .article-column:last-child {
        width: 100%;
        margin-right: 0;
        margin-top: 20px;
    }
}

@media screen and (max-width: 576px) {
    .article-column,
    .article-column:nth-child(2n),
    .article-column:last-child {
        width: 100%;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

/* IE9及以下浏览器的特殊样式 */
.lt-ie10 .article-columns-container {
    width: 100%;
}

.lt-ie10 .article-column {
    width: 31.33%;
    margin-right: 3%;
}

.lt-ie10 .article-column:last-child {
    margin-right: 0;
}



/* 分页容器样式 */
.page {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
}


.page li {
    margin: 0 5px;
    line-height: 1;
}


.page li a,
.page li.thisclass { 
    display: inline-block;
    padding: 12px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 36px; 
    text-align: center;
    box-sizing: border-box;
}


.page li a {
    color: #3498db;
    background-color: #fff;
    border-color: #ddd;
}


.page li.thisclass {
    color: white;
    background-color: #e74c3c;
    border-color: #e74c3c;
    font-weight: bold;
}


.page li a:hover {
    background-color: #f5f5f5;
    color: #e74c3c;
    border-color: #e74c3c;
}

.page li a[href=""], 
.page li a[href*='list_'] { 
    min-width: auto; 
    padding: 12px 12px;
}

@media (max-width: 480px) {
    .page li {
        margin: 0 3px;
    }
    
    .page li a,
    .page li.thisclass {
        padding: 10px 10px;
        font-size: 1rem;
        min-width: 30px;
    }
    
    .page li a[href=""],
    .page li a[href*='list_'] {
        padding: 12px 10px;
    }
}




    /* 文章列表页特有样式 */
    .list-article {
        list-style: none;
        background-color: #fff;
        border-radius: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding: 15px;
    }
    

    .article-item {
        padding: 10px 10px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background-color 0.3s;
    }

    .article-item:last-child {
        border-bottom: none;
    }
    
    .article-item:hover {
        background-color: #f9f9f9;
    }
    
    .article-title {
        font-size: 1.1rem;
        color: #2c3e50;
        font-weight: 400;
        flex: 1;
    }
    
    .article-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.3s;
    }
    
    .article-title a:hover {
        color: #e74c3c;
    }
    
    .article-date {
        color: #7f8c8d;
        font-size: 0.8rem;
        margin-right: 20px;
        white-space: nowrap;
    }
    
    /* 响应式调整 */
    @media (max-width: 768px) {
        .article-item {
            padding: 20px;
            flex-direction: column;
            align-items: flex-start;
        }
        
        .article-title {
            font-size: 1.3rem;
            margin-bottom: 8px;
        }
        
        .article-date {
            margin-left: 0;
            align-self: flex-end;
        }
    }
    
    @media (max-width: 480px) {
        .article-item {
            padding: 16px;
        }
        
        .article-title {
            font-size: 1.2rem;
        }
        .flag-item {
            width: 50%; /* 超小屏幕每行显示2个 */
        }
       .content-text p{
           font-size: 1.2rem;
        }
        
        .logo h1 {
            font-size: 2rem;
        }
        .article-list a{
             font-size: 1.1rem;
            
        }
        
        nav ul {
            display: block;
        }
        
        nav ul li {
            display: block;
            margin: 10px 0;
        }

        
        .related-country {
            width: 50%;
        }
    }