/* ============================================================
   CoEldery 85 — Main CSS (v2 · 2026)
   Brand: Forest Green #228B22 · Ferrari Red #FF2800
   Fonts: Montserrat (EN) · Noto Sans TC/SC (ZH)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Noto+Sans+TC:wght@400;500;700;900&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --green:       #228B22;
  --green-dark:  #1B4332;
  --green-light: #D8E8DD;
  --green-pale:  #EAF3EC;
  --red:         #FF2800;
  --red-dark:    #CC2000;
  --gold:        #B8860B;
  --cream:       #FAF8F3;
  --white:       #FFFFFF;
  --gray-100:    #F5F5F5;
  --gray-200:    #E8E8E8;
  --gray-400:    #9E9E9E;
  --gray-700:    #424242;
  --gray-900:    #1A1A1A;

  --font-en:  'Montserrat', sans-serif;
  --font-zh:  'Noto Sans TC', 'Noto Sans SC', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.15);

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);

  --container: 1240px;
  --nav-h: 80px;

  /* Elderly-friendly sizing */
  --text-base:   1.05rem;   /* ~19px */
  --text-sm:     0.95rem;   /* ~17px */
  --text-xs:     0.875rem;  /* ~16px — minimum readable */
  --tap-min:     52px;      /* minimum tap target height */
  --line-height: 1.85;      /* generous line spacing */
}

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

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

body {
  font-family: var(--font-zh);
  color: var(--gray-900);
  background: var(--white);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  /* Improve Chinese text rendering */
  text-rendering: optimizeLegibility;
  word-break: keep-all;     /* prevent awkward mid-word breaks in ZH */
  overflow-wrap: break-word;
}

/* English text inherits Montserrat via .en-text or lang selector */
:lang(en) body, .lang-en body { font-family: var(--font-en); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-zh);
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
  /* Prevent single-character orphan on last line */
  text-wrap: balance;
}

.en-title, .brand-name-en {
  font-family: var(--font-en);
  font-weight: 800;
}

.section-label {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-pale);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-700);
  max-width: 640px;
  line-height: 1.9;
  /* Keep Chinese phrases intact — no mid-phrase line breaks */
  word-break: keep-all;
}

/* Standalone (non-.section-center) subtitles inside a centred wrapper */
[style*="text-align:center"] > .section-subtitle,
.text-center .section-subtitle {
  margin: 0 auto;
  text-align: center;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;           /* never exceed viewport width */
  box-sizing: border-box;
}

section {
  padding: 80px 0;
  overflow: hidden;   /* prevent any child element from creating horizontal scroll */
}

.section-center {
  text-align: center;
}

.section-center .section-subtitle {
  margin: 0 auto;
  text-align: center;
}

/* ── Buttons — minimum 52px tall for elder tap targets ─────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  min-height: var(--tap-min);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(255,40,0,0.3);
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,40,0,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-secondary:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--red);
  font-weight: 800;
}
.btn-white:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.7);
}

.btn-sm { padding: 10px 20px; font-size: 0.9rem; min-height: 44px; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; min-height: 58px; }

/* ── Navigation ──────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--green-light);
  transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

/* Logo — real PNG image */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  padding: 8px 0;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  padding: 8px 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  background: var(--green-pale);
}

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

/* Identity gate buttons — three audience entry points */
.nav-identity-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.nav-id-btn {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 11px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--green-light);
  color: var(--green);
  white-space: nowrap;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--green-pale);
}
.nav-id-btn:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.nav-id-btn--corp {
  border-color: var(--red);
  color: var(--red);
  background: #fff5f5;
}
.nav-id-btn--corp:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 11px;
  min-height: 36px;
  color: var(--gray-700);
  transition: all var(--transition);
  font-family: var(--font-en);
}

.lang-btn:hover { background: var(--green-pale); color: var(--green); }
.lang-btn.active { background: var(--green); color: var(--white); }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  margin-left: auto;
}
.nav-hamburger:hover { background: var(--green-pale); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
/* Mobile menu — elder-friendly large tap areas */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 999;
  padding: 20px 20px 40px;
  flex-direction: column;
  gap: 0;
}
.nav-mobile-menu.open { display: flex; }

/* "I am..." identity block */
.nav-mobile-identity {
  padding: 16px 0 20px;
  border-bottom: 2px solid var(--green-light);
  margin-bottom: 8px;
}

