/* ============================================================
   Wang Fan Consulting — Main Stylesheet
   Color palette: Nordic blues, clean whites, professional greys
   Accent: deep ocean blue + salmon/coral highlight
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #1a3a5c;       /* Deep Nordic blue */
  --color-primary-light: #2a5a8c; /* Lighter blue */
  --color-primary-dark: #0f2840;  /* Very dark blue */
  --color-accent: #e07050;        /* Salmon/coral accent */
  --color-accent-light: #f0c0a8;  /* Light coral */
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7fa;        /* Light blue-grey */
  --color-bg-dark: #1a3a5c;
  --color-text: #2c3e50;
  --color-text-light: #6b7b8d;
  --color-text-on-dark: #e8edf2;
  --color-border: #dce3ea;
  --color-success: #27ae60;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-chinese: 'Noto Serif SC', serif;

  --max-width: 1140px;
  --max-width-narrow: 760px;
  --header-height: 72px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(26, 58, 92, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 58, 92, 0.12);
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

h1, h2, h3, h4 {
  line-height: 1.3;
  color: var(--color-primary-dark);
  font-weight: 600;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.75rem; margin-top: 2.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; }

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.35rem; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg-alt);
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

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

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text-light);
}

.main-nav .nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: white;
  padding: 6rem 0;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  color: white;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero .highlight {
  color: var(--color-accent-light);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-on-dark);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.page-hero h1 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.page-hero .hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-on-dark);
  margin-bottom: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: #c85a3e;
  border-color: #c85a3e;
  color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* --- Stats Section --- */
.stats {
  padding: 3rem 0;
  background: var(--color-bg-alt);
}

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

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.4;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

/* --- Problem / Solution --- */
.problem-solution {
  padding: 5rem 0;
}

.challenge-list, .solution-list {
  list-style: none;
  padding: 0;
}

.challenge-list li, .solution-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
}

.challenge-list li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

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

/* --- Services Preview (homepage) --- */
.services-preview {
  padding: 5rem 0;
  background: var(--color-bg-alt);
}

.services-preview h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-top: 0;
  color: var(--color-primary);
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* --- Why Us --- */
.why-us {
  padding: 5rem 0;
}

.why-us h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.why-card {
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.why-card h3 {
  margin-top: 0;
  color: var(--color-primary);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  color: white;
  font-size: 2rem;
}

.cta-section p {
  color: var(--color-text-on-dark);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* --- Page Content (inner pages) --- */
.page-content {
  padding: 3rem 0 5rem;
}

.page-content h1 {
  margin-bottom: 2rem;
}

.page-content h2:first-of-type {
  margin-top: 0;
}

/* --- Services Detail Page --- */
.service-detail-card {
  background: var(--color-bg-alt);
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.pricing-note {
  background: var(--color-bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.pricing-note h2 {
  margin-top: 0;
}

/* --- For Exporters Page --- */
.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.challenge-item {
  background: var(--color-bg-alt);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border-top: 3px solid var(--color-accent);
}

.challenge-item h3 {
  margin-top: 0;
  color: var(--color-primary);
}

/* --- CTA Box (inline) --- */
.cta-box {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
  padding: 3rem;
  border-radius: var(--radius);
  text-align: center;
  margin: 3rem 0;
}

.cta-box h2 {
  color: white;
  margin-top: 0;
}

.cta-box p {
  color: var(--color-text-on-dark);
}

/* --- About Page --- */
.profile-section {
  background: var(--color-bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.profile-section h3 {
  color: var(--color-primary);
}

.profile-section h3:first-child {
  margin-top: 0;
}

/* --- Contact Page --- */
.privacy-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 3rem;
}

/* --- Market Stats Table --- */
.market-stats {
  margin: 1.5rem 0;
}

.market-stats table {
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.market-stats th {
  background: var(--color-primary);
  color: white;
}

.market-stats tr:hover td {
  background: var(--color-bg-alt);
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-text-on-dark);
  padding: 4rem 0 2rem;
}

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

.footer-brand .logo-text {
  color: white;
}

.footer-brand .logo-sub {
  color: var(--color-text-on-dark);
}

.footer-tagline {
  margin-top: 0.75rem;
  color: var(--color-text-on-dark);
  font-size: 0.9rem;
}

.site-footer h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--color-text-on-dark);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .hero { padding: 4rem 0; }
  .hero h1 { font-size: 2rem; }

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

  .two-col,
  .services-grid,
  .why-grid,
  .challenge-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .main-nav .nav-list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
  }

  .main-nav .nav-list.open {
    display: flex;
  }

  .main-nav .nav-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav .nav-list li:last-child {
    border-bottom: none;
  }

  .page-hero { padding: 3rem 0; }

  .service-detail-card,
  .profile-section,
  .pricing-note {
    padding: 1.5rem;
  }

  .cta-box { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 { font-size: 1.6rem; }
  .stat-number { font-size: 1.8rem; }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    text-align: center;
  }
}
