/*
Theme Name: Rays Chinese Class
Theme URI: https://www.rayschineseclass.com
Author: Rays Chinese Class
Author URI: https://www.rayschineseclass.com
Description: A custom WordPress theme for Rays Chinese Class - Learn Chinese with daily lessons, pinyin, English translations, and audio pronunciation.
Version: 2.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rays-chinese
Tags: education, chinese, language-learning, bilingual
*/

/* ========================================
   RESET & BASE
   ======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Lora', serif;
    background-color: #ffffff;
    color: #3d2f3d;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

button, a, input, select, textarea {
    font-family: 'Poppins', sans-serif;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e8dce8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-logo-text h1 {
    font-size: 1.1rem;
    color: #6B3E5D;
    margin: 0;
    line-height: 1.2;
}

.nav-logo-text p {
    font-size: 0.62rem;
    color: #6B3E5D;
    opacity: 0.7;
    margin: 0;
}

/* WordPress Nav Menu */
.nav-menu-wrap {
    display: flex;
    align-items: center;
}

.nav-menu-wrap .menu {
    display: flex;
    list-style: none;
    gap: 0.2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu-wrap .menu li {
    position: relative;
}

.nav-menu-wrap .menu li a {
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6B3E5D;
    text-decoration: none;
    text-align: center;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    line-height: 1.3;
    white-space: nowrap;
}

.nav-menu-wrap .menu li a:hover {
    background: rgba(107, 62, 93, 0.08);
    color: #5a3350;
}

.nav-menu-wrap .menu li.current-menu-item a,
.nav-menu-wrap .menu li.current_page_item a {
    background: rgba(107, 62, 93, 0.1);
    color: #5a3350;
}

/* Sub-menu */
.nav-menu-wrap .menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e8dce8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 180px;
    padding: 0.4rem 0;
    list-style: none;
    z-index: 100;
}

.nav-menu-wrap .menu li:hover > .sub-menu {
    display: block;
}

.nav-menu-wrap .menu .sub-menu li a {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    text-align: left;
    border-radius: 0;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    margin-left: 0.5rem;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background-color: #6B3E5D;
    border-radius: 2px;
    transition: all 0.3s;
    display: block;
}

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

/* Mobile Menu */
.mobile-menu-wrap {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e8dce8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 40;
}

.mobile-menu-wrap.active { display: block; }

