/*
 Theme Name: 石城岛旅游
 Description: 清新青苹果绿风格 石城岛旅游资讯响应式主题
 Version: 1.0
 Text Domain: shichengdao-tour
*/

:root {
    --apple-green: #7ED957;
    --light-green: #F2FBEF;
    --dark-green: #2D5A27;
    --main-red: #E53E3E;
    --gray-light: #F7FAFC;
    --gray: #E2E8F0;
    --gray-dark: #4A5568;
    --white: #ffffff;
    --shadow-base: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 14px 35px rgba(126, 217, 87, 0.15);
    --radius: 24px;
    --tag-radius: 999px;
    --transition-base: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "SimHei", sans-serif;
    background-color: var(--light-green);
    color: var(--gray-dark);
    line-height: 1.7;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul, li {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 94%;
    max-width: 1280px;
    margin: 0 auto;
}

.section {
    padding: 60px 0;
}

/* 通用区块标题 保留原有动效 */
.section-title {
    text-align: left;
    font-size: 28px;
    color: var(--dark-green);
    margin-bottom: 35px;
    line-height: 1.3;
    font-weight: 700;
    padding-left: 20px;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    animation: titleFadeIn 0.8s ease forwards;
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 20px;
    background-color: var(--apple-green);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.section-title:hover {
    color: var(--apple-green);
    transform: translateX(4px);
}
.section-title:hover::before {
    height: 24px;
}

@keyframes titleFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 渔家乐自定义标题 */
.youyu-main-title {
    text-align: left;
    padding-left: 20px;
    position: relative;
    line-height: 1.3;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    animation: titleFadeIn 0.8s ease forwards;
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: default;
}
.youyu-main-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 20px;
    background-color: var(--apple-green);
    border-radius: 2px;
    transition: height 0.3s ease;
}
.youyu-main-title:hover {
    color: var(--apple-green);
    transform: translateX(4px);
}
.youyu-main-title:hover::before {
    height: 24px;
}

/* 通用按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--apple-green);
    color: #fff;
    border-radius: 30px;
    box-shadow: var(--shadow-base);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ========== 庄河新闻 完整规范样式（修复hover核心问题） ========== */
.zhuanghe-news-section {
    background: #ffffff;
    padding: 60px 0;
}
.zhuanghe-news-top {
    margin-bottom: 50px;
}
.zhuanghe-top-card {
    background: linear-gradient(135deg, #fff 60%, var(--light-green));
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray);
}
.zhuanghe-top-card::before {
    content: '头条';
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--main-red);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 6px 18px;
    border-radius: 6px;
}
.zhuanghe-top-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(126, 217, 87, 0.18);
}
.zhuanghe-top-title {
    font-size: 36px;
    color: var(--main-red);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}
.zhuanghe-top-title a:hover {
    color: var(--apple-green);
}
.zhuanghe-top-excerpt {
    font-size: 16px;
    color: var(--gray-dark);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

.zhuanghe-news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.zhuanghe-news-item {
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}
.zhuanghe-news-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--apple-green);
    transform: scaleX(0);
    transition: transform var(--transition-base);
    z-index: 1;
}
.zhuanghe-news-item > a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 24px 20px;
    background: var(--light-green);
    transition: var(--transition-base);
}
.zhuanghe-news-item:hover::after {
    transform: scaleX(1);
}
.zhuanghe-news-item:hover > a {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.zhuanghe-news-title {
    font-size: 17px;
    color: var(--gray-dark);
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-base);
}
.zhuanghe-news-item:hover .zhuanghe-news-title {
    color: var(--apple-green);
}

/* ========== 文章详情页 single.php ========== */
.single-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.single-title {
    font-size: 32px;
    color: var(--dark-green);
    text-align: center;
    line-height: 1.4;
    margin-bottom: 16px;
    font-weight: 700;
}

.single-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 35px;
}
.single-meta a {
    color: var(--apple-green);
    padding: 4px 12px;
    background: var(--light-green);
    border-radius: 20px;
    transition: var(--transition-base);
    text-decoration: none;
}
.single-meta a:hover {
    background: var(--apple-green);
    color: var(--white);
}

.single-content {
    font-size: 17px;
    line-height: 2;
    color: var(--gray-dark);
    padding: 0 10px;
}
.single-content p {
    margin-bottom: 22px;
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 15px auto;
    display: block;
    box-shadow: var(--shadow-base);
}

.page-links {
    margin: 30px 0;
    text-align: center;
}
.page-links a {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 4px;
    border: 1px solid var(--apple-green);
    border-radius: 4px;
    color: var(--apple-green);
    transition: var(--transition-base);
    text-decoration: none;
}
.page-links a:hover {
    background: var(--apple-green);
    color: var(--white);
}

.single-tag-group {
    margin: 40px 0 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--gray);
    text-align: center;
}
.tag-link {
    display: inline-block;
    font-size: 14px;
    color: var(--gray-dark);
    margin: 0 8px 10px;
    transition: var(--transition-base);
    text-decoration: none;
}
.tag-link:hover {
    color: var(--apple-green);
}

/* ========== 栏目页 archive.php 双栏清新布局 ========== */
.archive-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
.archive-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(126, 217, 87, 0.12);
    transition: var(--transition-base);
    position: relative;
}
.archive-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.archive-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 26px;
    width: 4px;
    height: 36px;
    background: var(--apple-green);
    border-radius: 2px;
}
.archive-item h3 {
    font-size: 18px;
    color: var(--dark-green);
    margin-left: 12px;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: var(--transition-base);
}
.archive-item:hover h3 {
    color: var(--apple-green);
}
.archive-item .excerpt {
    font-size: 15px;
    color: var(--gray-dark);
    line-height: 1.7;
    margin-left: 12px;
    opacity: 0.92;
}

