/*
Theme Name: HAOJI GROUP Stripe
Theme URI: https://haojigroup.com
Author: HAOJI GROUP
Author URI: https://haojigroup.com
Description: HAOJI GROUP WordPress theme with Stripe payment integration for registered agent services. Bilingual (EN/ZH).
Version: 2.0.0
License: GPL v2
Text Domain: haoji
*/

/* ===== CSS Variables ===== */
:root {
  --c-navy: #001233;
  --c-cream: #F4F3EE;
  --c-sand: #EDDDD4;
  --c-slate: #5C677D;
  --c-red: #BC4749;
  --c-red-hover: #A33D3F;
  --c-green: #16A34A;
  --c-yellow: #F9DC5C;
  --c-amber: #E09F3E;
  --c-orange: #D8572A;
  --c-black: #0A0908;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 14px; line-height: 1.6; color: var(--c-navy); background: var(--c-cream); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ===== Utility ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.max-w-4 { max-width: 640px; }
.aspect-4-3 { aspect-ratio: 4/3; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; cursor: pointer; }
.btn-red { background: var(--c-red); color: #fff; }
.btn-red:hover { background: var(--c-red-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(188,71,73,0.3); }
.btn-yellow { background: var(--c-yellow); color: var(--c-black); }
.btn-yellow:hover { background: #FFE066; }
.btn-dark { background: var(--c-navy); color: var(--c-cream); }
.btn-dark:hover { background: #0B132B; }
.btn-outline { border: 1px solid var(--c-cream); color: var(--c-cream); background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-lg { padding: 16px 32px; font-size: 15px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ===== Cards ===== */
.card { background: var(--c-cream); border-radius: 12px; padding: 28px; border: 1px solid rgba(51,65,92,0.06); transition: all 0.3s ease; }
.card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.06); transform: translateY(-2px); }
.icon-box { width: 44px; height: 44px; border-radius: 10px; background: var(--c-navy); color: var(--c-yellow); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }

/* ===== Section ===== */
.section { padding: 80px 0; }
.bg-sand { background: var(--c-sand); }

/* ===== Navbar ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: all 0.3s ease; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; text-decoration: none; }
.nav-logo svg { flex-shrink: 0; }
.nav-links { display: none; align-items: center; gap: 0; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-link { padding: 8px 16px; font-size: 14px; font-weight: 500; transition: all 0.2s ease; display: inline-block; }
.dropdown-wrap { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--c-cream); border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s ease; z-index: 2000; }
.dropdown-wrap:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 20px; font-size: 13px; color: var(--c-navy); font-weight: 500; transition: all 0.15s ease; }
.dropdown-menu a:hover { background: rgba(0,18,51,0.04); }
.nav-cta { padding: 8px 16px; border-radius: 6px; background: var(--c-red); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; transition: all 0.3s ease; }
.nav-cta:hover { background: var(--c-red-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(188,71,73,0.3); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.mobile-toggle { display: block; background: none; border: none; padding: 8px; cursor: pointer; }
@media (min-width: 1024px) { .mobile-toggle { display: none; } }

/* Nav color states */
.navbar.transparent .nav-link { color: var(--c-cream); }
.navbar.transparent .nav-link:hover { background: rgba(255,255,255,0.1); }
.navbar.transparent .nav-phone { color: var(--c-cream); }
.navbar.transparent .nav-logo { color: var(--c-cream); }
.navbar.transparent .mobile-toggle { color: var(--c-cream); }
.navbar.scrolled { background: var(--c-sand); box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.navbar.scrolled .nav-link { color: var(--c-navy); }
.navbar.scrolled .nav-link:hover { background: rgba(0,18,51,0.06); }
.navbar.scrolled .nav-phone { color: var(--c-navy); }
.navbar.scrolled .nav-logo { color: var(--c-navy); }
.navbar.scrolled .mobile-toggle { color: var(--c-navy); }

/* ===== Mobile Menu ===== */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 2000; background: var(--c-sand); padding-top: 80px; overflow-y: auto; }
.mobile-menu.open { display: block; }
.mobile-menu .mobile-section { margin-bottom: 16px; }
.mobile-menu .mobile-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--c-slate); margin-bottom: 8px; }
.mobile-menu a { display: block; padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--c-navy); border-bottom: 1px solid rgba(51,65,92,0.1); }
.mobile-menu .mobile-cta { display: block; margin-top: 20px; padding: 14px 24px; background: var(--c-red); color: #fff; text-align: center; border-radius: 8px; font-weight: 600; border: none; }

/* ===== Page Header ===== */
.page-header { padding: 140px 0 60px; background: var(--c-navy); text-align: center; }
.page-label { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; color: var(--c-yellow); margin-bottom: 12px; }
.page-title { font-size: 32px; font-weight: 300; color: var(--c-cream); line-height: 1.15; max-width: 600px; margin: 0 auto 12px; }
.page-desc { font-size: 15px; color: rgba(244,243,238,0.75); max-width: 520px; margin: 0 auto; }

/* ===== Section Header ===== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; color: var(--c-slate); margin-bottom: 10px; }
.section-title { font-size: 28px; font-weight: 700; color: var(--c-navy); line-height: 1.2; }

/* ===== Grid ===== */
.grid-2 { display: grid; gap: 20px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-3 { display: grid; gap: 20px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-4 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ===== Form ===== */
.form-step { background: var(--c-cream); border-radius: 12px; padding: 28px; margin-bottom: 16px; border: 1px solid rgba(51,65,92,0.06); }
.form-step-header { display: flex; gap: 16px; margin-bottom: 20px; }
.form-step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--c-navy); color: var(--c-yellow); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--c-navy); }
.form-input { width: 100%; padding: 12px 16px; border: 1px solid rgba(51,65,92,0.15); border-radius: 8px; font-family: var(--font-body); font-size: 14px; transition: all 0.2s ease; background: #fff; color: var(--c-navy); }
.form-input:focus { outline: none; border-color: var(--c-navy); box-shadow: 0 0 0 3px rgba(0,18,51,0.08); }
.form-input::placeholder { color: rgba(51,65,92,0.4); }
.form-input.error { border-color: var(--c-red); }
.form-error { font-size: 12px; color: var(--c-red); display: none; margin-top: 4px; }
.form-error.visible { display: block; }
.form-hint { font-size: 12px; color: var(--c-slate); margin-top: 4px; }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2333415C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ===== Radio Cards ===== */
.radio-card { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 8px; border: 2px solid rgba(51,65,92,0.1); cursor: pointer; transition: all 0.2s ease; }
.radio-card:hover { border-color: rgba(51,65,92,0.25); }
.radio-card input[type="radio"] { width: 20px; height: 20px; accent-color: var(--c-navy); flex-shrink: 0; }
.radio-card .flex-1 { flex: 1; }
.radio-card:has(input:checked) { border-color: var(--c-navy); background: rgba(0,18,51,0.03); }

/* ===== Checkbox Row ===== */
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--c-navy); flex-shrink: 0; margin-top: 2px; }
.checkbox-row label { font-size: 13px; line-height: 1.5; color: var(--c-navy); }
.checkbox-row a { text-decoration: underline; color: var(--c-navy); }

/* ===== Pricing ===== */
.pricing-card { background: var(--c-cream); border-radius: 12px; padding: 28px; border: 1px solid rgba(51,65,92,0.08); text-align: center; position: relative; }
.pricing-card.featured { border: 2px solid var(--c-yellow); }
.pricing-badge { position: absolute; top: -1px; right: 20px; background: var(--c-yellow); color: var(--c-black); font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 0 0 6px 6px; }
.price { font-size: 42px; font-weight: 700; color: var(--c-navy); line-height: 1; margin-bottom: 12px; }
.feature-list { list-style: none; margin-bottom: 24px; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.feature-list svg { flex-shrink: 0; color: var(--c-green); }

/* ===== Order Summary ===== */
.order-summary { background: var(--c-navy); border-radius: 12px; padding: 24px; color: var(--c-cream); }
.order-summary h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.order-summary-line { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; border-bottom: 1px solid rgba(244,243,238,0.1); }
.order-summary-line.total { border-bottom: none; border-top: 2px solid var(--c-yellow); margin-top: 8px; padding-top: 12px; font-weight: 600; }
.total-price { font-size: 20px; font-weight: 700; color: var(--c-yellow); }

/* ===== Stripe Payment ===== */
#card-element { padding: 16px; border: 1px solid rgba(51,65,92,0.15); border-radius: 8px; background: #fff; margin-bottom: 16px; }
#card-element.StripeElement--focus { border-color: var(--c-navy); box-shadow: 0 0 0 3px rgba(0,18,51,0.08); }
#card-element.StripeElement--invalid { border-color: var(--c-red); }
#card-errors { font-size: 13px; color: var(--c-red); margin-bottom: 16px; min-height: 20px; }
.payment-loading { display: none; text-align: center; padding: 20px; }
.payment-loading.visible { display: block; }
.payment-loading .spinner { width: 40px; height: 40px; border: 3px solid rgba(0,18,51,0.1); border-top-color: var(--c-navy); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Confirmation ===== */
.confirm-hero { background: linear-gradient(135deg, #001233 0%, #33415C 100%); padding: 120px 0 80px; text-align: center; position: relative; overflow: hidden; }
.check-circle { width: 80px; height: 80px; border-radius: 50%; background: var(--c-green); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; animation: check-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes check-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.check-circle svg { color: #fff; }
.confirm-title { font-size: 32px; font-weight: 300; color: var(--c-cream); margin-bottom: 12px; }
@media (min-width: 768px) { .confirm-title { font-size: 44px; } }
.confirm-subtitle { font-size: 16px; color: rgba(244,243,238,0.75); max-width: 480px; margin: 0 auto; }
.order-details { background: var(--c-cream); border-radius: 12px; padding: 32px; max-width: 600px; margin: -40px auto 0; position: relative; z-index: 10; box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(51,65,92,0.08); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--c-slate); }
.detail-value { font-weight: 500; color: var(--c-navy); }
.detail-value.highlight { color: var(--c-green); font-weight: 600; }
.step-card { display: flex; gap: 20px; background: var(--c-cream); border-radius: 12px; padding: 24px; margin-bottom: 16px; border: 1px solid rgba(51,65,92,0.06); }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--c-navy); color: var(--c-yellow); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta-section { text-align: center; padding: 64px 0; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ===== Stars ===== */
.stars { display: flex; gap: 4px; color: var(--c-amber); }
.stars svg { width: 14px; height: 14px; fill: currentColor; }

/* ===== Footer ===== */
.site-footer { background: var(--c-sand); padding: 64px 0 0; border-top: 1px solid rgba(51,65,92,0.08); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px; margin-bottom: 48px; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo-link { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--c-navy); margin-bottom: 14px; text-decoration: none; }
.footer-logo-link:hover { color: var(--c-red); }
.footer-title { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--c-slate); margin-bottom: 16px; }
.footer-link { display: block; padding: 6px 0; font-size: 14px; color: var(--c-slate); transition: color 0.15s ease; }
.footer-link:hover { color: var(--c-navy); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; border-top: 1px solid rgba(51,65,92,0.08); font-size: 12px; color: var(--c-slate); }
@media (max-width: 768px) { .footer-bottom { flex-direction: column; gap: 8px; text-align: center; } }

/* ===== Admin Orders Table ===== */
.admin-orders-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-orders-table th { background: var(--c-navy); color: var(--c-cream); padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; }
.admin-orders-table td { padding: 12px 16px; border-bottom: 1px solid rgba(51,65,92,0.08); font-size: 13px; }
.admin-orders-table tr:hover td { background: rgba(0,18,51,0.02); }
.order-status-paid { background: var(--c-green); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.order-status-pending { background: var(--c-amber); color: var(--c-black); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.order-status-failed { background: var(--c-red); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* ===== Compare Table ===== */
.compare-table { background: var(--c-cream); border-radius: 8px; overflow: hidden; }
.compare-header { display: grid; padding: 16px; background: var(--c-navy); color: var(--c-cream); font-weight: 600; font-size: 13px; }
.compare-row { display: grid; padding: 14px 16px; border-bottom: 1px solid rgba(51,65,92,0.06); font-size: 14px; }

/* ===== Team Card ===== */
.team-card { background: var(--c-cream); border-radius: 12px; padding: 24px; text-align: center; border: 1px solid rgba(51,65,92,0.06); }
.team-img { width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; margin-bottom: 14px; filter: grayscale(100%); transition: filter 0.3s ease; }
.team-card:hover .team-img { filter: grayscale(0%); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-sand); }
::-webkit-scrollbar-thumb { background: var(--c-slate); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-navy); }

/* ===== Security Badges ===== */
.security-badges { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.security-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-slate); }

/* ===== FAQ ===== */
.faq-item { border-bottom: 1px solid rgba(51,65,92,0.08); }
.faq-question { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 20px 0; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; color: var(--c-navy); border: none; background: none; }
.faq-question.active { font-weight: 600; }
.faq-icon { font-size: 20px; font-weight: 300; transition: transform 0.2s ease; }
.faq-question.active .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer.open { max-height: 300px; }
.faq-answer p { padding-bottom: 20px; font-size: 14px; color: var(--c-slate); line-height: 1.75; }

/* ===== Images ===== */
.img-rounded { border-radius: 12px; overflow: hidden; }
.img-rounded img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Reveal ===== */
.reveal { opacity: 1; transform: translateY(0); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.hidden { opacity: 0; transform: translateY(30px); }

/* ===== WordPress Content ===== */
.wp-content img { max-width: 100%; height: auto; }
.wp-content a { color: var(--c-red); text-decoration: underline; }
.wp-content h2, .wp-content h3 { margin-bottom: 16px; }
.wp-content p { margin-bottom: 16px; }
.wp-content ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.wp-content blockquote { border-left: 4px solid var(--c-yellow); padding-left: 20px; font-style: italic; color: var(--c-slate); }
