/* ============================================================
   飛燁乒乓球會 FeiIp Table Tennis Club
   main.css — 全站共用樣式
   載入順序：main.css → [page].css
   ============================================================ */

/* CSS Variables */
:root {
    --primary-color: #1a5f7a;
    --secondary-color: #ff6b35;
    --accent-color: #f7c244;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --gradient-1: linear-gradient(135deg, #1a5f7a 0%, #2d8bb8 100%);
    --gradient-2: linear-gradient(135deg, #ff6b35 0%, #f7c244 100%);
    --gradient-gold: linear-gradient(135deg, #f7c244 0%, #e6a817 50%, #b8860b 100%);
    --gold-color: #e6a817;
    --success-color: #27ae60;
    --error-color: #e74c3c;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.8;
    color: #333;
    overflow-x: hidden;
}

/* ============================================================
   Header
   ============================================================ */
header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 5px 0;
    box-shadow: 0 5px 30px rgba(0,0,0,0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo img {
    height: 60px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text span {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
}

/* ============================================================
   Navigation
   ============================================================ */
nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    padding: 10px 13px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    font-size: 0.93rem;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    background: rgba(26, 95, 122, 0.1);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 60%;
}

/* ============================================================
   Hamburger Menu (Mobile)
   ============================================================ */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: var(--gradient-1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(26, 95, 122, 0.3);
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

/* ============================================================
   Mobile Menu
   ============================================================ */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 95, 122, 0.98);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    list-style: none;
    text-align: center;
}

.mobile-menu ul li {
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu.active ul li { opacity: 1; transform: translateY(0); }
.mobile-menu.active ul li:nth-child(1)  { transition-delay: 0.1s; }
.mobile-menu.active ul li:nth-child(2)  { transition-delay: 0.2s; }
.mobile-menu.active ul li:nth-child(3)  { transition-delay: 0.3s; }
.mobile-menu.active ul li:nth-child(4)  { transition-delay: 0.4s; }
.mobile-menu.active ul li:nth-child(5)  { transition-delay: 0.5s; }
.mobile-menu.active ul li:nth-child(6)  { transition-delay: 0.6s; }
.mobile-menu.active ul li:nth-child(7)  { transition-delay: 0.7s; }
.mobile-menu.active ul li:nth-child(8)  { transition-delay: 0.8s; }
.mobile-menu.active ul li:nth-child(9)  { transition-delay: 0.9s; }
.mobile-menu.active ul li:nth-child(10) { transition-delay: 1.0s; }

.mobile-menu ul li a {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 30px;
    display: block;
    transition: all 0.3s ease;
}

.mobile-menu ul li a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* ============================================================
   Banner Slider（首頁 + 活動頁共用）
   ============================================================ */
.slider-container {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px;
    overflow: hidden;
    margin-top: 80px;
}

.slider {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.slider.no-transition {
    transition: none;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.85) 0%, rgba(45, 139, 184, 0.7) 100%);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    width: 90%;
    max-width: 800px;
}

.slide-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.slider-nav span {
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-nav span:hover,
.slider-nav span.active {
    background: #fff;
    transform: scale(1.2);
}

/* ============================================================
   通用容器（CMS 內容及簡易頁面使用）
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   通用 CTA Section（所有內頁底部 CTA）
   ============================================================ */
.cta-section {
    padding: 100px 20px;
    background: #fff;
    text-align: center;
}
.cta-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.cta-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .cta-btn {
    margin: 6px 8px;
}

/* ============================================================
   Page Hero（所有內頁共用）+ 各頁背景圖
   ============================================================ */
.page-hero {
    background: var(--gradient-1);
    padding: 180px 20px 100px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.page-hero::before {
    display: none;
}

.page-hero::after {
    content: '🏓';
    position: absolute;
    font-size: 300px;
    opacity: 0.05;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInDown 1s ease;
}

.page-hero .subtitle {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.page-hero .breadcrumb {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.3s backwards;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: rgba(255,255,255,0.6);
    margin-right: 6px;
}

.page-hero .breadcrumb-nav { position: relative; z-index: 1; }

.page-hero .breadcrumb a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.page-hero .breadcrumb-item { color: rgba(255,255,255,0.9); }

.page-hero .breadcrumb a:hover { opacity: 0.8; }

/* ── 各頁 Hero 背景圖（以圖片+漸層蓋過原 gradient） ──────────── */
.page-hero.hero-about,
.page-hero.hero-coaches,
.page-hero.hero-courses,
.page-hero.hero-videos,
.page-hero.hero-activities,
.page-hero.hero-awards,
.page-hero.hero-register,
.page-hero.hero-contact,
.page-hero.hero-blog,
.page-hero.hero-sitemap {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.page-hero.hero-about      { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/h01.jpg'); }
.page-hero.hero-coaches    { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/t01.jpg'); }
.page-hero.hero-courses    { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/a01.jpg'); }
.page-hero.hero-videos     { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/a02.jpg'); }
.page-hero.hero-activities { background-image: linear-gradient(135deg, rgba(26,95,122,.95), rgba(45,139,184,.90)), url('/photo/y01.jpg'); }
.page-hero.hero-awards     { background-image: linear-gradient(135deg, rgba(26,95,122,.90), rgba(13,61,77,.85)),    url('/photo/z01.jpg'); }
.page-hero.hero-register   { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/a03.jpg'); }
.page-hero.hero-contact    { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/a04.jpg'); }
.page-hero.hero-blog       { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/a05.jpg'); }
.page-hero.hero-sitemap    { background-image: linear-gradient(135deg, rgba(26,95,122,.88), rgba(45,139,184,.78)), url('/photo/h01.jpg'); }

/* ============================================================
   Section Title（共用）
   ============================================================ */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 20px auto 0;
}

/* ============================================================
   CTA Button（共用）
   ============================================================ */
.cta-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gradient-2);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
    color: #fff;
}

.cta-btn.secondary {
    background: var(--gradient-1);
    box-shadow: 0 5px 20px rgba(26, 95, 122, 0.4);
}

.cta-btn.secondary:hover {
    box-shadow: 0 8px 30px rgba(26, 95, 122, 0.5);
}

.cta-btn i { margin-right: 10px; }

/* ============================================================
   SEO Content Block（共用）
   ============================================================ */
.seo-content {
    padding: 100px 20px;
    background: var(--light-color);
}

.seo-container {
    max-width: 900px;
    margin: 0 auto;
}

.seo-container article {
    background: #fff;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.seo-container h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--light-color);
}

.seo-container h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 35px 0 20px;
}

.seo-container p {
    color: #555;
    font-size: 1.05rem;
    margin-bottom: 20px;
    text-align: justify;
    line-height: 2;
}

.seo-container ul {
    margin: 20px 0 30px 20px;
}

.seo-container ul li {
    color: #555;
    margin-bottom: 12px;
    padding-left: 10px;
}

.seo-container ul li::marker {
    color: var(--secondary-color);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--dark-color);
    color: #fff;
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 50px; height: 3px;
    background: var(--secondary-color);
}

.footer-col p,
.footer-col > a {
    color: #aaa;
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col p a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline;
}

.footer-col a:hover,
.footer-col p a:hover { color: var(--secondary-color); }

.footer-col i {
    margin-right: 8px;
    color: var(--secondary-color);
    width: 16px;
    text-align: center;
}

.social-links,
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a,
.footer-social a {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.social-links a:hover,
.footer-social a:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.social-links a i,
.footer-social a i {
    margin: 0;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
}

/* ============================================================
   WhatsApp Floating Button
   ============================================================ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.whatsapp-float i { margin: 0; }

/* ============================================================
   Animations
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.1); opacity: 0.8; }
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.float-animation { animation: float 3s ease-in-out infinite; }

/* ============================================================
   Responsive — Header / Nav / Common
   ============================================================ */
@media (max-width: 768px) {
    nav { display: none; }

    .hamburger { display: flex; }

    .mobile-menu { display: block; }

    .slider-container {
        height: 70vh;
        margin-top: 70px;
    }

    .slide-content h1 { font-size: 2rem; }
    .slide-content p  { font-size: 1rem; }

    .page-hero { padding: 150px 20px 80px; }
    .page-hero h1 { font-size: 2rem; }

    .section-title h2 { font-size: 1.8rem; }

    .logo-text { font-size: 1rem; }
    .logo img  { height: 50px; }

    .whatsapp-float {
        width: 50px; height: 50px;
        bottom: 20px; right: 20px;
        font-size: 24px;
    }

    .seo-container article { padding: 30px 20px; }

    .cta-btn {
        display: block;
        margin: 10px auto;
        max-width: 280px;
        text-align: center;
    }
}