/* =============================================
   智城建設 – 靜態站 styles.css
   配色：主黃 #fdda1c + 主藍 #004087 活潑台灣建設業風
   ============================================= */

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

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

body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', '微軟正黑體', Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.8;
  background: #fff;
}

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

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

ol, ul {
  padding-left: 1.5em;
}

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography helpers ---- */
.section-title {
  font-size: 34px;
  font-weight: 600;
  line-height: 49px;
  color: #004087;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

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

.section-lead {
  font-size: 23px;
  line-height: 1.6;
  color: #606060;
  margin-bottom: 2rem;
  max-width: 780px;
}

/* ---- Yellow highlight mark ---- */
mark.hl-yellow {
  background: linear-gradient(transparent 40%, transparent 40%, #fdda1c 90%, transparent 95%);
  padding: 2px 1px;
  color: inherit;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #fdda1c;
  transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  background: #fdda1c;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

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

.nav-link {
  color: #004087;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  letter-spacing: 0.04em;
}

.nav-link:hover {
  background: #fff;
  color: #004087;
  border-color: #004087;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #004087;
  transition: transform 0.3s, opacity 0.3s;
}

/* =============================================
   HERO SLIDER
   ============================================= */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

/* 左側黃色三角幾何裝飾 */
.hero-deco {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}

.hero-deco--left {
  left: 0;
  top: 0;
  width: 22%;
  height: auto;
}

.hero-deco--right {
  right: 0;
  top: 0;
  width: 22%;
  height: auto;
}

/* Logo 絕對定位疊在左上方 banner 上 */
.hero-logo-overlay {
  position: absolute;
  top: 80px;
  left: 80px;
  z-index: 10;
  height: 120px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  pointer-events: none;
}

.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
  z-index: 10;
}

.hero-btn:hover {
  background: rgba(253, 218, 28, 0.5);
}

.hero-btn-prev { left: 20px; }
.hero-btn-next { right: 20px; }

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background 0.2s;
}

.hero-dot.active {
  background: #fdda1c;
  border-color: #fdda1c;
}

/* =============================================
   承攬實績 / 為何選擇智城
   ============================================= */
.section-records {
  padding: 80px 0 60px;
  background: linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)), url('images/portfolio-cover.jpg') center/cover;
}

/* 左圖右文兩欄 */
.why-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 32px;
}

.why-left {
  display: flex;
  justify-content: center;
}

.records-stats {
  max-width: 380px;
  width: 100%;
  height: auto;
}

.why-right .section-title {
  margin-top: 0;
}

.records-subtitle {
  font-size: 1.4rem;
  font-weight: 700;
  color: #004087;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #fdda1c;
  display: inline-block;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.project-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: box-shadow 0.25s, transform 0.25s;
}

.project-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  transform: translateY(-3px);
}

.project-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.project-card-body {
  padding: 20px;
}

.project-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 38px;
  color: #004087;
  margin-bottom: 12px;
  background: linear-gradient(transparent 60%, #fdda1c 60%);
  display: inline;
}

.project-info {
  font-size: 17px;
  font-weight: 400;
  line-height: 30px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  color: #606060;
  margin-top: 12px;
}

.project-info dt {
  font-weight: 400;
  color: #004087;
  white-space: nowrap;
}

/* =============================================
   痛點訴求 + 服務 infographic
   ============================================= */
.section-painpoints {
  padding: 80px 0;
  background: #fff url('images/P3_001.png') center/cover no-repeat;
  color: #333;
}

.painpoints-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  align-items: start;
}

/* 左欄：對話框群 */
.painpoints-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 對話框卡片 */
.painpoint-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 標題列 */
.painpoint-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.painpoint-head h3 {
  font-size: 30px;
  font-weight: 700;
  line-height: 42px;
  margin: 0;
}