.mobile-menu-wrap .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-wrap .menu li a {
    display: block;
    padding: 0.9rem 1.2rem;
    color: #6B3E5D;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.mobile-menu-wrap .menu li a:hover { background-color: #f9f7f9; }
.mobile-menu-wrap .menu li:last-child a { border-bottom: none; }

.mobile-menu-wrap .menu .sub-menu {
    list-style: none;
    padding: 0;
}

.mobile-menu-wrap .menu .sub-menu li a {
    padding-left: 2.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #8a6a8a;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background-size: cover;
    background-position: center;
    padding: 4rem 1rem;
    text-align: center;
    color: white;
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.hero-en {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
    opacity: 0.85 !important;
}

.hero .subtitle {
    font-size: 0.95rem !important;
    margin-bottom: 0.25rem !important;
    opacity: 0.85 !important;
}

.subtitle-en {
    font-size: 0.85rem !important;
    margin-bottom: 1.5rem !important;
    opacity: 0.8 !important;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #d4a574;
    color: #3d2f3d;
    text-decoration: none;
    border: none;
    border-radius: 0.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.btn .en-btn {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.2rem;
}

.btn:hover {
    background-color: #c49563;
    color: #3d2f3d;
    transform: translateY(-1px);
}

/* ========================================
   MOTTO SECTION
   ======================================== */
.motto {
    padding: 2.5rem 1rem;
    background: linear-gradient(135deg, rgba(107, 62, 93, 0.95) 0%, rgba(107, 62, 93, 0.85) 100%);
    color: white;
    text-align: center;
    border-top: 3px solid #d4a574;
    border-bottom: 3px solid #d4a574;
}

.motto-text {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.8;
    max-width: 48rem;
    margin: 0 auto;
}

.motto-text .cn {
    display: block;
    margin-bottom: 0.75rem;
    font-family: 'Playfair Display', serif;
}

.motto-text .en {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features {
    padding: 3.5rem 1rem;
    background-color: #ffffff;
}

.features .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.features .section-header h3 {
    font-size: 1.875rem;
    color: #6B3E5D;
    margin-bottom: 0.25rem;
}

.features .section-header h3 .en {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.features-intro {
    text-align: center;
    color: #7a6a7a;
    max-width: 42rem;
    margin: 0 auto;
}

.features-intro .cn { display: block; margin-bottom: 0.75rem; }
.features-intro .en { display: block; font-size: 0.95rem; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border: 1px solid #e8dce8;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.feature-card .icon { font-size: 3rem; margin-bottom: 1rem; }

.feature-card h4 {
    font-size: 1.125rem;
    color: #6B3E5D;
    margin-bottom: 0.25rem;
}

.feature-card h4 .en {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: #7a6a7a;
    line-height: 1.6;
}

/* ========================================
   DAILY CTA CARD
   ======================================== */
.daily-cta-card {
    margin: 3rem auto;
    background: linear-gradient(135deg, #6B3E5D 0%, #8B5A7F 100%);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    color: white;
    box-shadow: 0 8px 24px rgba(107, 62, 93, 0.3);
    max-width: 56rem;
    border: 3px solid #d4a574;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(107, 62, 93, 0.3); }
    50% { box-shadow: 0 12px 32px rgba(107, 62, 93, 0.5); }
}

.daily-cta-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.daily-cta-card h3 .en {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.daily-cta-card p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.daily-cta-card p .cn { display: block; margin-bottom: 0.75rem; }
.daily-cta-card p .en { display: block; font-size: 1rem; }

.daily-cta-card .btn {
    background-color: #d4a574;
    color: #3d2f3d;
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    padding: 3.5rem 1rem;
    background-color: #ffffff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 56rem;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.875rem;
    color: #6B3E5D;
    margin-bottom: 1rem;
}

.about-text h3 .en {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.about-text p {
    color: #7a6a7a;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p .cn { display: block; margin-bottom: 0.75rem; }
.about-text p .en { display: block; font-size: 0.95rem; }

.about-image img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ========================================
   YOUTUBE SECTION
   ======================================== */
.youtube-promo {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #ff0000 0%, #c41e3a 100%);
    color: white;
}

.youtube-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    max-width: 56rem;
    margin: 0 auto;
}

.youtube-text h3 {
    font-size: 1.875rem;
    color: white;
    margin-bottom: 0.5rem;
}

.youtube-text h3 .en {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.youtube-text p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.youtube-text p .cn { display: block; margin-bottom: 0.75rem; }
.youtube-text p .en { display: block; font-size: 0.95rem; }

.youtube-btn { background-color: white; color: #ff0000; font-weight: 700; }
.youtube-btn:hover { background-color: #f0f0f0; color: #ff0000; }

.youtube-icon {
    font-size: 4rem;
    text-align: center;
    opacity: 0.9;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta {
    padding: 3rem 1rem;
    background-color: #6B3E5D;
    color: white;
    text-align: center;
}

.cta h3 {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
    color: white;
}

.cta h3 .en {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta .btn { background-color: #d4a574; color: #3d2f3d; }

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background-color: #3d2f3d;
    color: white;
    padding: 2.5rem 1rem 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 56rem;
    margin: 0 auto 2rem;
}

.footer-section h4 { font-weight: 600; margin-bottom: 1rem; font-size: 1rem; }

.footer-section p,
.footer-section a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover { color: white; }

.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 0.5rem; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* ========================================
   ABOUT PAGE TEMPLATE
   ======================================== */
.about-page-hero {
    background: linear-gradient(135deg, #6B3E5D 0%, #8B5A7F 50%, #6B3E5D 100%);
    padding: 4rem 1rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.about-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><rect fill="none" stroke="rgba(212,165,116,0.08)" width="60" height="60"/></svg>');
    background-size: 60px 60px;
}

.about-page-hero .container { position: relative; z-index: 2; }

.about-page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: white;
}

.about-page-hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.about-page-content {
    max-width: 52rem;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.about-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3.5rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid #e8dce8;
}

.about-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.about-block.reverse { direction: rtl; }
.about-block.reverse > * { direction: ltr; }

.about-block-text h2 {
    font-size: 1.6rem;
    color: #6B3E5D;
    margin-bottom: 0.75rem;
}

.about-block-text h2 .en {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
    color: #8a6a8a;
}

.about-block-text p {
    color: #5a4a5a;
    line-height: 1.9;
    margin-bottom: 1rem;
}

.about-block-visual {
    text-align: center;
    font-size: 5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(107,62,93,0.05), rgba(212,165,116,0.1));
    border-radius: 1rem;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
}

.about-value-card {
    background: white;
    border: 1px solid #e8dce8;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.3s;
}

.about-value-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.about-value-card .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.about-value-card h4 {
    font-size: 1.05rem;
    color: #6B3E5D;
    margin-bottom: 0.5rem;
}

.about-value-card p { font-size: 0.85rem; color: #7a6a7a; line-height: 1.6; }

.about-cta-section {
    background: linear-gradient(135deg, #6B3E5D, #8B5A7F);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    color: white;
    margin-top: 2rem;
}

.about-cta-section h3 { color: white; font-size: 1.6rem; margin-bottom: 0.75rem; }
.about-cta-section p { opacity: 0.9; margin-bottom: 1.5rem; font-size: 1.05rem; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .nav-menu-wrap { display: none; }
    .hamburger { display: flex; }
    .nav-logo-text p { display: none; }

    .hero h2 { font-size: 1.875rem; }
    .hero { padding: 3rem 1rem; min-height: auto; }

    .motto-text { font-size: 1.25rem; }
    .motto-text .en { font-size: 1rem; }

    .features .section-header h3 { font-size: 1.5rem; }

    /* 鈽呪槄鈽� 鎵嬫満绔崱鐗囷細寮哄埗涓€鎺掍袱涓� 鈽呪槄鈽� */
    .features-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .feature-card {
        min-width: 0 !important;
        overflow: hidden;
        padding: 1rem 0.75rem;
        word-break: break-word;
    }
    .feature-card .icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    .feature-card h4 {
        font-size: 0.95rem;
        margin-bottom: 0.15rem;
    }
    .feature-card h4 .en {
        font-size: 0.72rem;
        margin-top: 0.1rem;
    }
    .feature-card p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    /* 鈽呪槄鈽� 缁撴潫 鈽呪槄鈽� */

    .daily-cta-card { padding: 1.5rem; margin: 2rem 1rem; }
    .daily-cta-card h3 { font-size: 1.5rem; }

    .about-content { grid-template-columns: 1fr; }
    .youtube-content { grid-template-columns: 1fr; }
    .youtube-icon { font-size: 3rem; }
    .footer-content { grid-template-columns: 1fr; }

    .about-page-hero h1 { font-size: 1.8rem; }
    .about-block { grid-template-columns: 1fr; gap: 1.5rem; }
    .about-block.reverse { direction: ltr; }
    .about-values { grid-template-columns: 1fr; }
}