/* ============================================
   NYC移民服务中心 - nycyimin.com
   Custom Styles (Supplement Tailwind CSS)
   ============================================ */

:root {
  --primary: #1B365D;
  --primary-light: #264573;
  --primary-dark: #0F2240;
  --gold: #C8A951;
  --gold-light: #D4BC72;
  --gold-dark: #B8963E;
  --accent: #2563EB;
  --accent-light: #3B82F6;
  --bg: #F8FAFC;
  --bg-white: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --text-lighter: #94A3B8;
  --border: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; color: var(--text); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover { color: var(--primary); }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.top-bar {
  background: var(--primary-dark);
  color: white;
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.top-bar a { color: var(--gold); }
.top-bar a:hover { color: var(--gold-light); }

.header {
  background: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 900;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .cn {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.logo-text .en {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation */
.nav { display: flex; align-items: center; gap: 0; }

.nav a {
  padding: 0.5rem 0.85rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-bottom-color: var(--gold);
}

.nav-cta {
  background: var(--gold) !important;
  color: white !important;
  border-radius: 6px !important;
  border-bottom: none !important;
  padding: 0.5rem 1.25rem !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--gold-dark) !important;
  color: white !important;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  color: white;
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.hero h1 span { color: var(--gold); }

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 700; color: var(--gold); display: block; }
.hero-stat .label { font-size: 0.875rem; color: rgba(255,255,255,0.7); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-gold {
  background: var(--gold);
  color: white;
}
.btn-gold:hover { background: var(--gold-dark); color: white; }

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

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: white; color: white; }

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

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

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Section styles */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-white);
}

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

.section-header h2 {
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0.75rem auto 0;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.card p { color: var(--text-light); font-size: 0.95rem; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Process/Timeline */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.process-step {
  display: flex;
  gap: 2rem;
  position: relative;
  padding-bottom: 2.5rem;
}

.process-step:last-child { padding-bottom: 0; }

.step-number {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.process-step:not(:last-child) .step-number::after {
  content: '';
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 2.5rem - 56px);
  background: var(--border);
}

.step-content h3 { margin-bottom: 0.5rem; }
.step-content p { color: var(--text-light); }

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--bg-white);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.3s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-family: inherit;
}

.faq-question:hover { background: #f8fafc; }

.faq-question .icon {
  font-size: 1.25rem;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-light);
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* Calculator */
.calculator-form {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
  background: var(--bg);
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.result-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}

.result-box .amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0.5rem 0;
}

/* Testimonials */
.testimonial {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.testimonial blockquote {
  font-style: italic;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.testimonial .author {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Blog cards */
.blog-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.blog-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 3rem;
}

.blog-card-body { padding: 1.5rem; }
.blog-card-body .date { color: var(--text-lighter); font-size: 0.85rem; margin-bottom: 0.5rem; }
.blog-card-body h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.blog-card-body h3 a { color: var(--primary); }
.blog-card-body h3 a:hover { color: var(--accent); }
.blog-card-body p { color: var(--text-light); font-size: 0.9rem; }

/* Table styles */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.data-table th {
  background: var(--primary);
  color: white;
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* Forms page download cards */
.form-download-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all 0.3s;
}

.form-download-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: var(--gold);
}

.form-download-card .form-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.form-download-card h4 { margin-bottom: 0.35rem; }
.form-download-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 0.75rem; }

/* Contact section */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 0;
}

.footer h4 { color: white; margin-bottom: 1.25rem; font-size: 1.1rem; }

.footer a { color: rgba(255,255,255,0.65); }
.footer a:hover { color: var(--gold); }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.9rem; }

.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.cta-banner h2 { color: white; margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-light);
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.5rem; }

/* Page header (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3.5rem 0;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero h1 { color: white; position: relative; z-index: 1; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.8); position: relative; z-index: 1; font-size: 1.1rem; }

/* Alert / Notice boxes */
.notice {
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  margin: 1.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notice-info { background: #EFF6FF; border-left: 4px solid var(--accent); color: #1E40AF; }
.notice-warning { background: #FFFBEB; border-left: 4px solid var(--warning); color: #92400E; }
.notice-success { background: #ECFDF5; border-left: 4px solid var(--success); color: #065F46; }

/* Badge / Tag */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-gold { background: #FEF3C7; color: #92400E; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-green { background: #D1FAE5; color: #065F46; }

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text);
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.floating-cta a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.floating-cta .phone-btn { background: var(--success); color: white; }
.floating-cta .phone-btn:hover { transform: scale(1.1); }
.floating-cta .top-btn { background: var(--primary); color: white; }
.floating-cta .top-btn:hover { transform: scale(1.1); }

/* Blog article styles */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 { margin: 2rem 0 1rem; font-size: 1.5rem; }
.article-content h3 { margin: 1.5rem 0 0.75rem; font-size: 1.25rem; }
.article-content p { margin-bottom: 1.25rem; line-height: 2; }
.article-content ul, .article-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-content li { margin-bottom: 0.5rem; line-height: 1.8; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border);
  }

  .nav.active { display: flex; }

  .nav a {
    padding: 0.75rem 1rem;
    border-bottom: none;
    border-radius: 8px;
  }

  .nav a:hover, .nav a.active { background: #f8fafc; }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }

  .section { padding: 3rem 0; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

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

  .top-bar .container { flex-direction: column; gap: 0.25rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .container { padding: 0 1rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat .num { font-size: 1.5rem; }
}
