/* ============================================================
 * main_home.php 首页样式
 * ============================================================ */


/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 区块 */
.section {
    margin: 50px 0;
}
.section-title {
    font-size: 22px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 24px;
    padding-left: 14px;
    border-left: 4px solid #4a6741;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title .more {
    font-size: 13px;
    color: #4a6741;
    font-weight: normal;
    letter-spacing: 0;
}
.section-title .more:hover { text-decoration: underline; }

/* 书体标签 */
.book-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.book-tabs .tab {
    padding: 6px 18px;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 14px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s;
}
.book-tabs .tab:hover { border-color: #4a6741; color: #4a6741; }
.book-tabs .tab.active {
    background: #4a6741;
    color: #fff;
    border-color: #4a6741;
}

/* 书家卡片 */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}
.artist-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s;
    display: block;
    text-align: center;
    padding: 24px 16px 16px;
}
.artist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.artist-card .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #4a6741 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-family: "STKaiti", "KaiTi", serif;
    overflow: hidden;
}
.artist-card .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.artist-card .name {
    font-size: 17px;
    color: #2c3e50;
    font-weight: 600;
}
.artist-card .meta {
    font-size: 12px;
    color: #999;
}
.artist-card .meta .tag {
    display: inline-block;
    padding: 1px 8px;
    background: #f5f5f5;
    border-radius: 8px;
    margin: 2px;
    font-size: 11px;
}

/* 碑帖卡片 */
.stele-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.stele-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s;
    display: block;
}
.stele-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.stele-card .cover {
    height: 160px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}
.stele-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.stele-card:hover .cover img { transform: scale(1.05); }
.stele-card .cover .placeholder {
    font-size: 34px;
    color: #d0d0d0;
    font-family: "STKaiti", "KaiTi", serif;
}
.stele-card .info {
    padding: 12px 14px;
}
.stele-card .title {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stele-card .sub {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stele-card .sub .tag {
    background: #f0f7f0;
    color: #4a6741;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 11px;
}

/* 专区三栏 */
.category-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.category-col {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.category-col h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-col h4 .more {
    font-size: 12px;
    color: #4a6741;
    font-weight: normal;
}
.category-col ul {
    list-style: none;
}
.category-col ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #f5f5f5;
    font-size: 14px;
    color: #555;
}
.category-col ul li:last-child { border-bottom: none; }
.category-col ul li a {
    color: #555;
    transition: color 0.2s;
    display: flex;
    justify-content: space-between;
}
.category-col ul li a:hover { color: #4a6741; }
.category-col ul li .date {
    font-size: 12px;
    color: #bbb;
}
.category-col .empty {
    color: #ccc;
    font-size: 13px;
    padding: 20px 0;
    text-align: center;
}

/* 空状态 */
.empty {
    background: #fff;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    color: #bbb;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 992px) {
    .entry-cards { grid-template-columns: repeat(2, 1fr); }
    .category-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .hero { padding: 60px 20px 80px; }
    .hero h1 { font-size: 28px; letter-spacing: 4px; }
    .hero::before { font-size: 200px; }
    .container { padding: 0 16px; }
    .section-title { font-size: 18px; }
    .artist-grid { grid-template-columns: repeat(2, 1fr); }
    .stele-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stele-card .cover { height: 130px; }
}

/* ============================================================
 * 首页三翻轮播广告
 * ============================================================ */

.home-carousel {
    position: relative;
    overflow: hidden;
    background: #f5f6fa;
}
.home-carousel .hc-track {
    position: relative;
    width: 100%;
    height: 360px;
}
.home-carousel .hc-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
}
.home-carousel .hc-slide.active {
    opacity: 1;
    visibility: visible;
}

/* Slide 1：关于我们（墨绿） */
.home-carousel .hc-slide.hc-about {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6741 100%);
}
/* Slide 2：招聘老师（金色） */
.home-carousel .hc-slide.hc-teacher {
    background: linear-gradient(135deg, #b8860b 0%, #d4a017 100%);
}
/* Slide 3：开通 VIP（深紫金） */
.home-carousel .hc-slide.hc-vip {
    background: linear-gradient(135deg, #1a1a2e 0%, #4a3a6b 100%);
}

/* 装饰大字背景 */
.home-carousel .hc-slide::before {
    content: attr(data-char);
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 300px;
    font-family: "STKaiti", "KaiTi", serif;
    color: rgba(255,255,255,0.07);
    pointer-events: none;
    line-height: 1;
}

/* 内容 */
.home-carousel .hc-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px;
    max-width: 800px;
}
.home-carousel .hc-tag {
    display: inline-block;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 13px;
    letter-spacing: 4px;
    background: rgba(255,255,255,0.15);
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}
.home-carousel .hc-title {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 6px;
    margin-bottom: 14px;
}
.home-carousel .hc-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    letter-spacing: 3px;
    line-height: 1.9;
}
.home-carousel .hc-btn {
    display: inline-block;
    margin-top: 22px;
    padding: 10px 32px;
    border-radius: 24px;
    background: rgba(255,255,255,0.95);
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.home-carousel .hc-slide:hover .hc-btn {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* 左右箭头 */
.home-carousel .hc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}
.home-carousel .hc-arrow:hover {
    background: rgba(255,255,255,0.4);
}
.home-carousel .hc-arrow.hc-prev { left: 16px; }
.home-carousel .hc-arrow.hc-next { right: 16px; }

/* 底部圆点 */
.home-carousel .hc-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.home-carousel .hc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
}
.home-carousel .hc-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* 响应式 */
@media (max-width: 768px) {
    .home-carousel .hc-track { height: 300px; }
    .home-carousel .hc-slide::before { font-size: 140px; }
    .home-carousel .hc-title { font-size: 22px; letter-spacing: 4px; margin-bottom: 10px; }
    .home-carousel .hc-desc { font-size: 13px; letter-spacing: 2px; }
    .home-carousel .hc-tag { font-size: 11px; padding: 3px 14px; letter-spacing: 3px; }
    .home-carousel .hc-btn { padding: 8px 24px; font-size: 13px; margin-top: 16px; letter-spacing: 2px; }
    .home-carousel .hc-arrow { width: 30px; height: 30px; font-size: 15px; }
    .home-carousel .hc-arrow.hc-prev { left: 8px; }
    .home-carousel .hc-arrow.hc-next { right: 8px; }
}