/**
 * Homepage Cards Styles - 圆角和阴影效果
 * 首页卡片样式 - 添加圆角和阴影
 */

/* 首页所有文章卡片 */
.home article,
.home .post,
.home .hentry,
.home .entry-post,
.home .post-wrapper,
.home .cm-post,
.home .cm-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停效果 */
.home article:hover,
.home .post:hover,
.home .hentry:hover,
.home .entry-post:hover,
.home .post-wrapper:hover,
.home .cm-post:hover,
.home .cm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 文章特色图片容器 */
.home .post-thumbnail,
.home .featured-image,
.home .entry-thumbnail,
.home .cm-post-thumb,
.home .cm-featured-image,
.home figure.post-thumbnail {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

/* 如果图片是独立的卡片 */
.home .post-thumbnail img,
.home .featured-image img,
.home .entry-thumbnail img,
.home .cm-post-thumb img {
    border-radius: inherit;
}

/* Banner区域的卡片 */
.home .cm-home-slider .post,
.home .cm-banner-section .post,
.home .cm-featured-posts .post {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 小卡片网格 */
.home .cm-posts-grid .post,
.home .cm-post-grid .post,
.home .posts-grid article {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.home .cm-posts-grid .post:hover,
.home .cm-post-grid .post:hover,
.home .posts-grid article:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* 侧边栏小工具 */
.home .widget,
.home .cm-widget {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 列表布局的文章 */
.home .cm-post-list article,
.home .post-list-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* 大型Banner卡片 */
.home .cm-large-post,
.home .cm-banner-post {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.home .cm-large-post:hover,
.home .cm-banner-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* 确保内部图片不溢出圆角 */
.home article img,
.home .post img,
.home .cm-post img,
.home .cm-card img {
    border-radius: inherit;
}

/* 特定主题区域 - 根据cream-magazine主题结构 */
.home .cm_home_post,
.home .cm-entry-post {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home .cm_home_post:hover,
.home .cm-entry-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 主题特定的缩略图类 */
.home .cm-post-thumb a {
    display: block;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .home article,
    .home .post,
    .home .cm-post,
    .home .cm-card {
        border-radius: 8px;
    }

    .home .cm-large-post,
    .home .cm-banner-post {
        border-radius: 10px;
    }

    .home .post-thumbnail,
    .home .featured-image,
    .home .cm-post-thumb {
        border-radius: 8px 8px 0 0;
    }
}

/* 平滑过渡动画 */
.home article,
.home .post,
.home .cm-post,
.home .cm-card,
.home .widget {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 更深的阴影变体（可选） */
.home .shadow-deep {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.home .shadow-deep:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* ========== 针对特定区域的圆角和阴影 ========== */

/* 1. 滑块/轮播区域 */
.home .swiper-slide,
.home .slider-item,
.home .slide,
.home .carousel-item,
.home .slick-slide > *,
.home [class*="slider"] > *,
.home [class*="carousel"] > *,
.home [class*="swiper"] > * {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 2. 各种新闻区域的卡片 */
.home section article,
.home section .post,
.home .section article,
.home .section .post,
.home [class*="section"] article,
.home [class*="section"] .post,
.home [class*="news"] article,
.home [class*="news"] .post {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 3. 商业新闻、农业新闻等分类区域 */
.home .cm-posts,
.home .cm-post-wrapper,
.home .posts-wrapper,
.home .entry-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 4. 所有section内的直接子div（通常是卡片容器） */
.home section > div > article,
.home section > div > .post,
.home section > div > div > article,
.home section > div > div > .post {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 5. 响应式网格中的所有项目 */
.home .col article,
.home .col .post,
.home .col > div,
.home [class*="col-"] article,
.home [class*="col-"] .post,
.home [class*="col-"] > div {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 6. 列表样式的新闻项 */
.home .post-list,
.home .news-list,
.home .article-list,
.home ul.posts,
.home ul[class*="post"],
.home ul[class*="news"] {
    list-style: none;
}

.home .post-list > li,
.home .news-list > li,
.home .article-list > li,
.home ul.posts > li,
.home ul[class*="post"] > li,
.home ul[class*="news"] > li {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 15px;
}

/* 7. Flex布局的卡片 */
.home .flex > *,
.home .d-flex > *,
.home [class*="flex"] > article,
.home [class*="flex"] > .post,
.home [class*="flex"] > div {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 8. 所有a标签包裹的卡片 */
.home a > article,
.home a > .post,
.home a > figure,
.home a > div[class*="post"],
.home a > div[class*="card"] {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 9. 特别针对figure元素 */
.home figure,
.home figure.post-thumbnail,
.home .wp-block-image figure {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
}

/* 10. 任何带有背景图的div */
.home div[style*="background-image"] {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 悬停效果 - 所有新增区域 */
.home section article:hover,
.home section .post:hover,
.home .col article:hover,
.home .col .post:hover,
.home figure:hover,
.home .swiper-slide:hover,
.home .slider-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}