/* 空内容提示 */
.empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: var(--gray);
    font-size: 15px;
}

/* 分页 */
.posts-navigation {
    grid-column: 1 / -1;
    margin-top: 35px;
    text-align: center;
}
.posts-navigation a {
    display: inline-block;
    padding: 8px 22px;
    margin: 0 6px;
    border: 1px solid var(--apple-green);
    border-radius: 30px;
    color: var(--apple-green);
    font-size: 15px;
    transition: var(--transition-base);
    text-decoration: none;
}
.posts-navigation a:hover {
    background: var(--apple-green);
    color: #fff;
}

/* ========== 【深度美化】搜索结果页 search.php 专属样式 ========== */
.search-page {
    padding: 60px 0;
    background-color: var(--light-green);
}

/* 搜索头部标题区域 + 渐入动画 */
.search-head {
    margin-bottom: 40px;
    padding-left: 20px;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    animation: titleFadeIn 0.8s ease forwards;
}
.search-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 20px;
    background-color: var(--apple-green);
    border-radius: 2px;
}
.search-head h1 {
    font-size: 28px;
    color: var(--dark-green);
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}
.search-head p {
    color: var(--gray-dark);
    margin-top: 10px;
    font-size: 15px;
    opacity: 0.85;
}

/* 搜索列表 双栏布局 */
.search-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* 搜索卡片 深度美化：渐变边框+悬浮动效+层次加强 */
.search-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(126, 217, 87, 0.15);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}
/* 左侧绿色装饰竖线 */
.search-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 28px;
    width: 4px;
    height: 38px;
    background: var(--apple-green);
    border-radius: 2px;
    transition: var(--transition-base);
}
/* 卡片hover上浮+阴影放大 */
.search-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-hover);
    border-color: rgba(126, 217, 87, 0.3);
}
.search-item:hover::before {
    height: 44px;
}

/* 标题样式优化 */
.search-item h2 {
    font-size: 19px;
    margin: 0 0 12px 12px;
    line-height: 1.45;
    font-weight: 600;
}
.search-item h2 a {
    color: var(--dark-green);
    transition: var(--transition-base);
    text-decoration: none;
}
.search-item:hover h2 a {
    color: var(--apple-green);
}

/* 搜索卡片 - 分类标签样式 */
.search-cat-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 12px;
    margin: 0 0 10px 12px;
    background-color: var(--apple-green);
    color: var(--white);
    border-radius: 999px;
    text-decoration: none;
    transition: var(--transition-base);
}
.search-cat-tag:hover {
    background-color: var(--dark-green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(126, 217, 87, 0.25);
}

/* ========== 【高颜值标签组 终极美化】 ========== */
.post-tags {
    margin: 12px 0 16px 12px;
}
.post-tags a {
    display: inline-block;
    font-size: 12px;
    padding: 4px 14px;
    margin: 0 8px 8px 0;
    background: linear-gradient(120deg, rgba(126, 217, 87, 0.18), rgba(126, 217, 87, 0.05));
    color: var(--apple-green);
    border: 1px solid rgba(126, 217, 87, 0.25);
    border-radius: var(--tag-radius);
    text-decoration: none;
    transition: var(--transition-base);
    white-space: nowrap;
}
.post-tags a:hover {
    background: var(--apple-green);
    color: var(--white);
    border-color: var(--apple-green);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(126, 217, 87, 0.25);
}

/* 摘要文本优化 */
.search-item .excerpt {
    font-size: 15px;
    color: var(--gray-dark);
    line-height: 1.8;
    margin-left: 12px;
    opacity: 0.9;
}

/* 无搜索结果页面美化 */
.search-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    font-size: 16px;
    color: var(--gray-dark);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-base);
    margin-top: 20px;
}
.search-empty p {
    margin-bottom: 24px;
    font-size: 17px;
}
.search-empty a {
    display: inline-block;
    padding: 10px 28px;
    background: var(--apple-green);
    color: var(--white);
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: 0 4px 12px rgba(126, 217, 87, 0.2);
}
.search-empty a:hover {
    background: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* 搜索分页 圆角胶囊样式 统一风格 */
.pagination {
    grid-column: 1 / -1;
    margin-top: 45px;
    text-align: center;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 9px 24px;
    margin: 0 8px;
    border: 1px solid var(--apple-green);
    color: var(--apple-green);
    font-size: 15px;
    transition: var(--transition-base);
    min-width: 80px;
    text-decoration: none;
}
.pagination .current {
    background: var(--apple-green);
    color: var(--white);
    border-color: var(--apple-green);
}
.pagination a:hover {
    background: var(--apple-green);
    color: var(--white);
    transform: translateY(-2px);
}

/* ========== 响应式全局适配（非首页区块） ========== */
@media (max-width: 768px) {
    .archive-list,
    .search-list {
        grid-template-columns: 1fr;
    }
    .pagination a,
    .pagination span {
        margin: 0 4px 8px;
        padding: 8px 18px;
    }
    .zhuanghe-news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .section {
        padding: 45px 0;
    }
    .search-page {
        padding: 45px 0;
    }
    .section-title {
        font-size: 24px;
    }
    .single-title {
        font-size: 24px;
    }
    .single-content {
        font-size: 16px;
    }
    .single-meta {
        flex-direction: column;
        gap: 8px;
    }
    .archive-item,
    .search-item {
        padding: 22px;
    }
    .archive-item::before,
    .search-item::before {
        top: 22px;
    }
    .search-head h1 {
        font-size: 24px;
    }
    .zhuanghe-news-list {
        grid-template-columns: 1fr;
    }
    .zhuanghe-top-title {
        font-size: 22px;
    }
    .zhuanghe-top-card {
        padding: 25px 15px;
    }
}