.nav-mobile-identity-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.nav-mobile-id-btn {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 20px;
  min-height: var(--tap-min);
  border-radius: var(--radius-md);
  border: 2px solid var(--green);
  color: var(--green);
  text-align: center;
  margin-bottom: 8px;
  -webkit-tap-highlight-color: transparent;
}
.nav-mobile-id-btn:active { background: var(--green); color: var(--white); }

/* Main links */
.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-mobile-links a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  padding: 16px 8px;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-mobile-links a:active,
.nav-mobile-links a:hover { background: var(--green-pale); color: var(--green); border-radius: var(--radius-sm); }

/* Bottom lang + WA */
.nav-mobile-bottom {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-mobile-lang {
  display: flex;
  gap: 8px;
}

.nav-mobile-lang .lang-btn {
  flex: 1;
  min-height: 48px;
  font-size: 1rem;
}

.nav-mobile-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px;
  min-height: var(--tap-min);
  border-radius: var(--radius-md);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* Page offset for fixed nav */
body { padding-top: var(--nav-h); }

/* Focus styles — important for accessibility */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #2d9e2d 100%);
  z-index: 0;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.25;
  mix-blend-mode: overlay;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27,67,50,0.85) 0%, rgba(34,139,34,0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 720px;
}

.hero-en-accent {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-title .red { color: #FF8066; }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.88);
  margin-bottom: 16px;
  line-height: 1.7;
}

.hero-en-sub {
  font-family: var(--font-en);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 36px;
  font-style: italic;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero split layout */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 48px;
  align-items: center;
}

.hero-img-wrap {
  position: relative;
  z-index: 2;
}

.hero-img-wrap img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ── Section backgrounds ────────────────────────────────────── */
.bg-white      { background: var(--white); }
.bg-cream      { background: var(--cream); }
.bg-pale       { background: var(--green-pale); }
.bg-light      { background: var(--green-light); }
.bg-green      { background: var(--green); color: var(--white); }
.bg-green-soft { background: #f0f9f0; }   /* very light green, easy on eyes */
.bg-dark       { background: var(--green-dark); color: var(--white); }
.bg-red        { background: var(--red); color: var(--white); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  transition: all var(--transition);
}

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

.card-border-green { border-top: 4px solid var(--green); }
.card-border-red   { border-top: 4px solid var(--red); }
.card-border-gold  { border-top: 4px solid var(--gold); }

/* Grid layouts — minmax(0,1fr) prevents content from blowing past grid cell */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }

/* ── Stats / Number blocks ───────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  background: var(--green-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  background: var(--white);
  padding: 36px 24px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-en);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ── Steps ───────────────────────────────────────────────────── */
.steps-row {
  display: flex;
  gap: 0;
  position: relative;
  overflow: hidden; /* prevent horizontal bleed on tablet */
  width: 100%;
  max-width: 100%;
}

.steps-row::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 80px;
  right: 80px;
  height: 2px;
  background: var(--green-light);
  z-index: 0;
}

.step-item {
  flex: 1;
  min-width: 0; /* prevent flex children from overflowing */
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.step-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(34,139,34,0.3);
}

.step-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.step-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.75;
  word-break: keep-all;
}

/* ── Endorsement Banner ─────────────────────────────────────── */
.endorsement-banner {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
}

.endorsement-inner {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 32px;
  align-items: start;
  min-width: 0;
}

.endorsement-badge {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  min-width: 160px;
}

