/* ========================================
   稳录教育 - 前台网站样式
   ======================================== */

/* --- Header --- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px 0; transition: var(--transition); }
.site-header.scrolled { background: rgba(255,255,255,.98); box-shadow: var(--shadow); padding: 10px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 24px; font-weight: 800; color: var(--white); text-decoration: none; }
.site-header.scrolled .site-logo { color: var(--gray-900); }
.site-logo span { color: var(--secondary); }
.main-nav { display: flex; gap: 4px; }
.main-nav > li { position: relative; }
.main-nav > li > a { display: block; padding: 10px 18px; color: rgba(255,255,255,.9); font-size: 15px; font-weight: 500; border-radius: var(--radius); transition: var(--transition); }
.site-header.scrolled .main-nav > li > a { color: var(--gray-700); }
.main-nav > li > a:hover, .main-nav > li > a.active { color: var(--white); background: rgba(255,255,255,.15); }
.site-header.scrolled .main-nav > li > a:hover, .site-header.scrolled .main-nav > li > a.active { color: var(--primary); background: var(--primary-light); }
.sub-nav { position: absolute; top: 100%; left: 0; min-width: 200px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: var(--transition); }
.main-nav > li:hover .sub-nav { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-nav li a { display: block; padding: 10px 20px; color: var(--gray-600); font-size: 14px; }
.sub-nav li a:hover { background: var(--gray-50); color: var(--primary); }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.mobile-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.site-header.scrolled .mobile-toggle span { background: var(--gray-700); }
@media (max-width: 768px) { .main-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow-lg); padding: 16px; flex-direction: column; max-height: calc(100vh - 64px); overflow-y: auto; } .main-nav.open { display: flex; } .main-nav > li > a { color: var(--gray-700) !important; } .sub-nav { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; padding-left: 16px; } .mobile-toggle { display: flex; } }

/* --- Hero Banner --- */
.hero-banner { position: relative; height: 100vh; min-height: 500px; max-height: 800px; overflow: hidden; }
.hero-banner .swiper-slide { position: absolute; inset: 0; height: 100vh; min-height: 500px; max-height: 800px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .6s ease; z-index: 1; }
.hero-banner .swiper-slide.active { opacity: 1; z-index: 2; position: relative; }
.hero-banner .slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-banner .slide-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.3) 100%); }
.hero-content { position: relative; z-index: 2; text-align: center; color: var(--white); max-width: 800px; padding: 0 20px; }
.hero-content h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero-content p { font-size: 20px; opacity: .9; margin-bottom: 32px; line-height: 1.6; }
.hero-content .btn-grp { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-indicators { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.hero-indicators span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: var(--transition); }
.hero-indicators span.active { background: var(--white); transform: scale(1.3); }
@media (max-width: 768px) { .hero-content h1 { font-size: 28px; } .hero-content p { font-size: 16px; } }

/* --- Section backgrounds --- */
.section-gray { background: var(--gray-50); }
.section-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); }
.section-primary .section-title h2, .section-primary .section-title p { color: var(--white); }

/* --- CTA Section --- */
.cta-section { text-align: center; padding: 80px 0; background: linear-gradient(135deg, var(--primary), #0d47a1); color: var(--white); }
.cta-section h2 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.cta-section p { font-size: 18px; opacity: .9; margin-bottom: 32px; }
.cta-section .btn-outline { border-color: var(--white); color: var(--white); }
.cta-section .btn-outline:hover { background: var(--white); color: var(--primary); }

/* --- Service Grid --- */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }

/* --- Case / News Grid --- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 768px) { .case-grid, .news-grid { grid-template-columns: 1fr; } }

/* --- Footer --- */
.site-footer { background: var(--gray-900); color: rgba(255,255,255,.7); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: var(--white); font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.footer-col p, .footer-col a { font-size: 14px; line-height: 2; color: rgba(255,255,255,.6); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; text-align: center; font-size: 13px; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.4); }

/* --- Floating Sidebar --- */
.floating-sidebar { position: fixed; right: 20px; bottom: 100px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.float-item { width: 48px; height: 48px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); cursor: pointer; transition: var(--transition); position: relative; }
.float-item:hover { transform: scale(1.1); background: var(--primary-dark); }
.float-label { position: absolute; right: 56px; background: var(--gray-800); color: var(--white); padding: 6px 12px; border-radius: 4px; font-size: 13px; white-space: nowrap; opacity: 0; visibility: hidden; transition: var(--transition); }
.float-item:hover .float-label { opacity: 1; visibility: visible; }
#backToTop { background: var(--gray-600); opacity: 0; visibility: hidden; transition: var(--transition); }
#backToTop.show { opacity: 1; visibility: visible; }
#backToTop:hover { background: var(--gray-700); }

/* --- AI Chat Widget --- */
.ai-chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 9999; }
.chat-toggle { width: 56px; height: 56px; background: linear-gradient(135deg, var(--primary), #0d47a1); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-lg); transition: var(--transition); position: relative; }
.chat-toggle:hover { transform: scale(1.1); }
.chat-toggle .icon { font-size: 24px; color: white; }
.chat-panel { position: absolute; bottom: 70px; right: 0; width: 360px; height: 520px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; }
.chat-header { padding: 16px 20px; background: var(--primary); color: var(--white); display: flex; justify-content: space-between; align-items: center; }
.chat-header h4 { font-size: 16px; }
.chat-close { background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 80%; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.chat-msg.bot { align-self: flex-start; background: var(--gray-100); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--primary); color: var(--white); border-bottom-right-radius: 4px; }
.chat-footer { padding: 12px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; }
.chat-footer input { flex: 1; padding: 10px 16px; border: 1px solid var(--gray-300); border-radius: 24px; font-size: 14px; outline: none; }
.chat-footer input:focus { border-color: var(--primary); }
.chat-footer button { padding: 10px 20px; background: var(--primary); color: var(--white); border: none; border-radius: 24px; cursor: pointer; font-weight: 600; }
.chat-lead { padding: 16px; background: var(--primary-light); border-top: 1px solid var(--gray-200); }
.chat-lead p { font-size: 13px; color: var(--gray-600); margin-bottom: 8px; }
.chat-lead input { width: 100%; padding: 8px 12px; margin-bottom: 8px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 13px; }
.chat-lead button { width: 100%; padding: 8px; background: var(--secondary); color: white; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; }

/* --- Self Test Wizard --- */
.self-test-wizard { max-width: 700px; margin: 0 auto; }
.steps { display: flex; justify-content: space-between; margin-bottom: 40px; position: relative; }
.steps::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: var(--gray-200); transform: translateY(-50%); }
.step { position: relative; z-index: 1; text-align: center; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin: 0 auto 8px; transition: var(--transition); }
.step.active .step-num { background: var(--primary); color: var(--white); }
.step.done .step-num { background: var(--success); color: var(--white); }
.step-label { font-size: 12px; color: var(--gray-400); }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step-content { display: none; }
.step-content.active { display: block; }
.step-content h3 { font-size: 24px; margin-bottom: 24px; }
.step-actions { display: flex; justify-content: space-between; margin-top: 32px; }

/* --- Responsive helper --- */
.page-header-bg { padding: 120px 0 60px; background: linear-gradient(135deg, var(--primary), #0d47a1); color: var(--white); text-align: center; }
.page-header-bg h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.page-header-bg p { font-size: 18px; opacity: .9; }
