@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #d32f2f;
    --primary-dark: #b71c1c;
    --secondary-color: #ffc107;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --radius: 8px;
    --container-width: 1200px;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Noto Sans TC', sans-serif;
    background-color: #f0f2f5;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header Styles */
.top-header {
    background-color: #ffc107;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
}

.contact-info p {
    margin: 0;
    font-size: 14px;
}

.cta-button {
    background-color: #d32f2f;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #b71c1c;
}

/* Header Styles */
.header {
    background-color: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 60px;
    width: auto;
}

.header-contact-info {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.header-contact-info p {
    margin: 2px 0;
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

.header-contact-info .contact-icon {
    font-size: 1rem;
    line-height: 1;
    margin-right: 6px;
}

/* Navigation Menu */
.main-nav {
    background-color: var(--primary-color);
    padding: 0 40px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 15px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    background-color: var(--primary-dark);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Training Hero - with subtle image overlay */
.hero-section.training {
    background: linear-gradient(135deg, rgba(211,47,47,0.95), rgba(255,193,7,0.95));
}

/* Material Icons baseline styles */
.material-symbols-outlined {
    font-variation-settings:
      'FILL' 0,
      'wght' 300,
      'GRAD' 0,
      'opsz' 24;
    color: var(--white);
}

.course-type h4 .material-symbols-outlined {
    color: var(--primary-color);
    vertical-align: middle;
    margin-right: 6px;
}

.timetable-title .material-symbols-outlined {
    color: var(--primary-color);
}

/* CTA Bar */
.cta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: var(--light-gray);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 20px;
}

.cta-bar .cta-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
    font-weight: 500;
}

.cta-bar .material-symbols-outlined {
    color: var(--primary-color);
}

.cta-bar .cta-button {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-bar .cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Main Content Layout */
.content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.content {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: block; /* Ensure content is not flex container */
}

/* Cards & Sections */
.section-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-content {
    padding: 25px;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Overwrite existing club-intro to look like a card if needed, or deprecate it */
.club-intro {
    background-color: var(--white);
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 40px;
}

.club-intro h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    .header-contact-info {
        text-align: center;
        margin-top: 15px;
    }
}

/* Layout Wrapper */
.content-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 600px;
}

/* Left Navigation Menu */
.left-nav {
    width: 200px;
    background-color: #d32f2f;
    flex-shrink: 0;
}

.left-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-nav li {
    margin: 0;
    border-bottom: 1px solid #b71c1c;
}

.left-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.left-nav a:hover {
    background-color: #b71c1c;
    padding-left: 25px; /* Slight movement effect */
}

/* Main Content Layout */
.content {
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.form-group input[type="checkbox"] {
    margin-right: 5px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Club Introduction */
.club-intro {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.club-intro h2 {
    color: #d32f2f;
    font-size: 1.5em;
    margin-bottom: 15px;
    text-align: center;
}

.club-intro p {
    text-align: justify;
    line-height: 1.8;
}

/* News Section */
.news-section {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
}

.news-section h2 {
    color: #d32f2f;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.news-item {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h3 {
    color: #1976d2;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.news-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Contact Form Styles */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.submit-button {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #b71c1c;
}

.social-link {
    color: #1976d2;
    text-decoration: none;
    transition: color 0.3s;
}

.social-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* Footer Styles */
.footer {
    background-color: #f8f8f8;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .login-section,
    .course-categories,
    .playgroup-section {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        margin: 0;
        box-shadow: none;
    }
    
    .top-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .nav-menu ul {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu a {
        padding: 10px;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .login-section,
    .course-categories,
    .playgroup-section {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 15px;
    }
    
    .club-intro,
    .news-section {
        padding: 15px;
    }
    
    .club-intro h2,
    .news-section h2 {
        font-size: 1.3em;
    }
}

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table {
    min-width: 640px;
}

/* Mobile stacking for compact form rows */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
}

/* Course Types as Cards */
.course-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.course-type {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

.course-type:hover {
    transform: translateY(-5px);
}

.course-type h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.course-type ul {
    padding-left: 20px;
    color: #555;
}

.course-type li {
    margin-bottom: 5px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--primary-color) !important; /* Override inline styles if needed */
    color: var(--white);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:hover {
    background-color: var(--light-gray);
}

/* Footer Styles */
.footer {
    background-color: #333;
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 20px;
    }
    
    .header-contact-info {
        text-align: center;
        margin-top: 15px;
    }
    
    .main-nav {
        padding: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav a {
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .content {
        padding: 20px;
    }
}
/* Club Services: Cards and Sections */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.service-card {
    background: #ffffff;
    border: 1px solid #eaeef3;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.service-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
}

.service-card p {
    margin: 0 0 10px;
    color: #334155;
    line-height: 1.6;
}

.service-card .service-link {
    display: inline-block;
    margin-top: 4px;
    color: #1a73e8;
    font-weight: 600;
    text-decoration: none;
}

.service-card .service-link:hover {
    text-decoration: underline;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 12px 0 24px;
}

.feature-card {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 14px 16px;
}

.feature-card h4 {
    margin: 0 0 6px;
    font-size: 17px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.process-step {
    background: #ffffff;
    border: 1px solid #eaeef3;
    border-radius: 12px;
    padding: 14px 16px;
}

.process-step h4 {
    margin: 0 0 6px;
    font-size: 17px;
}

.faq {
    margin: 20px 0;
}

.faq details {
    background: #ffffff;
    border: 1px solid #eaeef3;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 768px) {
    .process-steps {
        grid-template-columns: 1fr;
    }
}

