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

:root{
  /* Tokens inspired by enviro-site-builder */
  --background: hsl(210 20% 98%);
  --foreground: hsl(215 25% 15%);
  --card: hsl(0 0% 100%);
  --muted: hsl(210 15% 93%);
  --muted-foreground: hsl(215 15% 45%);
  --border: hsl(210 20% 88%);
  --primary: hsl(215 35% 18%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(175 45% 40%);
  --secondary-foreground: hsl(0 0% 100%);
  --accent: hsl(25 95% 55%);
  --accent-foreground: hsl(0 0% 100%);

  --shadow-sm: 0 1px 2px 0 hsl(215 25% 15% / 0.06);
  --shadow-md: 0 4px 10px -2px hsl(215 25% 15% / 0.10);
  --shadow-lg: 0 12px 26px -10px hsl(215 25% 15% / 0.18);

  --radius: 14px;
  --max: 1280px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; background:var(--background); color:var(--foreground); }
body{
  font-family: Inter, "Noto Sans TC", system-ui, -apple-system, "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height:1.65;
}
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset: 3px; }

/* Layout containers */
.container,
.container-wide{ width:min(var(--max), calc(100% - 32px)); margin:0 auto; }

.site-header{
  position: sticky;
  top:0;
  z-index:50;
  border-bottom:1px solid hsl(210 20% 88% / 0.6);
  background: hsl(210 20% 98% / 0.92);
  backdrop-filter: blur(10px);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  height:64px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  height:36px; width:36px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:10px;
  background:var(--primary);
  color:var(--primary-foreground);
  font-weight:800;
}
.brand-mark.inverse{ background: var(--primary-foreground); color: var(--primary); }
.brand-text{ font-weight:700; letter-spacing:0.2px; display:none; }
@media (min-width: 560px){ .brand-text{ display:inline; } }

.nav-toggle{
  display:none;
  border:1px solid var(--border);
  background:var(--card);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
}
.nav{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
.nav-links{ display:flex; align-items:center; gap:6px; }
.nav-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:10px 12px;
  border-radius:10px;
  font-size:14px;
  font-weight:600;
  color: var(--muted-foreground);
  background: transparent;
  border:0;
  cursor:pointer;
  white-space: nowrap;
}

/* Ensure dropdown button typography matches other nav links */
.nav-link.dropdown-toggle{
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}
.nav-link.dropdown-toggle .caret{
  font-size: 14px;
  line-height: 1;
  opacity: .8;
}
.nav-link:hover{ background: var(--muted); color: var(--foreground); text-decoration:none; }
.nav-link.active{ background: hsl(175 45% 40% / 0.18); color: var(--foreground); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--card);
  font-weight:700;
  font-size:14px;
  box-shadow: var(--shadow-sm);
}
.btn:hover{ text-decoration:none; box-shadow: var(--shadow-md); transform: translateY(-1px); transition: .18s ease; }
.btn-primary{ background:var(--primary); color:var(--primary-foreground); border-color: var(--primary); }
.btn-secondary{ background:var(--secondary); color:var(--secondary-foreground); border-color: var(--secondary); }
.btn-accent{ background:var(--accent); color:var(--accent-foreground); border-color: var(--accent); }

.nav-cta{ margin-left: 6px; }

@media (max-width: 900px){
  .nav-toggle{ display:inline-flex; margin-left:auto; }
  .nav{ display:none; position:absolute; left:0; right:0; top:64px; background: var(--background); border-bottom:1px solid var(--border); padding:10px 0 14px; }
  .nav.open{ display:block; }
  .nav-links{ display:flex; flex-direction:column; align-items:stretch; gap:6px; width:min(var(--max), calc(100% - 32px)); margin:0 auto; }
  .nav-link{ border:1px solid var(--border); background:var(--card); }
  .nav-cta{ width:min(var(--max), calc(100% - 32px)); margin:8px auto 0; }
  .lang-actions{ margin-left:8px; }
}

/* Dropdown */
.nav-item.dropdown{ position: relative; }
.dropdown-toggle .caret{ font-size:12px; opacity:.9; }
.dropdown-menu{
  display:none;
  position:absolute;
  top: calc(100% + 10px);
  left:0;
  min-width: 280px;
  padding:8px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index:60;
}
.dropdown-item{
  display:block;
  padding:10px 12px;
  border-radius: 12px;
  font-weight:600;
  color: var(--muted-foreground);
  text-decoration:none;
}
.dropdown-item:hover{ background: var(--muted); color: var(--foreground); text-decoration:none; }
.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu,
.nav-item.dropdown.open .dropdown-menu{ display:block; }

