/* ============================================================
   LIVING RIVER - Education Technology
   HONG KONG LIVING RIVER EDUCATION TECHNOLOGY CO., LIMITED
   ============================================================ */

/* --- CSS Custom Properties / Design Tokens --- */
:root {
  /* Core palette */
  --color-navy: #0a1628;
  --color-navy-deep: #060f1e;
  --color-navy-light: #152240;
  --color-steel: #1e3050;
  --color-teal: #00a3a3;
  --color-teal-dark: #008080;
  --color-teal-glow: #14b8b8;
  --color-coral: #e8613c;
  --color-coral-dark: #c44a2b;
  --color-gold: #d4a843;
  --color-gold-light: #e8c96a;
  /* Surfaces */
  --color-bg: #f4f1eb;
  --color-bg-warm: #faf7f2;
  --color-surface: #ffffff;
  --color-surface-alt: #eee9e0;
  --color-border: #d9d3c7;
  --color-border-light: #e8e3da;
  /* Text */
  --color-text: #1a1c1e;
  --color-text-soft: #4a4d52;
  --color-text-muted: #6e7177;
  --color-text-on-dark: #f0efec;
  --color-text-on-navy: #c8d6e5;
  /* Utility */
  --color-success: #2d8a56;
  --color-error: #d14343;
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 4px 16px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 8px 32px rgba(10, 22, 40, 0.14);
  --shadow-xl: 0 16px 48px rgba(10, 22, 40, 0.18);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: var(--color-teal-dark);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

ul { list-style: none; }

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

h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-teal);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  font-size: 0.95rem;
}

.skip-link:focus {
  top: 12px;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-navy);
  border-bottom: 2px solid rgba(255,255,255,0.06);
  height: var(--nav-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--color-teal-glow);
}

.nav-logo .logo-icon {
  width: 38px;
  height: 38px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: inline-block;
  padding: 10px 18px;
  color: var(--color-text-on-dark);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: rgba(255,255,255,0.08);
  color: #ffffff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Footer --- */
.site-footer {
  background-color: var(--color-navy-deep);
  color: var(--color-text-on-dark);
  padding: 64px 24px 32px;
  margin-top: auto;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.footer-col p,
.footer-col a,
.footer-col li {
  color: var(--color-text-on-navy);
  font-size: 0.9rem;
  line-height: 2;
}

.footer-col a:hover {
  color: var(--color-teal-glow);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--color-text-on-navy);
}

.footer-bottom a {
  color: var(--color-text-on-navy);
}

.footer-bottom a:hover {
  color: var(--color-teal-glow);
}

/* --- Page Hero Sections --- */
.page-hero {
  background-color: var(--color-navy);
  color: #ffffff;
  padding: 80px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 20% 80%, rgba(0,163,163,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 250px at 80% 20%, rgba(212,168,67,0.08) 0%, transparent 70%);
}

.page-hero h1 {
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: var(--color-text-on-navy);
  margin-top: 16px;
  font-size: 1.1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* --- Hero accent shapes --- */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  background: var(--color-teal);
}

.hero-shapes .shape:nth-child(1) {
  width: 500px; height: 500px;
  top: -160px; right: -120px;
}

.hero-shapes .shape:nth-child(2) {
  width: 300px; height: 300px;
  bottom: -80px; left: -60px;
  background: var(--color-coral);
}

.hero-shapes .shape:nth-child(3) {
  width: 180px; height: 180px;
  top: 40px; left: 50%;
  background: var(--color-gold);
  opacity: 0.03;
}

/* --- Standalone page hero for inner pages --- */
.inner-hero {
  background-color: var(--color-navy-light);
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 500px 200px at 30% 90%, rgba(0,163,163,0.1) 0%, transparent 70%);
}

