/* ============================================================
   courses.css — 課程資料頁面專屬樣式
   依賴：main.css
   ============================================================ */

/* ============================================================
   Course Overview
   ============================================================ */
.course-overview {
    padding: 100px 20px;
    background: #fff;
}

.overview-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.overview-item {
    text-align: center;
    padding: 30px 15px;
    background: var(--light-color);
    border-radius: 15px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.overview-item:hover {
    background: var(--gradient-1);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(26, 95, 122, 0.2);
}

.overview-item:hover * { color: #fff !important; }

.overview-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.4s ease;
}

.overview-item h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    transition: color 0.4s ease;
}

/* ============================================================
   Course Cards
   ============================================================ */
.courses-section {
    padding: 100px 20px;
    background: var(--light-color);
}

.course-card {
    max-width: 1200px;
    margin: 0 auto 60px;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    transition: all 0.4s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(0,0,0,0.12);
}

.course-card:nth-child(even) { direction: rtl; }
.course-card:nth-child(even) > * { direction: ltr; }

.course-image {
    position: relative;
    min-height: 350px;
    overflow: hidden;
}

.course-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img { transform: scale(1.1); }

.course-badge {
    position: absolute;
    top: 20px; left: 20px;
    background: var(--gradient-2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.course-card:nth-child(even) .course-badge { left: auto; right: 20px; }

.course-content {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-content h3 i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.course-content .subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.course-content p {
    color: #555;
    margin-bottom: 25px;
    line-height: 1.9;
}

.course-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.course-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 0.95rem;
}

.course-feature i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.course-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--gradient-1);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content;
}

.course-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(26, 95, 122, 0.3);
    color: #fff;
}

/* ============================================================
   Comparison Table
   ============================================================ */
.comparison-section {
    padding: 100px 20px;
    background: #fff;
}

.comparison-table-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.comparison-table thead { background: var(--gradient-1); color: #fff; }

.comparison-table th {
    padding: 25px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.comparison-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #555;
}

.comparison-table tbody tr:hover { background: rgba(26, 95, 122, 0.05); }

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--dark-color);
    text-align: left;
    background: var(--light-color);
}

.comparison-table .check {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.comparison-table .highlight-col { background: rgba(255,107,53,0.08); }

/* ============================================================
   Why Choose（課程頁版 — 深色背景）
   ============================================================ */
.why-section {
    padding: 100px 20px;
    background: var(--gradient-1);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.why-section::before {
    content: '🏓';
    position: absolute;
    font-size: 400px;
    opacity: 0.05;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
}

.why-section .section-title h2 { color: #fff; }
.why-section .section-title h2::after { background: var(--accent-color); }
.why-section .section-title p { color: rgba(255,255,255,0.9); }

.why-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.why-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-10px);
}

.why-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.why-card h3 { font-size: 1.3rem; margin-bottom: 15px; }
.why-card p { opacity: 0.9; font-size: 0.95rem; line-height: 1.7; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section {
    padding: 100px 20px;
    background: var(--light-color);
}

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

.faq-item {
    background: #fff;
    margin-bottom: 15px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.faq-question:hover { color: var(--primary-color); }
.faq-question i { transition: transform 0.3s ease; color: var(--secondary-color); }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-content { padding: 0 30px 25px; color: #555; line-height: 1.8; }
.faq-item.active .faq-answer { max-height: 500px; }

/* ============================================================
   Price / Schedule（課程詳細）
   ============================================================ */
.price-section {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.price-section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary-color);
}

.price-table-wrapper { overflow-x: auto; }

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.price-table th,
.price-table td {
    padding: 15px 20px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.price-table th { background: var(--gradient-1); color: #fff; font-weight: 600; }
.price-table td { background: #fafafa; }
.price-table tr:hover td { background: #f0f7fa; }
.price-table .highlight-row td { background: #fff8e1; }
.price-table .highlight-row:hover td { background: #fff3cd; }

.promo-box {
    background: var(--gradient-2);
    color: #fff;
    padding: 25px 30px;
    border-radius: 15px;
    margin: 25px 0;
}

.promo-box h4 { margin-bottom: 15px; font-size: 1.2rem; }
.promo-box ul { list-style: none; padding: 0; }
.promo-box li { padding: 8px 0; font-size: 1.05rem; }

.course-note {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    margin-top: 20px;
}

.course-note h4 { color: var(--primary-color); margin-bottom: 10px; }
.course-note ul { margin: 0; padding-left: 20px; }
.course-note li { padding: 5px 0; color: #666; }

.schedule-section {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.schedule-section h3 { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 10px; }
.schedule-note { color: #666; margin-bottom: 25px; }
.schedule-table-wrapper { overflow-x: auto; }

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.schedule-table th,
.schedule-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.85rem;
    vertical-align: top;
}

.schedule-table th { background: #4a5568; color: #fff; font-weight: 600; }
.schedule-table td { background: #f7f7f7; min-height: 60px; }
.schedule-table .class-blue { background: #e3f2fd; color: #1565c0; font-weight: 500; }
.schedule-table .class-orange { background: #fff3e0; color: #e65100; font-weight: 500; }

/* CTA（課程頁底部） */
.courses-cta {
    background: var(--gradient-1);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    color: #fff;
}

.courses-cta h3 { font-size: 2rem; margin-bottom: 15px; }
.courses-cta p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.9; }
.cta-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .overview-grid { grid-template-columns: repeat(3, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .course-card { grid-template-columns: 1fr; }
    .course-card:nth-child(even) { direction: ltr; }
    .course-card:nth-child(even) .course-badge { left: 20px; right: auto; }
}

@media (max-width: 768px) {
    .overview-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: 1fr; }
    .course-content { padding: 30px; }
    .course-features { grid-template-columns: 1fr; }
    .comparison-table th,
    .comparison-table td { padding: 15px 10px; font-size: 0.85rem; }
    .price-section, .schedule-section { padding: 25px 15px; }
}

@media (max-width: 480px) {
    .overview-grid { grid-template-columns: 1fr 1fr; }
    .overview-item:last-child { grid-column: span 2; }
}