@media (max-width: 900px){
  .nav-item.dropdown{ position: static; }
  .dropdown-menu{
    position: static;
    top:auto; left:auto;
    min-width: unset;
    box-shadow:none;
    padding:6px;
    margin-top: -4px;
  }
  .dropdown-item{ border:1px solid var(--border); background:var(--background); }
}

/* Page layout */
.site-main{ min-height: 60vh; }
.page-hero{
  background: var(--muted);
  padding: 48px 0;
  border-bottom: 1px solid hsl(210 20% 88% / 0.6);
}
.page-title{
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.4px;
}
.breadcrumbs{
  display:flex; flex-wrap:wrap; gap:8px;
  color: var(--muted-foreground);
  font-weight:600;
  font-size: 13px;
}
.crumb-sep{ opacity:.6; }

.section-padding{ padding: 28px 0 56px; }
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card:hover{ box-shadow: var(--shadow-md); transform: translateY(-2px); transition: .18s ease; }
.card-inner{ padding:16px; }
.card-title{ font-size: 18px; font-weight:800; margin: 8px 0 8px; }
.card-text{ color: var(--muted-foreground); font-size: 14px; margin:0; }
.icon-box{
  width: 44px; height: 44px; border-radius: 12px;
  background: hsl(175 45% 40% / 0.12);
  display:flex; align-items:center; justify-content:center;
  color: var(--secondary);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
}

