/* 头部样式 */
.site-header {
    text-align: center;
    margin-bottom: 15px;  /* 减小标题与导航的间距 */
}

/* 导航样式 */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* 更小的导航与内容之间的间距 */
    flex-wrap: wrap;
}

/* 文章样式 */
.post {
    margin-top: 0;  /* 去除文章内容与导航栏之间的间距 */
    margin-bottom: 40px;
}

.post-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.post-row > .post-image {
    flex: 0 0 40%;
}

.post-row > .post-summary {
    flex: 1;
}

.post-image {
    flex: 0 0 40%;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-summary {
    flex: 1;
}

.post-summary.full-width {
    width: 100%;
}

@media (max-width: 768px) {
    .post-row {
        flex-direction: column;
    }

    .post-image {
        width: 100%;
        margin-bottom: 15px;
    }

    /* 移动端修改上边距 */
    .post {
        margin-top: 0;
    }
}

/* 页脚样式 */
.site-footer {
    text-align: center;
    margin-top: 40px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}

.site-footer a {
    color: #666;
    text-decoration: none;
}

.site-footer a:hover {
    color: #333;
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-input {
        width: 85%;  /* 移动端缩小搜索框宽度 */
        top: 100px;
    }

    .main-nav {
        margin-bottom: 10px;
    }
}
/* 横幅 */
.site-banner {
    width: 100%;
    max-width: 1200px;
    margin: 5px auto;
    text-align: center;   /* 让内部 img 水平居中 */
    overflow: hidden;
    border-radius: 8px;
}

.site-banner img {
    height: auto;
    width: auto;          /* 按 1200:80 比例自动算宽度,不裁切不变形 */
    max-width: 100%;      /* 容器变窄时防止溢出 */
    display: inline-block;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .site-banner {
        margin: 3px auto;
        border-radius: 5px;
    }
    .site-banner img {
        height: clamp(50px, 4vw, 80px);
        width: auto;
        max-width: 100%;
    }
}

/* ================= 广告小图标 ================= */

.ad-icon-grid {

    display:grid;

    grid-template-columns:repeat(8,1fr);

    gap:15px;

    background:#F0FDFA;

    padding:15px;

}



.ad-icon-item {

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:flex-start;

    text-align:center;

    text-decoration:none;

    transition:.2s;

    min-width:0;

}



.ad-icon-item img {

    width:60px;

    height:60px;

    border-radius:12px;

    object-fit:cover;

    display:block;

}



.ad-icon-item span {

    display:block;

    margin-top:5px;

    width:100%;

    color:#000;

    font-size:12px;

    line-height:18px;

    text-align:center;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

}



/* 手机 */

@media(max-width:768px){

    .ad-icon-grid {

        grid-template-columns:repeat(4,1fr);

        gap:12px;

        padding:12px;

    }


    .ad-icon-item img {

        width:50px;

        height:50px;

    }


}