/* ===== 然合教育 - 共享样式 ===== */

:root {
    --primary: #7A933E;
    --primary-light: #B0C96B;
    --bg-light: #F2F7E9;
    --accent: #E8A840;
    --text: #2C2C2C;
    --text-secondary: #666;
    --text-muted: #999;
    --white: #FFFFFF;
    --border: #E8E8E8;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--white);
}

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

ul {
    list-style: none;
}

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

.img-rounded {
    border-radius: var(--radius);
}

.img-shadow {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.img-banner {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.course-img {
    width: 100%;
    border-radius: var(--radius);
    margin-top: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

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

/* ===== Header ===== */
.header-top {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-img {
    height: 52px;
    width: auto;
}

.logo-text h1 {
    font-size: 20px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-contact .phone-icon {
    width: 42px;
    height: 42px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

.header-contact h3 {
    font-size: 17px;
    color: var(--accent);
    font-weight: 700;
}

.header-contact .sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Navigation ===== */
.navbar {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-menu a {
    display: block;
    padding: 15px 22px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

/* ===== Page Banner (Shared for all inner pages) ===== */
.page-banner {
    position: relative;
    background: var(--primary);
    min-height: 240px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.page-banner-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    width: 100%;
    min-height: 240px;
    position: relative;
    z-index: 2;
}

.page-banner-text {
    padding: 50px 50px 50px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-banner-text h1 {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    line-height: 1.2;
    letter-spacing: 1px;
}

.page-banner-text .breadcrumb {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}

.page-banner-text .breadcrumb a {
    color: var(--accent);
}

.page-banner-text .breadcrumb span {
    margin: 0 6px;
    opacity: 0.5;
}

.page-banner-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
    max-width: 420px;
    padding-left: 14px;
    border-left: 2px solid rgba(255,255,255,0.25);
}

.page-banner-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    height: 100%;
    overflow: hidden;
}

.page-banner-visual-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, #F0D78C 0%, #E8A840 100%);
    clip-path: polygon(22% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
}

.page-banner-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

.page-banner-photo {
    position: relative;
    z-index: 2;
    width: 180px;
    height: 200px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0,0,0,0.16);
    background: #fff;
}

.page-banner-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-banner-decor {
    position: absolute;
    top: 20px;
    left: 52%;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 2px, transparent 2px);
    background-size: 14px 14px;
    z-index: 1;
}

@media (max-width: 768px) {
    .page-banner-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .page-banner-text {
        padding: 36px 20px;
        text-align: center;
        align-items: center;
    }
    .page-banner-text h1 {
        font-size: 26px;
    }
    .page-banner-desc {
        max-width: 100%;
        border-left: none;
        border-bottom: 2px solid rgba(255,255,255,0.2);
        padding: 0 0 10px 0;
    }
    .page-banner-visual {
        min-height: 200px;
        order: -1;
    }
    .page-banner-visual-bg {
        clip-path: polygon(0% 18%, 100% 0%, 100% 100%, 0% 82%);
    }
    .page-banner-photo {
        width: 140px;
        height: 155px;
    }
    .page-banner-decor {
        display: none;
    }
}

/* ===== Section Title ===== */
.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 30px;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title h2 span {
    color: var(--primary);
}

.section-title .subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-title .divider {
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: #6A8235;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(122,147,62,0.3);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: #D49830;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232,168,64,0.3);
}

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

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

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

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}

/* ===== Feature Grid ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Two Column Layout ===== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

/* ===== Section ===== */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--bg-light);
    padding: 80px 0;
}

/* ===== Steps Timeline ===== */
.steps-list {
    max-width: 800px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.step-num {
    min-width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    flex: 1;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.step-content ul {
    margin-top: 10px;
}

.step-content ul li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
    line-height: 1.7;
}

.step-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
}

/* ===== Comparison Table ===== */
.compare-table-wrap {
    overflow-x: auto;
    margin: 30px 0;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.compare-table th {
    background: var(--primary);
    color: white;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.compare-table td {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table tr:nth-child(even) td {
    background: var(--bg-light);
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    padding: 20px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition);
    color: var(--text);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question .icon {
    font-size: 20px;
    transition: transform var(--transition);
    color: var(--primary);
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.9;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer li {
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.faq-answer li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    background: var(--primary-light);
    border-radius: 50%;
}

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border);
}

.contact-info-item {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.contact-info-item .ci-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-info-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(122,147,62,0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background: #3A4A1A;
    color: rgba(255,255,255,0.85);
    padding: 56px 0 0;
}

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

.footer-brand h3 {
    font-size: 19px;
    margin-bottom: 14px;
    color: white;
}

.footer-brand p {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--accent);
    font-weight: 600;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 13px;
    opacity: 0.75;
    transition: opacity var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
    line-height: 2;
}

/* ===== Floating Panel ===== */
.floating-panel {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    width: 54px;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    border-radius: 10px 0 0 10px;
    margin-bottom: 4px;
    position: relative;
}

.fp-item:hover {
    width: 120px;
    transform: translateX(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-radius: 10px 0 0 10px;
}

.fp-item i {
    font-size: 20px;
    flex-shrink: 0;
    min-width: 22px;
    text-align: center;
}

.fp-item span {
    opacity: 0;
    transition: opacity 0.25s ease;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.fp-item:hover span {
    opacity: 1;
}

/* 电话 */
.fp-tel {
    background: linear-gradient(135deg, #E8A840, #D4942A);
}

/* 公众号 */
.fp-wechat {
    background: linear-gradient(135deg, #7A933E, #5A7A25);
}

/* 小程序 */
.fp-miniapp {
    background: linear-gradient(135deg, #3B6FB6, #2E5C9E);
}

/* 在线咨询 */
.fp-contact {
    background: linear-gradient(135deg, #A0407A, #8A306A);
}

/* 返回顶部 */
.fp-top {
    background: linear-gradient(135deg, #666, #444);
    margin-top: 12px;
    border-radius: 10px 0 0 10px;
}

/* QR 弹出卡片 */
.fp-item .fp-qr {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    text-align: center;
    min-width: 180px;
}

.fp-item:hover .fp-qr {
    opacity: 1;
    pointer-events: auto;
}

.fp-qr img {
    width: 150px;
    height: 150px;
    display: block;
    border-radius: 8px;
    border: 1px solid #eee;
    object-fit: contain;
}

.fp-qr p {
    margin: 10px 0 0;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
}

/* QR popup arrow */
.fp-qr::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left: 8px solid white;
    border-right: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .floating-panel {
        right: 0;
        top: auto;
        bottom: 60px;
        transform: none;
    }
    .fp-item {
        padding: 10px 12px;
        width: 44px;
        border-radius: 8px 0 0 8px;
        margin-bottom: 3px;
    }
    .fp-item i {
        font-size: 18px;
        min-width: 18px;
    }
    .fp-item:hover {
        width: 48px;
        transform: translateX(-2px);
    }
    .fp-item span {
        display: none;
    }
    .fp-item:hover span {
        display: inline;
    }
    .fp-item .fp-qr {
        right: 60px;
        min-width: 150px;
        padding: 12px;
    }
    .fp-qr img {
        width: 120px;
        height: 120px;
    }
}

/* 兼容旧 class */
.floating-btns { display: none; }
.float-btn { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .two-col,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-banner h1 {
        font-size: 26px;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .section,
    .section-light {
        padding: 50px 0;
    }

    .nav-menu a {
        padding: 12px 14px;
        font-size: 13px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .header-contact h3 {
        font-size: 14px;
    }

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

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