.grid{ display:grid; gap:16px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1020px){ .grid-3{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px){ .grid-3, .grid-2{ grid-template-columns: 1fr; } }

.lead{ color: var(--muted-foreground); font-size: 16px; margin: 10px 0 0; max-width: 70ch; }

.kv{
  background: linear-gradient(180deg, var(--background) 0%, hsl(210 25% 94%) 100%);
  padding: 52px 0 26px;
}
.kv h1{ margin:0; font-size: clamp(32px, 4.5vw, 52px); line-height:1.05; letter-spacing:-0.6px; }
.kv p{ margin:12px 0 0; color: var(--muted-foreground); max-width: 72ch; }
.kv-actions{ margin-top: 16px; display:flex; gap:10px; flex-wrap:wrap; }

.divider{ height:1px; background: hsl(210 20% 88% / 0.8); margin: 16px 0; }

.faq details{ border:1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.faq details + details{ margin-top: 10px; }
.faq summary{ cursor:pointer; font-weight:800; }
.faq .ans{ margin-top: 8px; color: var(--muted-foreground); }

.site-footer{
  background: var(--primary);
  color: var(--primary-foreground);
  margin-top: 42px;
}
.footer-inner{
  padding: 46px 0 30px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.footer-bottom{
  padding: 14px 0 18px;
  border-top: 1px solid hsl(0 0% 100% / 0.12);
  color: hsl(0 0% 100% / 0.8);
}
.footer-title{ font-weight:800; font-size: 18px; }
.footer-heading{ font-weight:800; margin-bottom:8px; }
.footer-muted{ color: hsl(0 0% 100% / 0.78); font-size: 14px; max-width: 46ch; }
.footer-list{ list-style:none; padding:0; margin:0; }
.footer-list li{ margin:8px 0; color: hsl(0 0% 100% / 0.82); font-size: 14px; }
.footer-list a:hover{ color: #fff; text-decoration:underline; }
.footer-brand{ display:flex; align-items:center; gap:10px; margin-bottom: 10px; }

@media (max-width: 1020px){ .footer-inner{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px){ .footer-inner{ grid-template-columns: 1fr; } }

/* Tables/forms (minimal skeleton) */
.table{ width:100%; border-collapse:collapse; background: var(--card); border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; }
.table th, .table td{ border-bottom:1px solid var(--border); padding:12px; text-align:left; vertical-align:top; }
.table th{ background: hsl(210 15% 96%); font-size: 13px; letter-spacing: .2px; }
.table tr:last-child td{ border-bottom:0; }

.form{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .full{ grid-column: 1 / -1; }
.input, textarea, select{
  width:100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font: inherit;
}
textarea{ min-height: 140px; resize: vertical; }
@media (max-width: 720px){ .form{ grid-template-columns: 1fr; } }

/* Language switch + CTA */
.lang-actions{display:flex;align-items:center;gap:12px;}
.lang-switch{position:relative;}
.lang-toggle{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid rgba(0,0,0,.12);border-radius:8px;background:#fff;font-weight:600;cursor:pointer;}
.lang-toggle .lang-icon{font-size:16px;line-height:1;}
.lang-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:120px;border:1px solid rgba(0,0,0,.12);border-radius:10px;background:#fff;box-shadow:0 10px 25px rgba(0,0,0,.08);padding:6px;display:none;z-index:50;}
.lang-menu a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;text-decoration:none;color:inherit;}
.lang-menu a:hover{background:rgba(0,0,0,.05);}
.lang-switch.open .lang-menu{display:block;}
.header-cta{display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;border-radius:10px;background:#0b5fff;color:#fff;text-decoration:none;font-weight:700;}
.header-cta:hover{filter:brightness(0.95);} 
@media (max-width: 860px){.lang-actions{gap:8px}.header-cta{padding:8px 12px}}


/* --- Header alignment + single CTA --- */
.lang-actions{ margin-left:12px; }
@media (min-width: 920px){
  .header-inner{ justify-content:flex-start; }
  .nav{ margin-left:auto; }
  .lang-actions{ margin-left:0; }
}


/* Consult button unified style (gray) */
.btn-consult{ background:#6c757d !important; border-color:#6c757d !important; color:#fff !important; }
.btn-consult:hover{ filter:brightness(0.95); }
/* Footer contact icons */
.contact-icons{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.contact-icon{
  width: 38px;
  height: 38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid hsl(0 0% 100% / 0.18);
  border-radius: 10px;
  text-decoration:none;
}
.contact-icon:hover{
  border-color: hsl(0 0% 100% / 0.38);
}
.contact-icon img{
  width: 20px;
  height: 20px;
  display:block;
  filter: grayscale(100%) saturate(0);
  opacity: 0.55;
  transition: filter .18s ease, opacity .18s ease, transform .18s ease;
}
.contact-icon:hover img,
.contact-icon:focus-visible img{
  filter: none;
  opacity: 1;
  transform: translateY(-1px);
}
.contact-icon:focus-visible{
  outline: 2px solid hsl(0 0% 100% / 0.45);
  outline-offset: 3px;
}


#formStatus{ line-height:1.4; }


/* === Projects filter UI (scheme: filter + region chips) === */
.filter-card .muted{ margin-top:6px; }
.label{ display:block; font-weight:600; margin: 0 0 6px; margin-top: 16px;}
.filter-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top: 10px; }
.chip-group{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 8px; }
.chip{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  user-select:none;
  font-size: 14px;
}
.chip[aria-pressed="true"]{
  border-color: var(--text);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--text) 18%, transparent);
}

.chip:hover{
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.chip.active{
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 18%, transparent);
}
.chip.active:hover{
  filter: brightness(0.98);
}
.project-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 18px;
  align-items: stretch;
}
.project-card .meta{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.badge{
  display:inline-flex; align-items:center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: hsl(210 15% 96%);
  border: 1px solid var(--border);
}
.project-card h3{ margin: 0; font-size: 18px; line-height:1.25; }
.project-card p{ margin: 8px 0 0; }
@media (max-width: 980px){ .project-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px){ .project-grid{ grid-template-columns: 1fr; } }


/* === Projects filter UI refinements (spacing + harmony) === */
.filter-card{ padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in oklab, var(--card) 92%, white 8%); }
.filter-card h2{ margin: 0; }
.filter-card .muted{ margin-top: 6px; }
.filter-card .form{ gap: 16px 18px; }
.filter-card .chip-group{ margin-top: 10px; }
.filter-card .filter-actions{ margin-top: 12px; }
.project-card{ display:flex; flex-direction:column; gap: 8px; padding: 18px; }
.project-card h3{ font-size: 17px; line-height: 1.28; }
.project-card .meta{ margin-top: 6px; }
.project-card .filter-actions{ margin-top: auto; padding-top: 10px; }
@media (max-width: 980px){ .project-grid{ gap: 16px; } }


/* === Locations page (service areas) === */
.loc-note{ margin-bottom:14px; }
.loc-layout{ display:grid; grid-template-columns: 340px 1fr; gap:20px; align-items:start; }
.loc-panel{ border:1px solid var(--border); background:var(--card); border-radius:16px; padding:18px; }
.loc-header{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:14px; border-bottom:1px solid var(--border); margin-bottom:16px; }
.loc-actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.loc-sections{ margin-top:0; }
.loc-section{ border:1px solid var(--border); border-radius:14px; padding:14px; background: var(--bg); }
.loc-section-title{ font-weight:700; margin-bottom:8px; }
.loc-list{ margin:0; padding-left:18px; }
.loc-list li{ margin: 6px 0; }
@media (max-width: 1020px){
  .loc-layout{ grid-template-columns: 1fr; }
  .loc-actions{ justify-content:flex-start; }
}


/* === About: icons + process steps === */
.section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:26px 0 12px;
  font-weight:700;
}
.section-title .title-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  color: var(--secondary);
}
.section-title .title-icon svg{
  display:block;
  width:100%;
  height:100%;
}

.keyline{
  margin:14px 0 0;
  padding:14px 16px;
  border-left:4px solid var(--accent);
  background: hsl(25 95% 55% / 0.08);
  border-radius: 12px;
}
.keyline strong{
  display:block;
  margin-bottom:4px;
}

.process-steps{
  list-style:none;
  padding:0;
  margin:16px 0 0;
  display:grid;
  gap:12px;
}
.process-steps > li{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding:14px 16px;
  box-shadow: var(--shadow-sm);
}
.step-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.step-badge{
  width:30px;
  height:30px;
  border-radius:999px;
  background: var(--muted);
  color: var(--foreground);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  flex:0 0 30px;
}
.step-content{
  flex:1;
  min-width:0; /* prevents character-by-character wrapping in flex */
}
.step-title{
  margin:0;
  font-weight:700;
}
.step-desc{
  margin:6px 0 0;
  color: var(--muted-foreground);
  line-height:1.7;
}

@media (max-width: 640px){
  .process-steps > li{ padding:12px 14px; }
  .step-row{ gap:10px; }
}


/* ABOUT CAROUSEL */
.about-carousel{margin-top:6px}
.carousel-viewport{
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.carousel-viewport::-webkit-scrollbar{display:none}
.carousel-track{
  display:flex;
  gap:16px;
  padding:6px 2px 12px;
}
.carousel-slide{
  scroll-snap-align:start;
  flex:0 0 var(--slide-basis, 520px);
  text-decoration:none;
  color:inherit;
}
.snapshot-card{
  background:#fff;
  border:1px solid rgba(30,41,59,.10);
  border-radius:16px;
  padding:12px 14px 12px;
  box-shadow:0 6px 18px rgba(15,23,42,.06);
  height:auto;
  display:flex;
  flex-direction:column;
}
.snapshot-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.icon-badge{
  width:34px;height:34px;border-radius:10px;
  background:rgba(15,23,42,.06);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;flex:0 0 34px;
}
.snapshot-title{font-weight:800;font-size:19px;letter-spacing:.2px}
.snapshot-body{margin:0;flex:1;min-height:0;overflow:visible;padding-right:4px}
.snapshot-body p{margin:0;font-size:16.5px;line-height:1.6;color:#334155}
.snapshot-body ul{margin:0 0 0 18px;padding:0;color:#334155;font-size:16.2px;line-height:1.55}
.snapshot-body li{margin:0 0 6px}
.snapshot-body::-webkit-scrollbar{width:8px}
.snapshot-body::-webkit-scrollbar-thumb{background:rgba(15,23,42,.18);border-radius:999px}
.snapshot-body::-webkit-scrollbar-track{background:transparent}
.carousel-dots{display:flex;justify-content:center;gap:8px;margin-top:10px}
.carousel-dot{
  width:8px;height:8px;border-radius:999px;
  background:rgba(15,23,42,.22);
  border:0;cursor:pointer;
  transition:width .15s ease, background .15s ease;
}
.carousel-dot[aria-selected="true"]{width:18px;background:rgba(15,23,42,.45)}
@media (max-width: 480px){
  .snapshot-card{height:210px}
  .snapshot-title{font-size:17px}
  .snapshot-body{margin:0;flex:1;min-height:0;overflow:visible;padding-right:4px}
.snapshot-body p{margin:0;font-size:16.5px;line-height:1.6;color:#334155}
.snapshot-body ul{margin:0 0 0 18px;padding:0;color:#334155;font-size:16.2px;line-height:1.55}
.snapshot-body li{margin:0 0 6px}
.snapshot-body::-webkit-scrollbar{width:8px}
.snapshot-body::-webkit-scrollbar-thumb{background:rgba(15,23,42,.18);border-radius:999px}
.snapshot-body::-webkit-scrollbar-track{background:transparent}
}



/* EQUAL HEIGHT SNAPSHOT */
.snapshot-card{will-change:height}


/* About page enhancements */
.about-chip-nav{ margin-top: 10px; }
.about-snapshots{ margin-top: 14px; }
.about-snapshots .snapshot-card{ height: auto; }
.about-cta{
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(30,41,59,.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(2,132,199,.06) 0%, rgba(15,23,42,.02) 100%);
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
}
.about-cta-title{ font-weight:800; font-size: 16.5px; letter-spacing:.2px; }
.about-cta-body{ margin:6px 0 0; color: var(--muted-foreground); font-size: 14.5px; line-height:1.55; max-width: 80ch; }
.about-cta-actions{ display:flex; gap:10px; flex-wrap:wrap; }
@media (max-width: 720px){
  .about-cta{ flex-direction:column; align-items:flex-start; }
}

/* Anchor offset for sticky header */
html{scroll-behavior:smooth;scroll-padding-top:84px;}
:target{scroll-margin-top:84px;}
@media (max-width: 768px){html{scroll-padding-top:96px;} :target{scroll-margin-top:96px;}}
