/* ============================================================
   Sun Chiap Accounting Service — Shared Stylesheet
   Responsive: Mobile / Tablet / Desktop
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #fff;
  color: #333;
  font-size: 15px;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ══════════════════════════════════════════════
   TOP NAV — Desktop
   ══════════════════════════════════════════════ */
.topbar {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 200;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
}
.logo img { height: 44px; }

/* Desktop nav links */
.main-nav {
  display: flex;
  list-style: none;
  height: 70px;
  align-items: stretch;
}
.main-nav > li {
  position: relative;
  display: flex;
  align-items: center;
}
.main-nav > li > a,
.main-nav > li > .nav-parent {
  display: flex;
  align-items: center;
  padding: 0 13px;
  height: 70px;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  user-select: none;
}
.main-nav > li:hover > a,
.main-nav > li:hover > .nav-parent,
.main-nav > li.active > a {
  color: #555;
  border-bottom-color: #222;
}
.main-nav > li:hover .sub-menu { display: block; }

.sub-menu {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: 3px solid #222;
  min-width: 310px;
  z-index: 300;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
}
.sub-menu a {
  display: block;
  padding: 9px 20px;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}
.sub-menu a:last-child { border-bottom: none; }
.sub-menu a:hover { background: #f5f5f5; }

/* Language + WhatsApp */
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-links { display: flex; gap: 3px; align-items: center; }
.lang-links a {
  font-size: 12px;
  color: #555;
  padding: 4px 8px;
  border: 1px solid #ccc;
  transition: all .2s;
  white-space: nowrap;
}
.lang-links a:hover,
.lang-links a.active { background: #222; color: #fff; border-color: #222; }

.wa-link {
  font-size: 12.5px;
  color: #333;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid #333;
  white-space: nowrap;
  transition: all .2s;
}
.wa-link:hover { background: #333; color: #fff; }

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  margin-left: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  overflow-y: auto;
  z-index: 199;
  border-top: 1px solid #eee;
}
.mobile-nav.open { display: block; }
.mobile-nav-item { border-bottom: 1px solid #eee; }
.mobile-nav-item > a,
.mobile-nav-item > .mob-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  cursor: pointer;
}
.mob-arrow { font-size: 11px; color: #999; transition: transform .25s; }
.mobile-nav-item.open .mob-arrow { transform: rotate(180deg); }
.mob-sub { display: none; background: #f8f8f8; }
.mobile-nav-item.open .mob-sub { display: block; }
.mob-sub a {
  display: block;
  padding: 10px 20px 10px 32px;
  font-size: 13px;
  color: #444;
  border-bottom: 1px solid #eee;
}
.mob-sub a:last-child { border-bottom: none; }
.mob-sub a:hover { background: #f0f0f0; }
.mobile-nav-footer {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-nav-footer .lang-links { justify-content: flex-start; }
.mobile-nav-footer .wa-link { text-align: center; }

/* ══════════════════════════════════════════════
   PAGE BANNER
   ══════════════════════════════════════════════ */
.page-banner { width: 100%; overflow: hidden; background: #eee; }
.page-banner img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  object-position: center;
}

/* ══════════════════════════════════════════════
   INNER LAYOUT
   ══════════════════════════════════════════════ */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 70px;
}

/* ══════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════ */
h1, h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #222;
}
h3 { font-size: 16px; font-weight: 700; margin: 24px 0 10px; }
p { margin-bottom: 14px; }
ul, ol { padding-left: 22px; margin-bottom: 14px; }
li { margin-bottom: 5px; }
hr { border: none; border-top: 1px solid #e0e0e0; margin: 28px 0; }

/* ══════════════════════════════════════════════
   FULL-WIDTH IMAGE
   ══════════════════════════════════════════════ */
.full-img { width: 100%; margin: 20px 0; }

/* ══════════════════════════════════════════════
   ABOUT INTRO TEXT
   ══════════════════════════════════════════════ */
.about-intro {
  font-size: 15px;
  line-height: 1.85;
  color: #333;
  margin: 28px 0;
}

/* ══════════════════════════════════════════════
   SERVICES CARD ROW
   ══════════════════════════════════════════════ */
.services-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 28px 0;
}
.svc-card { position: relative; overflow: hidden; }
.svc-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .4s;
}
.svc-card:hover img { transform: scale(1.04); }
.svc-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.52);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.svc-label strong { font-size: 15px; }
.svc-label a {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.6);
  width: fit-content;
  transition: border-color .2s;
}
.svc-label a:hover { border-color: #fff; }

/* ══════════════════════════════════════════════
   FAQ LINK LIST
   ══════════════════════════════════════════════ */
.faq-links { display: flex; flex-direction: column; margin-bottom: 32px; }
.faq-links a {
  display: block;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  border: 1px solid #e0e0e0;
  border-top: none;
  transition: background .15s;
}
.faq-links a:first-child { border-top: 1px solid #e0e0e0; }
.faq-links a:hover { background: #f5f5f5; }

/* ══════════════════════════════════════════════
   NEXT PAGE BUTTON
   ══════════════════════════════════════════════ */
.next-page {
  display: inline-block;
  margin: 32px 0 8px;
  padding: 10px 28px;
  background: #222;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  transition: background .2s;
}
.next-page:hover { background: #555; }

/* ══════════════════════════════════════════════
   CONTACT GRID
   ══════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 24px;
}
.contact-info p { margin-bottom: 16px; font-size: 14.5px; line-height: 1.7; }
.contact-info strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #888;
  margin-bottom: 3px;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer {
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 40px 20px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-logo img { height: 38px; margin-bottom: 14px; }
.footer-social img { max-width: 210px; margin-top: 10px; }
.footer-contact h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.footer-contact p { font-size: 13px; color: #555; line-height: 1.7; margin-bottom: 6px; }
.footer-contact a:hover { color: #000; }
.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 14px;
  border-top: 1px solid #eee;
  font-size: 12px;
  color: #aaa;
  text-align: center;
}

/* ══════════════════════════════════════════════
   TABLET  (max 1024px)
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .main-nav > li > a,
  .main-nav > li > .nav-parent { padding: 0 10px; font-size: 12px; }
  .wa-link { padding: 5px 9px; font-size: 11.5px; }
}

/* ══════════════════════════════════════════════
   TABLET PORTRAIT / LARGE MOBILE  (max 860px)
   ══════════════════════════════════════════════ */
@media (max-width: 860px) {
  /* Hide desktop nav, show hamburger */
  .main-nav { display: none; }
  .hamburger { display: flex; }

  /* Banner shorter on tablet */
  .page-banner img { max-height: 340px; }

  /* Services: 2 columns on tablet */
  .services-row { grid-template-columns: repeat(2, 1fr); }

  /* Contact: stack on tablet portrait */
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Footer: stack */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ══════════════════════════════════════════════
   MOBILE  (max 540px)
   ══════════════════════════════════════════════ */
@media (max-width: 540px) {
  .topbar-inner { height: 60px; padding: 0 16px; }
  .logo img { height: 36px; }
  .mobile-nav { top: 60px; }

  /* Hide lang switcher in topbar on small screens — it's in mobile drawer */
  .nav-right .lang-links { display: none; }
  .nav-right .wa-link { display: none; }

  /* Banner: portrait crop */
  .page-banner img { max-height: 220px; object-position: center top; }

  /* Services: single column on mobile */
  .services-row { grid-template-columns: 1fr; }
  .svc-card img { aspect-ratio: 16/9; }

  /* Typography */
  h1, h2 { font-size: 19px; }
  .about-intro { font-size: 14px; }

  /* Content padding */
  .page-content { padding: 20px 16px 50px; }

  /* Next page button full-width */
  .next-page { display: block; text-align: center; }

  /* Footer */
  footer { padding: 28px 16px 16px; }
  .footer-social img { max-width: 160px; }
}

/* ══════════════════════════════════════════════
   IMAGE DISPLAY RULES
   ══════════════════════════════════════════════ */

/* Wide banner images — full width, fixed height crop */
.banner-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 0 20px;
}

/* Secondary banner — slightly shorter */
.banner-img-sm {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 0 24px;
}

/* Illustration / icon images — centred, natural width, max 320px */
.illus-img {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 20px auto;
}

/* Diagram / info images — centred, up to 800px */
.diagram-img {
  display: block;
  max-width: 800px;
  width: 100%;
  height: auto;
  margin: 20px auto;
}

/* Contact / narrow info images — centred, natural width */
.info-img {
  display: block;
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 16px auto;
}

/* ══════════════════════════════════════════════
   FAQ PAGE STYLES
   ══════════════════════════════════════════════ */
.page-content h2 { margin-top: 32px; }
.page-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}
.page-content ol li,
.page-content ul li { margin-bottom: 8px; font-size: 14.5px; }
.page-content a { color: #0066cc; }
.page-content a:hover { text-decoration: underline; }
/* Back to top links */
.page-content p > a[href^="#jump"] { color: #555; font-size: 13px; }

@media (max-width: 540px) {
  .page-content h2 { font-size: 17px; }
  .page-content h3 { font-size: 14px; }
}

/* ══════════════════════════════════════════════
   FAQ TABLE OF CONTENTS
   ══════════════════════════════════════════════ */
.faq-toc {
  background: #f7f7f7;
  border-left: 4px solid #222;
  padding: 20px 20px 20px 44px;
  margin: 24px 0 32px;
  font-size: 14.5px;
  line-height: 1.9;
}
.faq-toc li { margin-bottom: 4px; }
.faq-toc a { color: #0066cc; }
.faq-toc a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   CONTENT PAGE TYPOGRAPHY — consistent sizes
   ══════════════════════════════════════════════ */
.page-content p,
.page-content li { font-size: 15px; line-height: 1.8; }
.page-content h2 { font-size: 20px; margin-top: 36px; }
.page-content h3 { font-size: 16px; margin-top: 28px; }

/* Section divider */
.page-content hr { margin: 36px 0; border-top: 2px solid #e0e0e0; }

/* Back to top link */
.back-top { font-size: 12.5px; color: #999; display: inline-block; margin: 8px 0 24px; }
.back-top:hover { color: #333; }

/* ══════════════════════════════════════════════
   FOOTER — add privacy link
   ══════════════════════════════════════════════ */
.footer-links {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.footer-links {
  justify-content: center;
}
.footer-links a { font-size: 12px; color: #888; text-decoration: underline; }
.footer-links a:hover { color: #222; }

/* ══════════════════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════════════════ */
.contact-form { max-width: 600px; margin: 32px 0; }
.contact-form .field { margin-bottom: 18px; }
.contact-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555;
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  font-size: 14.5px;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s;
  appearance: none;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: #222; }
.contact-form textarea { height: 140px; resize: vertical; }
.contact-form .submit-btn {
  background: #222;
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s;
}
.contact-form .submit-btn:hover { background: #555; }
.form-note { font-size: 12.5px; color: #888; margin-top: 10px; }

/* ══════════════════════════════════════════════
   JURISDICTIONS GRID
   ══════════════════════════════════════════════ */
.juris-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 24px 0;
}
.juris-item {
  overflow: hidden;
}
.juris-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .3s;
}
.juris-item:hover img {
  transform: scale(1.02);
}

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

/* ══════════════════════════════════════════════
   PAGE HERO — background image with overlay + title
   (matches original WordPress cover blocks)
   ══════════════════════════════════════════════ */
.page-hero {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center 36%;
  background-repeat: no-repeat;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(134, 144, 160, 0.5);  /* #8690a0 at 50% — matches original */
}
.page-hero .hero-title {
  position: relative;
  z-index: 2;
  color: #1a2b4a;
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  padding: 20px;
  text-shadow: 0 1px 3px rgba(255,255,255,0.3);
}
.page-hero .hero-title.light { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* Softer variant for lighter overlays (charities dim=20) */
.page-hero.light-overlay::before { background: rgba(134, 144, 160, 0.2); }
.page-hero.mid-overlay::before   { background: rgba(134, 144, 160, 0.3); }

/* Content section with background continuation */
.content-band {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 48px 0;
}
.content-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
}
.content-band > .band-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Blue gradient content section — like original */
.blue-band {
  background: linear-gradient(160deg, #eaf3f8 0%, #d5e7f2 55%, #c3dcEC 100%);
  padding: 40px 0;
}
.blue-band > .band-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 860px) {
  .page-hero { min-height: 240px; }
  .page-hero .hero-title { font-size: 26px; }
}
@media (max-width: 540px) {
  .page-hero { min-height: 180px; }
  .page-hero .hero-title { font-size: 22px; }
}

/* Icon illustrations — small like original site (~100-140px) */
.illus-img { max-width: 140px !important; }

/* ══════════════════════════════════════════════
   DARK PAGE THEME — deep navy bg + yellow headings + white text
   (matches original tax-faqs / licenses / contact pages)
   ══════════════════════════════════════════════ */
.dark-section {
  position: relative;
  background-color: #092036;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  padding: 48px 0 64px;
}
.dark-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(9, 32, 54, 0.82);
}
.dark-section .dark-inner {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}
.dark-section h1,
.dark-section h2 {
  color: #fcf100;              /* yellow headings like original */
  border-bottom: none;
  font-size: 24px;
  margin: 36px 0 16px;
}
.dark-section h3 {
  color: #fcf100;
  font-size: 19px;
  font-weight: 700;
  margin: 32px 0 12px;
  border-bottom: none;
  text-transform: capitalize;
}
.dark-section p,
.dark-section li {
  color: #fff;
  font-size: 15px;
  line-height: 1.85;
}
.dark-section a { color: #7fd4ff; }
.dark-section a:hover { color: #fff; text-decoration: underline; }
.dark-section hr { border-top: 1px solid rgba(255,255,255,0.25); margin: 36px 0; }
.dark-section strong { color: inherit; }

/* Dark TOC — yellow underlined links like original */
.dark-section .faq-toc {
  background: transparent;
  border-left: none;
  padding: 8px 0 8px 24px;
  font-size: 17px;
  font-weight: 700;
  line-height: 2.1;
}
.dark-section .faq-toc a {
  color: #fcf100;
  text-decoration: underline;
}
.dark-section .faq-toc a:hover { color: #fff; }

/* Content band with image background (corporate formation blue) */
.img-band {
  position: relative;
  background-size: cover;
  background-position: center top;
  padding: 56px 0;
}
.img-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(214,235,246,0.82), rgba(255,255,255,0.9));
}
.img-band .band-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════════
   Fallback background colours — keep text readable
   even if background images fail to load
   ══════════════════════════════════════════════ */
.page-hero  { background-color: #9db0c4; }
.hp-hero    { background-color: #e8ecf0; }
.hp-about,
.hp-contact { background-color: #0c2d4d; }
.hp-section { background-color: #092036; }
.img-band   { background-color: #dfe7ee; }
.juris-hero { background-color: #e3e9ef; }