.endorsement-badge-title {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

.endorsement-badge-name {
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.endorsement-badge-code {
  font-family: var(--font-en);
  font-size: 0.8rem;
  opacity: 0.7;
}

.endorsement-quote {
  font-size: 1.05rem;
  line-height: 1.8;
  font-style: italic;
  opacity: 0.95;
  border-left: 4px solid rgba(255,255,255,0.4);
  padding-left: 24px;
  margin-bottom: 16px;
}

.endorsement-source {
  font-size: 0.82rem;
  opacity: 0.7;
}

.endorsement-media {
  margin-top: 12px;
  font-size: 0.8rem;
  opacity: 0.65;
}

/* ── Notice Block ────────────────────────────────────────────── */
.notice-block {
  background: var(--cream);
  border: 1px solid var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-md);
  padding: 32px;
}

.notice-block h3 {
  color: var(--green);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* ── Comparison Table ───────────────────────────────────────── */
.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare-table th {
  background: var(--green);
  color: var(--white);
  padding: 16px 20px;
  text-align: left;
  font-size: 0.95rem;
}

.compare-table th:nth-child(2) { background: rgba(27,67,50,0.85); }
.compare-table th:nth-child(3) { background: var(--red); }

.compare-table td {
  padding: 16px 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  word-break: keep-all;
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table td:nth-child(2) { color: var(--gray-400); }
.compare-table td:nth-child(3) { color: var(--green); font-weight: 600; }

/* ── Testimonial / Quote ─────────────────────────────────────── */
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

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

.news-card:hover figure img {
  transform: scale(1.04);
}

.news-card-body {
  padding: 24px;
  flex: 1;
}

.news-source {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.news-excerpt {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.news-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-date { font-size: 0.78rem; color: var(--gray-400); }

.share-btns {
  display: flex;
  gap: 8px;
}

.share-btn {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  transition: all var(--transition);
}
.share-btn:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ── Roadshow Table ─────────────────────────────────────────── */
.roadshow-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.roadshow-table th {
  background: var(--green);
  color: var(--white);
  padding: 12px 16px;
  font-size: 0.85rem;
  text-align: left;
}

.roadshow-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}

.roadshow-table tr:nth-child(even) td { background: var(--cream); }
.roadshow-table tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-upcoming   { background: var(--green-pale); color: var(--green); }
.status-preparing  { background: #FFF3E0; color: #E65100; }
.status-completed  { background: var(--gray-100); color: var(--gray-400); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  background: var(--white);
  color: var(--gray-900);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,139,34,0.1);
}

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

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--gray-700);
  cursor: pointer;
}

.form-checkbox input { margin-top: 2px; accent-color: var(--green); }

/* ── Placeholder boxes ───────────────────────────────────────── */
.photo-placeholder {
  background: var(--green-pale);
  border: 2px dashed var(--green-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--green);
  gap: 12px;
}

.photo-placeholder-icon { font-size: 2.5rem; opacity: 0.5; }
.photo-placeholder-text { font-size: 0.82rem; opacity: 0.7; line-height: 1.5; }

/* ── Tabs ─────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 32px;
}

.tab-btn {
  padding: 12px 24px;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.tab-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.tab-btn:hover { color: var(--green); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Identity Cards ──────────────────────────────────────────── */
.identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
}

.identity-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.identity-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}

.identity-card-icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.identity-card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--green-dark);
}

.identity-card-desc {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.75;
  flex: 1;
  word-break: keep-all;
}

/* ── Channel Matrix ─────────────────────────────────────────── */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;
}

.channel-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--green);
  transition: all var(--transition);
  overflow: hidden;
}

/* Image-enabled channel card — no left border, full-bleed image */
.channel-card figure {
  margin: -28px -28px 16px -28px;
}

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

.channel-card:hover figure img {
  transform: scale(1.04);
}

