/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    .nav-gold-line { border-bottom: 2px solid #FFD700; }
    .nav-link { letter-spacing: 0.5px; }
    /* 移除默认焦点样式，改用JS控制临时显示效果 */
    /* 兜底方案：只针对导航栏下拉 */
    /* nav li.group:hover > ul,
    nav li.group:focus-within > ul,
    nav li.group ul:hover {
        display: block !important;
    } */
}

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

h1, h2, h3 {
    margin-bottom: 15px;
}

section {
    padding: 60px 0;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #FFD700;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-weight: bold;
}

.btn:hover {
    background-color: #e6c200;
}

/* 导航栏 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

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

.logo img {
    max-height: 50px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    /* color: #333; */
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #FFD700;
}

/* 下拉菜单样式 - 纯CSS实现 */
.dropdown-container {
    position: relative;
}

.dropdown-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.dropdown-button:hover {
    color: #F59E0B;
}

.dropdown-arrow {
    transition: transform 0.3s ease, color 0.3s ease;
}

.dropdown-button:hover .dropdown-arrow {
    color: #F59E0B;
}

.dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    width: 15rem;
    background-color: rgba(0, 0, 0, 0.85);
    border: 2px solid #FFD700;
    border-radius: 0.375rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    overflow: hidden;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    transform: translateY(10px);
}

.dropdown-container:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-container:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    line-height: 1.8;
    font-size: 18px;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #F59E0B;
    padding-left: 1.75rem;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* 移动设备下的下拉菜单 */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

/* 导航链接的过渡效果 */
.nav-link {
    transition: color 0.3s ease;
}

/* 菜单项的过渡效果 */
#coursesDropdownMenu a {
    transition: all 0.2s ease;
}

/* 英雄区域 */
.hero {
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 10px;
    font-weight: bold;
}

.hero p {
    font-size: 20px;
    margin-bottom: 0;
}

/* 礼物区域 */
.gift {
    text-align: center;
    padding: 50px 0;
}

.gift h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.gift p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    color: #666;
}

/* 欢迎区域 */
.welcome {
    padding: 0;
}

.full-width-img {
    width: 100%;
    display: block;
}

/* 学生作品展示 */
.student-art {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.student-art h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.03);
}

/* 报名按钮 */
.enroll-banner {
    text-align: center;
    padding: 30px 0;
}

