/* ------------------------------------- */
/* styles.css - 世欣出国留学网站样式表 */
/* ------------------------------------- */
:root {
    --primary-color: #0066cc; /* 主题蓝 */
    --secondary-color: #ff9900; /* 强调橙 */
    --dark-color: #333;
    --light-color: #f8f8f8;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    color: var(--dark-color);
    line-height: 1.6;
    
    /* === 背景图片设置：使用本地文件名并确保在最下层 === */
    background-image: url('campus-bg.jpg'); 
    background-size: cover; 
    background-attachment: fixed; /* 确保背景图固定在视口最底层 */
    background-position: center center;
    background-color: #e6e6e6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* ------------------------------------- */
/* 1. 头部和导航栏 */
/* ------------------------------------- */
header {
    background-color: rgba(0, 74, 153, 0.9);
    color: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 2px;
}

nav {
    background-color: rgba(0, 102, 204, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    padding: 15px 15px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

nav a:hover, nav a.active {
    background-color: #00386e;
}

/* ------------------------------------- */
/* 2. 通用区块 Section 样式 */
/* ------------------------------------- */
.section {
    /* 保持透明度，让背景图透出来 */
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 25px;
    display: inline-block;
}

/* ------------------------------------- */
/* 3. 网格布局和卡片 */
/* ------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-gallery .card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}
.image-gallery img {
    width: 100%;
    /* 修正后的图片高度 */
    height: 250px; 
    object-fit: cover;
    border-radius: 8px 8px 0 0; 
    transition: opacity 0.3s;
}

/* ------------------------------------- */
/* 4. 表格样式 (服务报价) */
/* ------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ------------------------------------- */
/* 5. 表单样式 (咨询/缴费) */
/* ------------------------------------- */
form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="number"],
form select,
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* 按钮样式 */
.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.cta-button:hover {
    background-color: #cc7a00;
    transform: translateY(-2px);
}

/* 表单提交/支付按钮 */
form input[type="submit"],
form button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 15px;
}

form input[type="submit"]:hover,
form button:hover {
    background-color: #004a99;
}

form button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ------------------------------------- */
/* 6. 页脚 Footer */
/* ------------------------------------- */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

/* ------------------------------------- */
/* 7. 图片灯箱 Lightbox 样式 */
/* ------------------------------------- */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 9999;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9); 
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

.caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}