/* ===== 基本設定 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    overflow-x: hidden;
    background: var(--white);
}

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

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

ul {
    list-style: none;
}

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

/* ===== 按鈕 ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(30, 64, 175, 0.5);
}

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

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

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

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

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== 導覽列 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
}

.logo img {
    mix-blend-mode: multiply;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.logo-text {
    font-size: 22px;
    color: var(--dark);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--light-gray);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

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

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 50%, #fef3c7 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 20px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 25px;
    color: var(--dark);
    animation: fadeInUp 0.8s ease 0.1s both;
}

.highlight {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 4px;
    z-index: -1;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--gray);
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
    padding: 25px 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 區塊標題 ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 14px;
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 20px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 關於我們 ===== */
.about {
    padding: 100px 0;
    background: var(--white);
}

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

.about-content h3 {
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.about-content p {
    color: var(--gray);
    margin-bottom: 18px;
    font-size: 16px;
}

.about-content .btn {
    margin-top: 20px;
}

.about-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about-card {
    padding: 30px 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #f3f4f6;
}

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

.about-card:nth-child(even) {
    margin-top: 30px;
}

.about-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.about-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.about-card p {
    color: var(--gray);
    font-size: 14px;
}

/* ===== 課程介紹 ===== */
.courses {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.course-image {
    height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 60px;
    font-weight: 900;
}

.course-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

.course-with-photo {
    overflow: hidden;
    height: 220px;
}

.course-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.course-with-photo::before {
    display: none;
}

.course-with-photo .course-level {
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.course-with-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}
.course-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.course-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.course-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.course-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.course-6 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }

.course-image::before {
    content: '📖';
}

.course-1::before { content: '📚'; }
.course-2::before { content: '✏️'; }
.course-3::before { content: '🎓'; }
.course-4::before { content: '💻'; }
.course-5::before { content: '👨‍🏫'; }
.course-6::before { content: '☀️'; }

.course-level {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.course-body {
    padding: 30px 25px;
}

.course-body h3 {
    font-size: 20px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}

.course-body > p {
    color: var(--gray);
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.7;
}

.course-features {
    margin-bottom: 20px;
}

.course-features li {
    color: var(--dark);
    padding: 6px 0;
    font-size: 14px;
}

.course-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
}

.course-link:hover {
    color: var(--accent);
}

/* ===== 教學特色 ===== */
.features {
    padding: 100px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    padding: 40px 30px;
    background: var(--white);
    border-radius: 20px;
    border: 2px solid var(--light-gray);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-number {
    font-size: 60px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.3;
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}

.feature-item p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.7;
}

/* ===== 學員評價 ===== */
.reviews {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--light-gray) 0%, #fef3c7 100%);
}

.rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stars {
    color: var(--accent);
    font-size: 24px;
    letter-spacing: 2px;
}

.rating-score {
    font-size: 32px;
    font-weight: 900;
    color: var(--dark);
}

.rating-count {
    color: var(--gray);
    font-size: 16px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--white);
    padding: 35px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.review-card::before {
    content: '"';
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 80px;
    color: var(--primary);
    opacity: 0.1;
    font-family: serif;
    line-height: 1;
}

.review-stars {
    color: var(--accent);
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.review-text {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

.author-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 15px;
}

.author-title {
    color: var(--gray);
    font-size: 13px;
}

/* ===== CTA ===== */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 35px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: var(--accent);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
}

.cta .btn-primary:hover {
    background: var(--accent-dark);
}

/* ===== 聯絡我們 ===== */
.contact {
    padding: 100px 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.contact-info h3 {
    font-size: 26px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    gap: 18px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
}

.info-item a {
    color: var(--primary);
    font-weight: 700;
    transition: var(--transition);
}

.info-item a:hover {
    color: var(--accent);
}

.contact-form-wrapper {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 20px;
}

.contact-form h3 {
    font-size: 24px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.map-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo img {
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--white);
}

.footer-col ul li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 12px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ===== 回到頂部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(30, 64, 175, 0.6);
}

/* ===== 動畫類別 ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== 響應式設計 ===== */
@media (max-width: 968px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        gap: 5px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 12px 20px;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .about-image {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .social-links {
        justify-content: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .contact-form-wrapper {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 15px 60px;
    }

    .about,
    .courses,
    .features,
    .reviews,
    .contact {
        padding: 60px 0;
    }

    .about-card:nth-child(even) {
        margin-top: 0;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