.enroll-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #FFD700;
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.enroll-btn:hover {
    background-color: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 视频区域 */
.video-section {
    padding: 60px 0;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
}

.video-placeholder {
    width: 100%;
    height: 450px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* 视频播放按钮 */
.play-button {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

.play-button:hover {
    transform: scale(1.1);
    background-color: rgba(255, 215, 0, 1);
}

/* 课程区域 */
.courses {
    padding: 60px 0;
    background-color: #fff;
}

.courses h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.course-card {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 4px;
    text-align: center;
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
}

.course-card h3 {
    color: #008080;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.course-card .age {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.course-card p {
    font-size: 14px;
}

/* 新闻区域 */
.whats-new {
    padding: 60px 0;
    background-color: #008080;
    text-align: center;
    color: white;
}

.whats-new h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.whats-new p {
    max-width: 700px;
    margin: 0 auto 30px;
}

.whats-new .btn {
    background-color: white;
    color: #008080;
}

.whats-new .btn:hover {
    background-color: #f2f2f2;
}

/* 指导区域 */
.wondering {
    padding: 80px 0;
    text-align: center;
    background-image: url('guidance-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
}

.wondering::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.wondering .container {
    position: relative;
    z-index: 1;
}

.wondering h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.wondering h3 {
    font-size: 24px;
}

/* 页脚 */
footer {
    background-color: #f8f9fa;
    padding: 50px 0 20px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-nav ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
}

.footer-nav a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-nav a:hover {
    color: #FFD700;
}

.footer-info p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.social-icons {
    text-align: center;
    margin-bottom: 20px;
}

.social-icon {
    display: inline-block;
    margin: 0 10px;
    font-size: 0;
    width: 30px;
    height: 30px;
    background-color: #008080;
    border-radius: 50%;
    overflow: hidden;
    text-indent: -9999px;
    transition: background-color 0.3s, transform 0.3s;
}

.social-icon:hover {
    background-color: #FFD700;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    color: #888;
    font-size: 12px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

/* 画廊弹出层 */
.gallery-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.gallery-popup img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-popup {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-popup:hover {
    color: #FFD700;
}

/* 动画类 */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 移动菜单 */
.mobile-menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
}

/* 页面加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .gallery-grid,
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav li {
        margin: 5px 10px;
    }
    
    .hero {
        height: 60vh;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-nav {
        margin-bottom: 20px;
    }
    
    .footer-nav ul {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    nav.mobile-hidden {
        display: none;
    }
    
    nav.mobile-visible {
        display: block;
        width: 100%;
    }
    
    nav.mobile-visible ul {
        flex-direction: column;
        text-align: center;
    }
    
    nav.mobile-visible li {
        margin: 10px 0;
    }
}

@media (max-width: 576px) {
    .gallery-grid,
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .gift h2,
    .courses h2,
    .whats-new h2,
    .wondering h2 {
        font-size: 24px;
    }
}

/* 自定义字体和变量 */
:root {
  --color-primary: #FFD700;
  --color-secondary: #008080;
  --color-dark: #333333;
  --color-light: #f8f9fa;
}

.font-montserrat {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* 自定义动画和过渡效果 */
@keyframes pulse-slow {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 2s infinite;
}

/* 图片画廊弹出层 */
.gallery-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.gallery-popup img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.gallery-popup .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  transition: color 0.3s;
}

.gallery-popup .close-btn:hover {
  color: var(--color-primary);
}

/* 视频容器样式 */
.aspect-w-16 {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 纵横比 */
  height: 0;
  overflow: hidden;
}

.aspect-w-16 iframe, 
.aspect-w-16 > div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* AOS 样式扩展 (Animate On Scroll) */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-aos].aos-animate {
  opacity: 1;
}

[data-aos="fade-up"] {
  transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

/* 移动端导航样式补充 */
@media (max-width: 768px) {
  #mobile-menu.active {
    display: block;
  }
}

/* 可访问性焦点样式 */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* 旋转动画效果 */
.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* 增强下拉菜单交互体验 */
@media (hover: hover) {
    .group:hover .group-hover\:block {
        display: block !important;
    }
    
    /* 添加过渡效果 */
    .group-hover\:block {
        transition: opacity 0.3s ease;
        opacity: 0;
    }
    
    .group:hover .group-hover\:block {
        opacity: 1;
    }
}

/* 触摸设备上的下拉菜单处理 */
@media (hover: none) {
    .group.active .group-hover\:block {
        display: block !important;
    }
}

/* 优化的下拉菜单样式 */
.dropdown-fix {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 200px;
    background-color: #292929;
    border-top: 2px solid #FFD700;
    border-bottom: 2px solid #FFD700;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    overflow: visible;
    transition: opacity 0.2s, visibility 0.2s;
}

/* 确保在各种环境下group-hover都能正常工作 */
@media (hover: hover) {
    .group:hover .group-hover\:block {
        display: block !important;
    }
}

/* 针对触摸设备的特殊处理 */
@media (hover: none) {
    .group.active .group-hover\:block {
        display: block !important;
    }
    
    /* 在触摸设备上，通过JS手动控制显示/隐藏，而不是依赖:hover */
    .dropdown-fix {
        display: none;
    }
    
    .group.active .dropdown-fix {
        display: block;
    }
}

/* 下拉菜单项样式 */
.dropdown-fix a {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1em;
    color: white;
    transition: all 0.3s ease;
    width: 100%;
}

/* 下拉菜单项悬停效果 */
.dropdown-fix a:hover {
    color: #FFD700;
    background-color: rgba(255, 255, 255, 0.05);
}

/* 下拉菜单项之间的分隔线 */
.dropdown-fix a:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 确保导航容器不受overflow限制 */
nav, .group, .group-hover\:block {
    overflow: visible !important;
}

/* 导航链接点击效果 */
.nav-link.click-active {
    outline: 2px solid #FFD700; 
    outline-offset: 2px;
    transition: outline 0.3s ease;
}

/* 去除所有导航链接的默认焦点样式 */
.nav-link:focus {
    outline: none;
} 