/* ==================== Programs Page Styles ==================== */

/* CSS Variables */
:root {
    --programs-bg: #0a1628;
    --programs-card-bg: rgba(255, 255, 255, 0.05);
    --programs-title-color: #ffffff;
    --programs-text-color: rgba(255, 255, 255, 0.75);
    --programs-border: rgba(255, 255, 255, 0.1);
    --programs-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --programs-shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.4);
    --programs-transition: all 0.3s ease;
    --programs-accent: #3b82f6;
    --programs-accent-hover: #60a5fa;
}

/* ==================== Hero Section ==================== */
.programs-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.programs-hero-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.programs-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.programs-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.7) 0%, rgba(10, 22, 40, 0.85) 100%);
}

.programs-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    z-index: 1;
}

.programs-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.programs-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--programs-bg);
    color: var(--programs-text-color);
    line-height: 1.6;
}

/* Container */
.programs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==================== Main Content ==================== */
.programs-main {
    padding: 20px 0;
}

/* ==================== Grid Layout ==================== */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ==================== Card Styles ==================== */
.programs-card {
    background: var(--programs-card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--programs-transition);
    border: 1px solid var(--programs-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.programs-card:hover {
    box-shadow: var(--programs-shadow-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
}

.programs-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
}

.programs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.programs-card:hover .programs-card-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* 图片悬停遮罩效果 */
.programs-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.programs-card:hover .programs-card-image::after {
    background: rgba(0, 0, 0, 0.1);
}

/* 图片悬停时显示查看按钮 */
.programs-card-image::before {
    content: 'View Program';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--programs-accent) 0%, var(--programs-accent-hover) 100%);
    color: #ffffff;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.programs-card:hover .programs-card-image::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.programs-card-content {
    padding: 24px;
}

.programs-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--programs-title-color);
    line-height: 1.3;
}

.programs-card-desc {
    font-size: 0.9rem;
    color: var(--programs-text-color);
    line-height: 1.7;
    margin-bottom: 12px;
}

.programs-card-desc:last-child {
    margin-bottom: 0;
}

/* ==================== Animations ==================== */
@keyframes programs-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.programs-card {
    animation: programs-fadeIn 0.5s ease forwards;
}

.programs-card:nth-child(1) { animation-delay: 0.1s; }
.programs-card:nth-child(2) { animation-delay: 0.2s; }
.programs-card:nth-child(3) { animation-delay: 0.3s; }
.programs-card:nth-child(4) { animation-delay: 0.4s; }
.programs-card:nth-child(5) { animation-delay: 0.5s; }
.programs-card:nth-child(6) { animation-delay: 0.6s; }
.programs-card:nth-child(7) { animation-delay: 0.7s; }
.programs-card:nth-child(8) { animation-delay: 0.8s; }
.programs-card:nth-child(9) { animation-delay: 0.9s; }
.programs-card:nth-child(10) { animation-delay: 1s; }

/* ==================== Background Decoration ==================== */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .programs-container {
        padding: 20px 16px;
    }

    .programs-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .programs-card-image {
        height: 200px;
    }

    .programs-card-content {
        padding: 20px;
    }

    .programs-card-title {
        font-size: 1.15rem;
    }

    .programs-card-desc {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .programs-hero {
        height: 280px;
    }

    .programs-card-image {
        height: 180px;
    }
}
