/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Logo配色方案 - 专业科技蓝紫色系（基于logo深蓝/深紫色） */
    --primary-color: #4c63d2;
    --primary-dark: #3b4f9f; /* logo外环深蓝紫色 - 用于文字选中 */
    --primary-light: #6b7fd8;
    --secondary-color: #6366f1;
    --accent-color: #10b981; /* logo中的绿色元素 */
    --accent-yellow: #fbbf24; /* logo中的黄色星星 */
    --accent-pink: #ec4899; /* logo中的粉色元素 */
    --accent-light-blue: #60a5fa; /* logo中的浅蓝色眼睛 */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* 文字选中颜色 - 使用logo中的深蓝紫色 */
::selection {
    background-color: var(--primary-dark);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-dark);
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    padding: 1rem 0;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-brand .brand-text {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    display: inline-block;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('images/backgrounds/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-color); /* 备用背景色 */
    color: white;
    padding: 6rem 0;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 99, 210, 0.85) 0%, rgba(59, 79, 159, 0.85) 50%, rgba(99, 102, 241, 0.85) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-slogan {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-style: italic;
    color: var(--accent-yellow);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--bg-white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.feature-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-details {
    text-align: left;
    margin-top: 1rem;
}

.feature-details p {
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

/* Stats Section */
.stats {
    position: relative;
    padding: 4rem 0;
    background-image: url('images/backgrounds/stats-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-color); /* 备用背景色 */
    color: white;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 99, 210, 0.85) 0%, rgba(59, 79, 159, 0.85) 50%, rgba(99, 102, 241, 0.85) 100%);
    z-index: 1;
}

.stats .container {
    position: relative;
    z-index: 2;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* CTA Section */
.cta {
    padding: 5rem 0;
    background: var(--bg-white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.cta p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Certificate Section */
.certificate-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.search-form-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: var(--error-color);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    border: 1px solid #fecaca;
}

/* Certificate Result */
.certificate-result {
    max-width: 900px;
    margin: 0 auto;
}

.certificate-card {
    background: var(--bg-white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.certificate-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem 2rem;
}

.certificate-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.certificate-content {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.student-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-light);
    min-width: 100px;
}

.info-value {
    color: var(--text-dark);
    font-weight: 500;
}

.certificate-image-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.certificate-image-container h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.certificate-image-wrapper {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.certificate-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 3rem;
    align-items: start;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.gallery-item-subtitle {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    height: 350px;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.carousel-wrapper {
    height: 100%;
    position: relative;
}

.carousel-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-height: 350px;
    width: 100%;
    flex-shrink: 0;
}

.carousel-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-50%) scale(1.1);
}

.carousel-btn-up {
    top: 10px;
}

.carousel-btn-down {
    bottom: 10px;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--bg-light);
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-details p {
    color: var(--text-light);
    margin: 0.25rem 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
}


/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-slogan {
    color: var(--accent-yellow) !important;
    font-weight: 600;
    font-style: italic;
    margin: 0.5rem 0 !important;
}

.company-slogan {
    color: rgba(255, 255, 255, 0.9) !important;
    font-style: italic;
    margin: 0.5rem 0 1rem 0 !important;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin: 0.5rem 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.icp {
    margin-top: 0.5rem;
}

.icp a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.icp a:hover {
    color: white;
    text-decoration: underline;
}

.icp .separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        gap: 2rem;
    }
    
    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
        background-attachment: scroll;
    }
    
    .stats {
        background-attachment: scroll;
    }

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

    .hero-slogan {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .certificate-content {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .gallery-item {
        width: 100%;
    }

    .carousel-container {
        max-width: 100%;
        height: 300px;
    }

    .carousel-item {
        min-height: 300px;
    }

    .carousel-item img {
        height: 300px;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-item {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .nav-menu {
        gap: 0.5rem;
        flex-wrap: wrap;
        font-size: 0.9rem;
    }

    .nav-menu a {
        padding: 0.4rem 0.8rem;
    }

    .nav-brand .brand-text {
        font-size: 1.1rem;
    }

    .nav-brand .logo {
        height: 40px;
        width: 40px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .gallery-item-title {
        font-size: 1.25rem;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-item {
        min-height: 250px;
    }

    .carousel-item img {
        height: 250px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-brand {
        gap: 0.5rem;
    }

    .nav-brand .brand-text {
        font-size: 1rem;
    }

    .container {
        padding: 0 15px;
    }
}

