/*
Theme Name: HanyangEdu
Theme URI: https://example.com/hanyangedu
Description: 汉阳大学留学推介官网主题，适配Typecho 1.3 + PHP 8.2
Version: 1.0.0
Author: YourName
Author URI: https://example.com
*/

/* ========== 变量与重置 ========== */
:root {
    --hanyang-blue: #00205B;
    --hanyang-gold: #C8B89A;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,32,91,0.08);
    --radius: 8px;
    --max-width: 1200px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--white);
}

a {
    color: var(--hanyang-blue);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

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

/* ========== 布局工具 ========== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    color: var(--hanyang-blue);
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--hanyang-gold);
    margin: 16px auto 0;
}

/* ========== 头部 ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,32,91,0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hanyang-blue);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--hanyang-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.main-nav a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--hanyang-blue);
    transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* ========== 首页 Hero ========== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hanyang-blue);
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background: linear-gradient(135deg, var(--hanyang-blue) 0%, #001a4d 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 24px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--hanyang-gold);
    color: var(--hanyang-blue);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--hanyang-gold);
    color: var(--hanyang-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200,184,154,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--hanyang-blue);
}

/* ========== 项目卡片 ========== */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.program-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,32,91,0.08);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,32,91,0.12);
}

.program-image {
    height: 200px;
    background: linear-gradient(135deg, var(--hanyang-blue) 0%, #003d99 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.program-body {
    padding: 24px;
}

.program-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0,32,91,0.08);
    color: var(--hanyang-blue);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.program-title {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.program-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ========== 数据展示 ========== */
.stats-section {
    background: var(--hanyang-blue);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--hanyang-gold);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========== 新闻动态 ========== */
.news-list {
    display: grid;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.news-item:hover {
    transform: translateX(4px);
}

.news-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.news-day {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hanyang-blue);
    line-height: 1;
}

.news-month {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.news-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.news-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========== 文章/页面内容 ========== */
.content-header {
    background: linear-gradient(135deg, var(--hanyang-blue) 0%, #001a4d 100%);
    color: var(--white);
    padding: 100px 0 60px;
    margin-top: var(--header-height);
}

.content-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.content-meta {
    display: flex;
    gap: 20px;
    opacity: 0.8;
    font-size: 0.9rem;
}

.content-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2,
.post-content h3 {
    color: var(--hanyang-blue);
    margin: 40px 0 20px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--hanyang-gold);
    padding-left: 20px;
    color: var(--text-secondary);
    margin: 24px 0;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

/* ========== 面包屑 ========== */
.breadcrumb {
    padding: 20px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,32,91,0.1);
    margin-bottom: 40px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--hanyang-blue);
}

/* ========== 评论 ========== */
.comments-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-family: inherit;
    font-size: 1rem;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-list {
    list-style: none;
    margin-top: 40px;
}

.comment-item {
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: var(--hanyang-blue);
}

.comment-time {
    color: var(--text-secondary);
}

/* ========== 页脚 ========== */
.site-footer {
    background: var(--hanyang-blue);
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--hanyang-gold);
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.8;
    font-size: 0.9rem;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--hanyang-gold);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--white);
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 500;
}

.pagination a {
    background: var(--white);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.pagination .current {
    background: var(--hanyang-blue);
    color: var(--white);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: 24px;
        box-shadow: var(--shadow);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 16px;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-item {
        flex-direction: column;
        gap: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .content-header h1 {
        font-size: 1.75rem;
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.bg-light { background: var(--bg-light); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ========== 幻灯片轮播 ========== */
.slider-section {
    position: relative;
    margin-top: var(--header-height);
    overflow: hidden;
    background: var(--hanyang-blue);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 6s ease;
}

.slide.active .slide-bg {
    transform: scale(1.05);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,32,91,0.85) 0%, rgba(0,32,91,0.4) 50%, rgba(0,32,91,0.2) 100%);
}

.slide-content {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    color: var(--white);
    z-index: 2;
}

.slide-content h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 幻灯片控制 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(255,255,255,0.4);
}

.slider-prev { left: 24px; }
.slider-next { right: 24px; }

.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.dot.active {
    background: var(--hanyang-gold);
    width: 30px;
    border-radius: 5px;
}

/* ========== 表单样式 ========== */
.form-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-title {
    font-size: 1.5rem;
    color: var(--hanyang-blue);
    margin-bottom: 8px;
}

.form-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--hanyang-blue);
    box-shadow: 0 0 0 3px rgba(0,32,91,0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 6px;
}

.form-success {
    background: #d4edda;
    color: #155724;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.form-alert {
    background: #f8d7da;
    color: #721c24;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed #ddd;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: var(--hanyang-blue);
    background: rgba(0,32,91,0.02);
}

.file-upload input[type="file"] {
    display: none;
}

/* 申请列表 */
.apply-list {
    display: grid;
    gap: 16px;
}

.apply-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--hanyang-blue);
}

.apply-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.apply-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.apply-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.apply-result {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 16px;
}

.apply-result h4 {
    color: var(--hanyang-blue);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-need {
    background: #cce5ff;
    color: #004085;
}

/* 登录提示 */
.login-prompt {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.login-prompt h3 {
    color: var(--hanyang-blue);
    margin-bottom: 16px;
}

.login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 响应式表单 */
@media (max-width: 768px) {
    .slider-container {
        height: 400px;
    }
    
    .slide-content {
        bottom: 60px;
        padding: 0 24px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
    
    .slider-prev { left: 12px; }
    .slider-next { right: 12px; }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-card {
        padding: 24px;
    }
    
    .apply-header {
        flex-direction: column;
        gap: 12px;
    }
}