.inner-hero h1 {
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.inner-hero .breadcrumb {
  margin-top: 12px;
  color: var(--color-text-on-navy);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.inner-hero .breadcrumb a {
  color: var(--color-teal-glow);
}

/* --- Sections --- */
.section {
  padding: 80px 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.section-dark {
  background-color: var(--color-navy);
  color: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

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

.section-dark .section-header h2 {
  color: #ffffff;
}

.section-dark .section-header p {
  color: var(--color-text-on-navy);
}

/* --- Hero (Homepage specific) --- */
.home-hero {
  background-color: var(--color-navy);
  padding: 100px 24px 96px;
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
}

.home-hero .hero-shapes .shape { opacity: 0.05; }

.home-hero .section-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content h1 .highlight {
  color: var(--color-teal-glow);
}

.hero-content p {
  color: var(--color-text-on-navy);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background-color 0.25s, transform 0.2s, box-shadow 0.25s;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--color-teal);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-teal-dark);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0,163,163,0.35);
}

.btn-outline {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  border-color: #ffffff;
  background-color: rgba(255,255,255,0.06);
  color: #ffffff;
}

.btn-coral {
  background-color: var(--color-coral);
  color: #ffffff;
}

.btn-coral:hover {
  background-color: var(--color-coral-dark);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(232,97,60,0.35);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* Hero visual (SVG illustration container) */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 400px;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background-color: rgba(0,163,163,0.08);
  color: var(--color-teal-dark);
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.feature-card p {
  color: var(--color-text-soft);
  font-size: 0.93rem;
}

/* --- Stats --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--color-teal);
  line-height: 1;
}

.stat-item .stat-label {
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-dark .stat-number { color: var(--color-teal-glow); }
.section-dark .stat-label { color: var(--color-text-on-navy); }

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card .service-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(0,163,163,0.06);
  position: absolute;
  top: 12px;
  right: 24px;
  line-height: 1;
}

.service-card .service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background-color: rgba(0,163,163,0.08);
  color: var(--color-teal-dark);
}

.service-card h3 { margin-bottom: 10px; }

.service-card p { color: var(--color-text-soft); margin-bottom: 16px; }

.service-card ul {
  list-style: none;
}

.service-card ul li {
  padding: 5px 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.service-card ul li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-teal);
  margin-right: 10px;
  vertical-align: middle;
}

/* --- Timeline / Process --- */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.timeline-step {
  text-align: center;
  position: relative;
}

.timeline-step::before {
  counter-increment: step;
  content: counter(step);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-teal);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.timeline-step h4 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.timeline-step p {
  color: var(--color-text-soft);
  font-size: 0.88rem;
}

/* --- About Page Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
}

.team-card .team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background-color: var(--color-navy-light);
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card h4 { margin-bottom: 4px; }

.team-card .team-role {
  color: var(--color-teal-dark);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.team-card p {
  color: var(--color-text-soft);
  font-size: 0.88rem;
}

/* --- Values --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.value-card {
  padding: 28px;
  border-left: 3px solid var(--color-teal);
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.value-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.value-card p { color: var(--color-text-soft); font-size: 0.9rem; }

/* --- Contact Form --- */
.contact-section {
  background-color: var(--color-bg-warm);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 16px;
}

.contact-info .info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.contact-info .info-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: rgba(0,163,163,0.1);
  color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info .info-text strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.contact-info .info-text span {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg-warm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0,163,163,0.12);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-status {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  background: #e6f4ea;
  color: var(--color-success);
}

.form-status.error {
  display: block;
  background: #fce8e6;
  color: var(--color-error);
}

/* --- Content Page Styles (Privacy, Terms, About, Services detail) --- */
.content-page {
  padding: 64px 24px 80px;
}

.content-body {
  max-width: 800px;
  margin: 0 auto;
}

.content-body h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.content-body h3 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.content-body p {
  margin-bottom: 16px;
  color: var(--color-text-soft);
}

.content-body ul,
.content-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.content-body ul li,
.content-body ol li {
  margin-bottom: 8px;
  color: var(--color-text-soft);
}

.content-body ul {
  list-style: disc;
}

.content-body ol {
  list-style: decimal;
}

.content-body .last-updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

/* --- CTA Banner --- */
.cta-banner {
  background-color: var(--color-teal);
  padding: 56px 24px;
  text-align: center;
  color: #ffffff;
}

.cta-banner h2 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.cta-banner p {
  color: #ffffff;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.cta-banner .btn {
  background-color: #ffffff;
  color: var(--color-teal-dark);
}

.cta-banner .btn:hover {
  background-color: var(--color-bg-warm);
  color: var(--color-teal-dark);
}

/* --- Mobile responsive --- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-hero .section-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

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

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-navy);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .hamburger {
    display: flex;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .home-hero {
    padding: 72px 16px 64px;
  }

  .section {
    padding: 56px 16px;
  }

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