/* ====================================================
   星语英语 · 样式表
   配色：深蓝 + 活力橙 + 纯净白
   字体：Inter (Google Font)
   ==================================================== */

/* ----- 基础重置 & 变量 ----- */
:root {
    --primary: #1e3a5f;        /* 深蓝 */
    --primary-light: #2a5080;
    --accent: #f59e0b;         /* 活力橙 */
    --accent-light: #fbbf24;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --nav-height: 72px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- 导航栏 ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255,255,255,0.96);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--accent);
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    transition: color var(--transition);
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent);
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition) !important;
}

.nav-cta:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245,158,11,0.35);
}

.nav-cta::after { display: none !important; }

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 4px;
    transition: var(--transition);
}

/* ----- Hero 区域 ----- */
.hero {
    padding: calc(var(--nav-height) + 60px) 0 80px;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content .badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--primary);
}

.hero-content h1 strong {
    color: var(--accent);
    position: relative;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(30,58,95,0.25);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(30,58,95,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stats div {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hero-stats span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

/* Hero 图片 */
.hero-image {
    display: flex;
    justify-content: center;
}

.hero-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.hero-img-wrapper img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: auto;
    object-fit: cover;
}

.floating-card {
    position: absolute;
    background: var(--bg-white);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    animation: float 4s ease-in-out infinite;
}

.floating-card i {
    color: var(--accent);
    font-size: 1.1rem;
}

.card-1 { top: 10%; right: -10%; animation-delay: 0s; }
.card-2 { bottom: 15%; left: -10%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ----- 通用 Section ----- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(245,158,11,0.12);
    padding: 4px 16px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ----- 课程卡片 (动态) ----- */
.courses { background: var(--bg-white); }

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.course-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.course-card:hover::before {
    transform: scaleX(1);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.course-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
}

.course-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.course-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.course-level {
    background: rgba(30,58,95,0.08);
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 500;
    color: var(--primary);
}

.course-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.2rem;
}

/* ----- 特色卡片 ----- */
.features { background: var(--bg-light); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.feature-card {
    background: var(--bg-white);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
}

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

.feature-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ----- 师资卡片 (动态) ----- */
.teachers { background: var(--bg-white); }

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
}

.teacher-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 32px 20px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.teacher-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 4px solid var(--accent);
    box-shadow: 0 4px 12px rgba(245,158,11,0.2);
}

.teacher-card h4 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.teacher-card .title {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.teacher-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ----- 学员口碑 (滑块) ----- */
.testimonials {
    background: linear-gradient(135deg, var(--primary) 0%, #0f2b44 100%);
    color: #fff;
}

.testimonials .section-tag { background: rgba(255,255,255,0.15); color: var(--accent-light); }
.testimonials .section-header h2 { color: #fff; }
.testimonials .section-header p { color: rgba(255,255,255,0.7); }

.testimonial-slider {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 20px;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar { display: none; }

.testimonial-card {
    flex: 0 0 380px;
    scroll-snap-align: start;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 32px 28px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.testimonial-card:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-4px);
}

.testimonial-card .stars {
    color: var(--accent-light);
    font-size: 1.1rem;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.testimonial-card blockquote {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    opacity: 0.9;
}

.testimonial-card .author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-card .author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-card .author-info strong {
    display: block;
    font-size: 1rem;
}

.testimonial-card .author-info span {
    font-size: 0.85rem;
    opacity: 0.7;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.slider-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots span.active {
    background: var(--accent);
    width: 32px;
    border-radius: 10px;
}

/* ----- 联系表单 ----- */
.contact { background: var(--bg-light); }

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 48px;
    box-shadow: var(--shadow-sm);
}

.contact-info h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.contact-details div {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.contact-details i {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245,158,11,0.12);
}

.form-group textarea {
    resize: vertical;
}

.form-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.form-tip a {
    color: var(--accent);
    text-decoration: underline;
}

/* ----- 页脚 ----- */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.85);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 14px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: scale(1.1);
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-newsletter h4 {
    color: #fff;
    margin-bottom: 10px;
}

.footer-newsletter p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
}

.newsletter-form input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input:focus { outline: none; }

.newsletter-form button {
    background: var(--accent);
    border: none;
    color: var(--primary);
    padding: 0 22px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--accent-light);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ----- 回到顶部按钮 ----- */
#backToTop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ====================================================
   响应式设计
   ==================================================== */

/* 平板 768px */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-content p { margin: 0 auto 32px; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-image { order: -1; }
    .hero-img-wrapper { max-width: 400px; margin: 0 auto; }
    .card-1 { right: 0; }
    .card-2 { left: 0; }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 32px;
    }

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

@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px 32px;
        gap: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 2px solid rgba(0,0,0,0.04);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero-content h1 { font-size: 2.4rem; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-stats div { flex: 1; min-width: 80px; }

    .section { padding: 60px 0; }
    .section-header h2 { font-size: 2rem; }

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

    .testimonial-card { flex: 0 0 300px; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links { justify-content: center; }
    .newsletter-form { max-width: 360px; margin: 0 auto; }
}

/* 手机 480px */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .hero-content h1 { font-size: 2rem; }
    .hero-actions .btn { width: 100%; justify-content: center; }

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

    .testimonial-card { flex: 0 0 280px; }

    .contact-wrapper { padding: 24px 16px; }

    #backToTop { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}