/* ==========================================================================
   永亨工程股份有限公司 網站樣式
   主色取自原站分析：#f97d28（design.md）
   字型：Noto Sans TC（中文本文/標題）、Barlow（按鈕英數字）
   ========================================================================== */

:root {
  --color-main: #f97d28;
  --color-main-light-07: rgba(249, 125, 40, 0.07);
  --color-main-light-20: rgba(249, 125, 40, 0.2);
  --color-secondary: #fa9753;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #40404c;
  --color-bg-alt-1: #fbfbfa;
  --color-bg-alt-2: #f3f3f2;
  --color-bg-alt-3: #f2f2f2;
  --color-nav-text: #999999;

  --font-body: "Noto Sans TC", "Hiragino Sans", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-button: "Barlow", "Noto Sans TC", "Microsoft JhengHei", sans-serif;

  --max-width: 1200px;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  font-size: 16px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.4;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  color: var(--color-main);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75em;
}

section {
  padding: 64px 0;
}

/* ---------- 導覽列 Header/Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid #eee;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-brand img {
  height: 40px;
  width: auto;
}

.nav-brand img.nav-badge {
  height: 20px;
}

.nav-brand-name {
  font-weight: 700;
  color: var(--color-black);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-black);
  border-radius: 2px;
}

.nav-links {
  display: none;
  list-style: none;
  flex-direction: column;
  width: 100%;
  gap: 4px;
  padding-top: 16px;
}

.nav-links.is-open {
  display: flex;
}

.nav-links a {
  display: block;
  padding: 10px 4px;
  color: var(--color-nav-text);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--color-main);
}

.nav-phone {
  display: block;
  margin-top: 8px;
  padding: 10px 4px;
  color: var(--color-main);
  font-family: var(--font-button);
  font-weight: 700;
}

/* ---------- 按鈕 ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-button);
  font-size: 100%;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  background: var(--color-main);
  color: var(--color-white);
  cursor: pointer;
  transition: all 0.15s;
  background-clip: border-box;
}

.btn:hover {
  background: #e06b1a;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 120px 0;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}

.hero .eyebrow {
  color: var(--color-secondary);
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
}

.hero .hero-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.5em;
}

.hero .hero-body {
  font-size: 1.05rem;
}

/* ---------- 關於我們（rows） ---------- */

.about {
  background: var(--color-white);
}

.about-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.about-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  margin-bottom: 56px;
}

.about-row:last-child {
  margin-bottom: 0;
}

.about-row-media,
.about-row-text {
  width: 100%;
}

.about-row-media img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
}

.about-row-text .subheading {
  color: var(--color-main);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75em;
}

.about-row-text ul {
  list-style: none;
}

.about-row-text ul li {
  margin-bottom: 0.6em;
}

/* ---------- 服務項目（columns） ---------- */

.services {
  background: var(--color-bg-alt-1);
}

.services-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.service-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-card-body {
  padding: 20px;
  text-align: center;
}

.service-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3em;
}

.service-card-body p {
  margin: 0;
  color: var(--color-nav-text);
}

/* ---------- 肯定與認證（feature list rows） ---------- */

.certifications {
  background: var(--color-white);
}

.certifications-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.feature-list {
  list-style: none;
  max-width: 820px;
  margin: 0 auto;
}

.feature-list-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-bg-alt-3);
}

.feature-list-item:last-child {
  border-bottom: none;
}

.feature-list-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.feature-list-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3em;
}

.feature-list-item p {
  margin: 0;
  color: var(--color-nav-text);
}

/* ---------- 工程實績（portfolio） ---------- */

.portfolio {
  background: var(--color-bg-alt-2);
}

.portfolio-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.portfolio-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: var(--color-white);
  font-weight: 700;
  margin: 0;
}

/* ---------- 全幅輪播 Banner ---------- */

.banner-slider {
  position: relative;
  height: 260px;
  overflow: hidden;
  padding: 0;
}

.banner-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.banner-slide.is-active {
  opacity: 1;
}

/* ---------- 聯絡我們 ---------- */

.contact {
  position: relative;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.contact .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact .eyebrow {
  color: var(--color-secondary);
}

.contact-info h3 {
  margin-top: 1.2em;
  font-size: 1rem;
  color: var(--color-secondary);
}

.contact-info p {
  margin: 0.2em 0 0;
}

.contact-info a {
  text-decoration: underline;
}

.contact-form {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  padding: 28px;
  border-radius: var(--radius);
}

.contact-form .form-note {
  color: var(--color-nav-text);
  font-size: 0.9rem;
  margin-bottom: 1.2em;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
}

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

.required {
  color: var(--color-main);
}

/* ---------- 人才招募頁 專用區塊 ---------- */

.page-hero {
  padding: 72px 0;
  text-align: center;
  background: var(--color-bg-alt-1);
}

.page-hero h1 {
  color: var(--color-black);
}

.benefits {
  background: var(--color-white);
}

.benefits-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.benefits-list {
  list-style: none;
  max-width: 820px;
  margin: 0 auto;
}

.benefits-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-bg-alt-3);
}

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

.benefits-list h3 {
  font-size: 1.05rem;
  margin-bottom: 0.2em;
  color: var(--color-main);
}

.benefits-list p {
  margin: 0;
}

.jobs {
  background: var(--color-bg-alt-2);
}

.jobs-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.job-card {
  background: var(--color-white);
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.job-card h3 {
  color: var(--color-main);
}

.job-card ol,
.job-card ul {
  padding-left: 1.4em;
  margin: 0 0 1em;
}

.job-card ul.perk-list {
  list-style: none;
  padding-left: 0;
}

.job-card ul.perk-list li {
  margin-bottom: 0.4em;
}

.job-card .job-contact {
  margin-top: 1.5em;
  padding-top: 1.2em;
  border-top: 1px solid var(--color-bg-alt-3);
  font-weight: 700;
}

.job-card .job-contact a {
  color: var(--color-main);
  text-decoration: underline;
}

/* ==========================================================================
   RWD 中斷點
   ========================================================================== */

@media (min-width: 768px) {
  .about-row {
    flex-direction: row;
    gap: 48px;
  }

  .about-row-media,
  .about-row-text {
    width: 50%;
  }

  .about-row.reverse {
    flex-direction: row-reverse;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact .container {
    flex-direction: row;
  }

  .contact-info,
  .contact-form {
    width: 50%;
  }
}

@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    width: auto;
    padding-top: 0;
    gap: 32px;
    align-items: center;
  }

  .nav {
    flex-wrap: nowrap;
  }

  .nav-phone {
    margin-top: 0;
    padding: 0;
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