.channel-num {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.channel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.channel-desc {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ── Footer — WHITE background ──────────────────────────────── */
.footer-white {
  background: var(--white);
  border-top: 2px solid var(--green-light);
}

.footer-white-inner {
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 40px;
  min-width: 0;
}

.footer-brand { max-width: 300px; }

/* Footer logo — real PNG, works on white background */
.footer-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 20px;
  word-break: keep-all;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--green-pale);
  border: 1.5px solid var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.footer-social-btn:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  transform: translateY(-2px);
}
.footer-social-wa { color: #25D366; background: #f0fdf4; border-color: #bbf7d0; }
.footer-social-wa:hover { background: #25D366; color: var(--white); border-color: #25D366; }

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links a {
  font-size: 0.92rem;
  color: var(--gray-700);
  transition: color var(--transition);
  min-height: 38px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.footer-links a:hover { color: var(--green); }

.footer-address {
  font-size: 0.88rem;
  color: var(--gray-400);
  line-height: 1.6;
  padding: 8px 0;
}

.footer-bottom {
  border-top: 1px solid var(--gray-200);
  padding-top: 20px;
  font-size: 0.78rem;
  color: var(--gray-400);
  line-height: 1.75;
  word-break: keep-all;
}


/* ── Page Hero (internal pages) ─────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}

.page-hero-label {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Animations ──────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Utilities ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-white  { color: var(--white); }
.text-muted  { color: var(--gray-400); }

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }

.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.flex      { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8     { gap: 8px; }
.gap-12    { gap: 12px; }
.gap-16    { gap: 16px; }
.gap-24    { gap: 24px; }

.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 48px 0;
}

/* ── Photo Cards (roadshow / gallery) ────────────────────────── */
.photo-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  background: var(--white);
}
.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  display: block;
}
.photo-card figcaption {
  font-size: 0.88rem;
  color: var(--gray-700);
  padding: 12px 16px;
  line-height: 1.5;
  border-top: 1px solid var(--gray-200);
}

/* ── Responsive footer update ───────────────────────────────── */
@media (max-width: 1200px) {
  .nav-identity-btns { display: none; }  /* hidden on smaller desktop, shown in mobile menu */
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
  .footer-brand { max-width: none; grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 960px) {
  .nav-links        { display: none; }
  .nav-identity-btns { display: none; }
  .nav-hamburger    { display: flex; }
  .hero-split       { grid-template-columns: 1fr; }
  .hero-img-wrap    { display: none; }
  .grid-3           { grid-template-columns: repeat(2, 1fr); }
  .grid-4           { grid-template-columns: repeat(2, 1fr); }
  .identity-grid    { grid-template-columns: 1fr; }
  .channel-grid     { grid-template-columns: 1fr; }
  .steps-row        { flex-direction: column; gap: 24px; overflow: visible; width: 100%; }
  .steps-row::before { display: none; }
  .endorsement-inner { grid-template-columns: 1fr; }
  .form-row         { grid-template-columns: 1fr; }
}

/* ── Elderly-optimised mobile styles (≤640px) ──────────────── */
@media (max-width: 640px) {
  html { font-size: 18px; }  /* larger base for elderly on small screens */

  section         { padding: 52px 0; }
  .hero           { padding: 52px 0; }
  .container      { padding: 0 20px; }

  /* Single-column layouts */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid     { grid-template-columns: 1fr 1fr; }
  .footer-grid    { grid-template-columns: 1fr; }

  /* Hero CTA buttons stack vertically, full width */
  .hero-btns      { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; justify-content: center; }

  /* Endorsement / forms */
  .endorsement-banner { padding: 28px 20px; }

  /* Nav lang buttons larger */
  .lang-btn       { padding: 7px 10px; font-size: 0.88rem; }

  /* Table: horizontal scroll on small screen */
  .compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table  { font-size: 0.9rem; min-width: 480px; }
  .compare-table td, .compare-table th { padding: 12px 14px; }

  /* Step numbers larger */
  .step-num       { width: 72px; height: 72px; font-size: 1.6rem; }

  /* Card padding generous */
  .identity-card  { padding: 32px 24px; }
  .identity-card-icon { font-size: 3.5rem; }
  .identity-card-title { font-size: 1.2rem; }
  .identity-card-desc  { font-size: 1rem; }

  /* Stat numbers bigger on mobile */
  .stat-num       { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .stat-label     { font-size: 1rem; }

  /* Form inputs: ensure minimum 48px height */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;    /* prevent iOS zoom on focus */
    min-height: 52px;
    padding: 14px 16px;
  }
  .form-group textarea { min-height: 120px; }

  /* Footer on mobile */
  .footer-brand      { text-align: center; max-width: none; }
  .footer-logo-img   { margin: 0 auto 16px; }
  .footer-social     { justify-content: center; }
  .footer-social-btn { width: 48px; height: 48px; }

  /* Page hero heading */
  .page-hero h1   { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .page-hero p    { font-size: 1rem; }

  /* Section title */
  .section-title  { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* Bottom CTA section bigger padding */
  .bg-red section,
  section.bg-red  { padding: 64px 0; }

  /* Photo card on mobile: keep aspect-ratio, no fixed height override */

  /* Endorsement banner two-col */
  .endorsement-banner { padding: 24px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL OVERFLOW PREVENTION
   Applied last so it overrides any earlier conflicting rule.
   Prevents any single element from creating a horizontal scrollbar.
═══════════════════════════════════════════════════════════ */

/* Every img must be bounded */
img { max-width: 100%; height: auto; display: block; }

/* Photo card image overrides: maintain aspect ratio, never exceed cell */
.photo-card img { max-width: 100%; height: auto; }

/* Form row: never force 2-col below 480px */
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Endorsement: always 1-col on narrow screens */
@media (max-width: 720px) {
  .endorsement-inner {
    grid-template-columns: 1fr;
  }
  .endorsement-badge {
    margin: 0 auto;
  }
}

/* Stats grid: 2-col on small tablet */
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Prevent any deeply nested flex from overflowing */
.footer-white-inner { overflow: hidden; }
.endorsement-banner { overflow: hidden; }

/* nav: hard clip at right edge on all widths */
#navbar { overflow: hidden; max-width: 100vw; }

/* Inline style grids in HTML pages: safety for grid-2 used with inline style */
[style*="grid-template-columns"] { min-width: 0; }
