/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
}

.logo h1 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.logo p {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #34495e;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 70px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #c0392b;
}

/* 通用部分样式 */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: #2c3e50;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #3498db;
    margin: 15px auto;
}

/* 关于我们 */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 训练项目 */
.programs {
    background-color: #f5f7fa;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.program-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
}

.program-card:hover {
    transform: translateY(-10px);
}

.program-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.program-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* 预约表单 */
.booking-form-container {
    display: flex;
    gap: 40px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.booking-form {
    flex: 1;
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23333' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    /* 15px离右边框 */
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.booking-info {
    flex: 1;
    background-color: #f5f7fa;
    padding: 40px;
}

.booking-info h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.booking-info ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.booking-info li {
    margin-bottom: 10px;
}

.contact-info {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
}

.contact-info h3 {
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 10px;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    margin-right: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }

    .booking-form-container {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        padding: 20px;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 80px;
    }

    section {
        padding: 60px 0;
    }

    .booking-form,
    .booking-info {
        padding: 20px;
    }
}


/* 必填/选填标记样式 */
.required {
    color: #e74c3c;
    font-size: 0.9em;
}

.optional {
    color: #7f8c8d;
    font-size: 0.9em;
    font-weight: normal;
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 错误输入框样式 */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* 成功输入框样式 */
.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

/* 提示信息样式 */
.hint {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* 验证成功图标 */
.form-group .success-icon {
    display: none;
    color: #2ecc71;
    font-size: 0.9rem;
    margin-top: 5px;
}

.form-group .success-icon.show {
    display: inline-block;
}

/* 表单验证状态指示器 */
.form-status {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.form-status.error {
    display: block;
    background-color: #ffeaea;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.form-status.success {
    display: block;
    background-color: #eafaf1;
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

/* 选填字段提示样式 */
.form-group .hint {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* 选填字段样式（可选） */
.optional-field {
    border: 1px dashed #ddd;
}

.optional-field:focus {
    border-color: #3498db;
    border-style: solid;
}

/* 调整日期输入框样式 */
.form-group input[type="date"] {
    position: relative;
    padding-right: 40px;
    /* 为自定义图标留出空间 */
}

/* 覆盖原生日期图标，使其覆盖整个输入框区域 */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* 添加自定义图标（可选） */
.form-group input[type="date"]::after {
    content: "📅";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* 确保点击图标时触发输入框的点击事件 */
}