.painpoint-head--blue   { background: #1c7dc1; }
.painpoint-head--amber  { background: #f5ae1b; }
.painpoint-head--green  { background: #1a9979; }

/* 內文塊 */
.painpoint-body {
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.painpoint-body--gray  { background: #f6f6f6; }
.painpoint-body--cream { background: #fff8e1; }
.painpoint-body--mint  { background: #deefe9; display: block; }

.painpoint-body-text {
  flex: 1;
  font-size: 17px;
  font-weight: 400;
  line-height: 25.5px;
  color: #333;
}

.painpoint-body-text p {
  margin-bottom: 0.5rem;
}

.painpoint-illus {
  width: 25%;
  max-width: 120px;
  height: auto;
  flex-shrink: 0;
}

/* 補充說明塊 */
.painpoint-note {
  background: #f6f6d9;
  padding: 14px 18px;
  font-size: 17px;
  color: #333;
  line-height: 1.5;
}

/* 右欄：服務 infographic */
.service-infographics {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.service-ribbon {
  max-width: 360px;
  width: 100%;
  height: auto;
}

.service-wheel {
  max-width: 100%;
  height: auto;
}

.service-process {
  max-width: 100%;
  height: auto;
}

/* =============================================
   關於智城
   ============================================= */
.section-about {
  padding: 80px 0 30px;
  background: #fff;
}

/* 金框文字疊壓董事長照（照原站幾何：照片靠右 63%、金框 58% 從照片上緣 ~36% 處疊上） */
.about-stage {
  position: relative;
  margin-bottom: 70px;
}

.about-photo {
  width: 63%;
  margin-left: auto;
  position: relative;
}

.about-photo::before {
  content: '';
  position: absolute;
  top: -45px;
  right: -18px;
  width: 100px;
  height: 290px;
  background: #fdda1c;
}

.about-photo img {
  position: relative;
  display: block;
  width: 100%;
}

/* 金框文字卡 */
.about-content {
  border: 10px solid #fdda1c;
  background: #fff;
  box-shadow: 0 3px 5px rgba(0,0,0,0.18);
  padding: 30px 28px;
  position: relative;
  z-index: 2;
  width: 58%;
  margin-top: -360px;
}

.about-content p {
  text-indent: 2em;
}

/* 純黃裝飾塊（about-pattern.jpg 錯位） */
.about-content::before {
  content: '';
  position: absolute;
  top: -18px;
  left: -18px;
  width: 80px;
  height: 80px;
  background: url('images/about-pattern.jpg') center/cover;
  z-index: -1;
  opacity: 0.7;
}

.about-content h2 {
  margin-bottom: 1rem;
}

.about-content p {
  color: #393939;
  margin-bottom: 1rem;
  font-size: 23px;
  font-weight: 400;
  line-height: 41px;
  text-align: justify;
}

.about-image img {
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  width: 100%;
  object-fit: cover;
}

/* 整合能力 / 設計規劃 各自區塊 */
.capability-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}

.capability-section--design .capability-image {
  order: -1;
}

.capability-text {
  padding: 20px 0;
}

.capability-title {
  font-size: 37px;
  font-weight: 900;
  line-height: 1.1;
  color: #004087;
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

/* 短黃橫 divider */
.capability-divider {
  display: block;
  width: 250px;
  height: 2px;
  background: #fdda1c;
  margin-bottom: 1rem;
}

.capability-text p {
  color: #606060;
  font-size: 23px;
  font-weight: 400;
  line-height: 41px;
  margin-bottom: 0.75rem;
  text-align: justify;
}

.capability-list {
  color: #606060;
  font-size: 23px;
  font-weight: 400;
  line-height: 41px;
}

.capability-list li {
  margin-bottom: 0.4rem;
}

.capability-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-height: 500px;
}

/* 整合能力照片裝飾 */
.capability-section--integration .capability-image {
  position: relative;
}

.capability-section--integration .capability-image::before {
  content: '';
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 80px;
  height: 80px;
  background: url('images/about-pattern.jpg') center/cover;
  z-index: -1;
  opacity: 0.6;
}

/* =============================================
   關於森城
   ============================================= */
.section-sencity {
  padding: 60px 0;
  background: #fff;
}

/* 黃塊外層細框（白底 + 1px 灰框，照原站） */
.sencity-frame {
  max-width: 1170px;
  margin: 0 auto;
  border: 1px solid #ddd;
  background: #fff;
  padding: 20px;
}

/* 中間鮮黃長條 banner */
.sencity-banner {
  background: #fdda1c;
  padding: 36px 48px;
}

.sencity-title {
  font-size: 31px;
  font-weight: 900;
  line-height: 1.1;
  color: #004087;
  margin-bottom: 18px;
  text-align: left;
}

.sencity-text {
  text-align: left;
  color: #1a1a1a;
  font-size: 23px;
  font-weight: 400;
  line-height: 41px;
}

/* =============================================
   智城都更案 — 磁磚馬賽克（full-width）
   ============================================= */
.section-cases {
  padding: 0 0 60px;
  background: #fff;
}

.case-study {
  margin-bottom: 0;
}

.section-cases {
  padding-top: 60px;
}

/* 磁磚牆：全寬、無左右留白 */
.case-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  grid-auto-rows: minmax(330px, auto);
  width: 100%;
}

/* 照片磁磚 */
.case-tile--photo {
  background: #ececec;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.3s;
}

.case-tile--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-tile--photo:hover {
  opacity: 0.88;
}

/* 資訊磁磚 */
.case-tile--info {
  background: #f7f8fa;
  border: 1px solid rgba(128,128,128,0.4);
  padding: 20px;
  color: #393939;
  overflow-y: auto;
}

/* 主圖磁磚（跨2列 = 670px） */
.case-tile--main {
  grid-row: span 2;
}

/* 資訊磁磚也跨2列（與主圖同高） */
.case-tile--tall {
  grid-row: span 2;
}

/* 區塊小標（放標題磁磚內，照原站） */
.case-label {
  font-size: 35px;
  font-weight: 600;
  line-height: 49px;
  color: #393939;
  margin: 8px 0 4px;
}

/* 標題 */
.case-title {
  font-size: 50px;
  font-weight: 900;
  line-height: 70px;
  color: #393939;
  margin-bottom: 16px;
  text-align: center;
}

.case-title--sub {
  font-size: 26px;
  font-weight: 600;
  line-height: 37px;
  text-align: left;
  margin-bottom: 12px;
}

/* 規格／團隊：單行列點（照原站） */
.case-lines {
  list-style: disc;
  padding-left: 1.3em;
  font-size: 19px;
  font-weight: 400;
  line-height: 34px;
  color: #393939;
}

.case-lines li {
  margin-bottom: 4px;
}

/* 團隊資訊原站 20px、無列點 */
.case-lines--team {
  list-style: none;
  padding-left: 0;
  font-size: 20px;
  line-height: 36px;
}

/* 對話框內紅色強調句（原站 #e34444 / w600） */
.painpoint-emphasis {
  color: #e34444;
  font-weight: 600;
}

/* 兩案分隔線 */
.case-divider {
  height: 3px;
  background: #fdda1c;
  margin: 48px 0;
}

/* =============================================
   聯絡
   ============================================= */
.section-contact {
  padding: 80px 0;
  background: #fdda1c;
  color: #004087;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  background: none;
  border: none;
  padding: 0;
}

.contact-card-title {
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  color: #004087;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.contact-company {
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
  color: #004087;
  margin-bottom: 20px;
}

.contact-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.contact-info dt {
  font-weight: 600;
  color: #004087;
  white-space: nowrap;
}

.contact-info dd {
  color: #004087;
}

.contact-info a {
  color: #004087;
  transition: opacity 0.2s;
}

.contact-info a:hover {
  opacity: 0.7;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #393939;
  padding: 20px 0;
  text-align: center;
  color: #ffffff;
  font-size: 15px;
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 200;
}

.lightbox-backdrop.open {
  display: block;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 201;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.2s;
  z-index: 202;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(253, 218, 28, 0.5);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  font-size: 1.1rem;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

/* =============================================
   RESPONSIVE — max-width: 900px
   ============================================= */
@media (max-width: 900px) {
  /* 承攬實績：左圖右文改單欄 */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .records-stats {
    max-width: 300px;
    margin: 0 auto;
  }

  /* Hero deco 縮小 */
  .hero-deco--left,
  .hero-deco--right {
    height: 70%;
  }

  .hero-logo-overlay {
    top: 72px;
    left: 40px;
    height: 80px;
  }

  /* sencity-banner 縮 padding */
  .sencity-banner {
    padding: 24px 24px;
  }

  .sencity-title {
    font-size: 24px;
  }

  .sencity-text {
    font-size: 16px;
    line-height: 1.8;
  }

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

  /* 痛點：改單欄 */
  .painpoints-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* 關於智城：取消疊壓、改堆疊 */
  .about-photo {
    width: 100%;
  }

  .about-photo::before {
    display: none;
  }

  .about-content {
    width: 100%;
    margin-top: 24px;
  }

  /* 整合/設計：改單欄 */
  .capability-section {
    grid-template-columns: 1fr;
  }

  .capability-section--design .capability-image {
    order: 0;
  }

  /* 聯絡：改單欄 */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* 都更案磁磚：平板2欄 */
  .case-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(220px, auto);
  }

  .case-title {
    font-size: 34px;
    line-height: 1.3;
  }

  .case-tile--main {
    grid-row: span 2;
  }

  .case-tile--tall {
    grid-row: span 2;
  }
}

/* =============================================
   RESPONSIVE — max-width: 640px
   ============================================= */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fdda1c;
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 24px;
    border-radius: 0;
  }

  .nav-link:hover {
    background: rgba(255,255,255,0.5);
  }

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

  .section-title {
    font-size: 26px;
    line-height: 1.4;
  }

  .hero-btn {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }

  /* Hero deco 手機隱藏（避免遮太多內容） */
  .hero-deco--left,
  .hero-deco--right {
    display: none;
  }

  .hero-logo-overlay {
    top: 72px;
    left: 16px;
    height: 60px;
  }

  .case-title {
    font-size: 28px;
    line-height: 1.3;
  }

  .case-title--sub {
    font-size: 18px;
  }

  .contact-company {
    font-size: 22px;
  }

  .contact-card-title,
  .contact-info {
    font-size: 16px;
  }

  /* 手機磁磚改單欄 */
  .case-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(220px, auto);
  }

  .case-tile--main,
  .case-tile--tall {
    grid-row: span 1;
  }

  .case-tile--info {
    height: auto;
    min-height: 220px;
  }
}
