/* style.css */
:root {
    --primary-blue: #1d2a3d;
    --accent-blue: #00b4d8;
    --accent-orange: #f39c12;
    --text-grey: #666;
    --bg-light: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

/* 图片占位符样式 (当图片加载失败时显示) */
.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #555;
    font-weight: bold;
    border: 1px dashed #999;
    width: 100%;
    height: 100%;
    min-height: 200px;
    /* 默认高度 */
    text-align: center;
    padding: 20px;
}

/* 通用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

/* 导航栏 */
header {
    background-color: transparent;
    transition: background-color 0.3s ease;
    color: #fff;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.btn-register {
    background: #e91e63;
    padding: 5px 15px;
    border-radius: 4px;
    color: white !important;
}

/* Hero Section */
.hero {
    height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    /* margin-top: 60px; */
    /* offset fixed header */
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 24px;
    margin-bottom: 30px;
}

.hero-btn {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid white;
    margin: 0 10px;
    border-radius: 20px;
}

.hero-btn.filled {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Icons Grid */
.icons-grid {
    display: flex;
    justify-content: space-around;
    padding: 50px 0;
    text-align: center;
}

.icon-item {
    flex: 1;
    display: flex;
    /* Make it a flex container */
    flex-direction: column;
    /* Stack image-title group and button vertically */
    align-items: center;
    /* Center content horizontally */
    text-align: center;
    /* Center text within the item */
}

.icon-item .icon-content {
    display: flex;
    /* Make image and h3 side-by-side */
    align-items: center;
    /* Vertically align image and h3 */
    justify-content: center;
    /* Horizontally center image and h3 */
    gap: 10px;
    /* Space between image and h3 */
    margin-bottom: 10px;
    /* Space between image-title and button */
}

/* Adjust image in icon-item */
.icon-item img {
    margin: 0;
    /* Remove auto margin from original style */
}

.circle-btn {
    display: inline-block;
    padding: 5px 20px;
    border-radius: 15px;
    background: #ddd;
    color: #666;
    margin-top: 10px;
    font-size: 12px;
}

/* Card Grid */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
    margin-top: 30px;
}

/* Course Title */
.course-title {
    font-size: 36px;
    /* Example size, can adjust */
    margin-bottom: 30px;
    /* Add some margin below the title */
}

.card {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card img {
    height: 150px;
    width: 100%;
}

.card-body {
    padding: 15px;
}

.card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

/* Stats */
.stats-section {
    background: var(--primary-blue);
    color: white;
    padding: 60px 0;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
}

/* Student Works Gallery */
.student-works-gallery {
    overflow: hidden;
    /* Hide the overflowing content */
    position: relative;
    width: 100%;
}

.student-works-gallery-inner {
    display: flex;
    /* Use flexbox */
    gap: 5px;
    /* Space between images */
    /* Animate the scrolling */
    animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move the entire width of the duplicated content */
        transform: translateX(-50%);
    }
}

.student-works-gallery-inner img {
    flex-shrink: 0;
    /* Prevent images from shrinking */
    width: auto;
    /* Allow images to take their natural width */
    height: 200px;
    /* Example fixed height for images in the gallery */
}

/* 一个大图 */

/* Footer */
footer {
    background: #151f2e;
    color: #889bb0;
    padding: 50px 0 20px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 30px;
}

.footer-bottom {
    border-top: 1px solid #2c3e50;
    text-align: center;
    padding-top: 20px;
}

/* -------------------
   Page 2 Specifics 
   ------------------- */
.page2-header {
    background: #111;
}

.feature-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

.brand-title {
    font-size: 20px;
    font-weight: bold;
    color: white;
    letter-spacing: 2px;
}

/* The clickable Hero on Page 2 */
.clickable-hero {
    display: block;
    /* Make anchor act as block */
    cursor: pointer;
    position: relative;
}

.clickable-hero:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.story-section {
    display: flex;
    margin: 50px 0;
    background: #f4f4f4;
}

.story-text {
    flex: 1;
    padding: 50px;
}

.story-img {
    flex: 1;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* -------------------
   Page 3 Specifics 
   ------------------- */
.page3-hero {
    height: 400px;
}

.orange-btn {
    background: var(--accent-orange);
    color: white;
    padding: 10px 25px;
    border: none;
    cursor: pointer;
}

.split-viz {
    display: flex;
    gap: 20px;
    margin: 40px 0;
}

.vscode-section {
    margin: 40px 0;
    position: relative;
    border: 1px solid #ccc;
}

/* Cursor pointer for the VS Code link */
.vscode-link {
    display: block;
    transition: transform 0.2s;
}

.vscode-link:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.contact-form {
    background: #333;
    padding: 40px;
    color: white;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background: #444;
    border: none;
    color: white;
}