/* ========================================
   Home Page Styles
   ======================================== */

.home-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* ========== Hero 區塊 ========== */
.hero-section {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 48px 40px;
    margin: 0 -24px 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.08) 100%);
    border-radius: 0 0 32px 32px;
}

.hero-left {
    flex: 2;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-right {
    flex: 3;
    min-width: 0;
}

.hero-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background: #000;
}

.hero-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.hero-video-caption {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #9ca3af);
    line-height: 1.5;
}

.hero-content {}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text-primary, #1f2937);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 28px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #374151);
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-hero-outline:hover {
    border-color: var(--primary, #3b82f6);
    color: var(--primary, #3b82f6);
}

.hero-decoration {
    flex-shrink: 0;
    margin-bottom: 12px;
}

/* ========== �έp�϶� ========== */
.stats-section {
    margin-bottom: 48px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--bg-card, #fff);
    border-radius: 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-users { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-icon-works { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.stat-icon-views { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.stat-icon-likes { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
}

/* ========== �@�~�϶� ========== */
.works-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

.section-title svg {
    color: var(--primary, #3b82f6);
}

.section-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary, #3b82f6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--primary-hover, #2563eb);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.work-card {
    display: block;
    background: var(--bg-card, #fff);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
    text-decoration: none;
    transition: all 0.25s ease;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.work-card-media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-input, #f3f4f6);
}

.work-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-card:hover .work-card-media img {
    transform: scale(1.05);
}

.work-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.work-card-badge.badge-new {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.work-card-body {
    padding: 14px;
}

.work-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-card-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.work-author {
    color: var(--text-secondary, #6b7280);
}

.work-stats {
    color: #ef4444;
    font-weight: 500;
}

.work-date {
    color: var(--text-muted, #9ca3af);
}

/* ========== ���Ұ϶� ========== */
.tags-section {
    margin-bottom: 48px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, #374151);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: var(--primary, #3b82f6);
    color: #fff;
    border-color: var(--primary, #3b82f6);
}

/* ========== �ֳt�J�f ========== */
.quick-links-section {
    margin-bottom: 20px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    text-decoration: none;
    transition: all 0.25s ease;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: var(--primary, #3b82f6);
}

.quick-link-card.quick-link-highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.quick-link-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.quick-link-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin: 0 0 6px;
}

.quick-link-card p {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.5;
}


/* ========== RWD ========== */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        padding: 36px 24px;
        gap: 24px;
    }

    .hero-left {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .hero-right {
        width: 100%;
    }

    .hero-decoration { margin-bottom: 8px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 1.75rem; }
    .hero-actions { justify-content: center; }
    .stats-container { grid-template-columns: repeat(2, 1fr); }
    .works-grid { grid-template-columns: 1fr; }
    .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stats-container { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { flex-direction: column; text-align: center; padding: 14px; }
    .quick-links-grid { grid-template-columns: 1fr; }
}

/* ========== �`��Ҧ��]�ϥ� data-theme�^ ========== */
:root[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
}

:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .work-card,
:root[data-theme="dark"] .tag-item,
:root[data-theme="dark"] .quick-link-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
}

:root[data-theme="dark"] .hero-title,
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .stat-value,
:root[data-theme="dark"] .work-card-title,
:root[data-theme="dark"] .tag-item,
:root[data-theme="dark"] .quick-link-card h3 {
    color: #f1f5f9;
}

:root[data-theme="dark"] .hero-subtitle,
:root[data-theme="dark"] .stat-label,
:root[data-theme="dark"] .work-author,
:root[data-theme="dark"] .work-date,
:root[data-theme="dark"] .quick-link-card p {
    color: #94a3b8;
}

:root[data-theme="dark"] .btn-hero-outline {
    background: rgba(30, 41, 59, 0.9);
    color: #e2e8f0;
    border-color: rgba(71, 85, 105, 0.6);
}

:root[data-theme="dark"] .btn-hero-outline:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

:root[data-theme="dark"] .work-card-media {
    background: rgba(51, 65, 85, 0.5);
}

:root[data-theme="dark"] .work-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

:root[data-theme="dark"] .stat-card:hover,
:root[data-theme="dark"] .quick-link-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

:root[data-theme="dark"] .tag-item:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

:root[data-theme="dark"] .section-link {
    color: #60a5fa;
}

:root[data-theme="dark"] .quick-link-card.quick-link-highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border-color: rgba(96, 165, 250, 0.4);
}

:root[data-theme="dark"] .hero-video-wrapper {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .hero-video-caption {
    color: #64748b;
}
