/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", -apple-system, sans-serif;
  color: #222; line-height: 1.65; background: #fff;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

:root {
  --navy: #1b2a4a;
  --accent: #e8481c;   /* PalmCheck logo red-orange */
  --gray-bg: #f5f7fa;
  --gray-line: #e3e7ee;
}

/* ===== Header ===== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--gray-line);
}
#header .inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo img { height: 40px; width: auto; }
#gnb ul { display: flex; gap: 6px; }
#gnb a {
  display: block; padding: 10px 16px; font-weight: 600; font-size: 15px; color: var(--navy);
  border-radius: 6px; transition: .2s;
}
#gnb a:hover, #gnb a.active { color: var(--accent); background: #fdf0ec; }
.lang-switch { display: flex; margin-left: 14px; }
.lang-switch button {
  border: 1px solid var(--gray-line); background: #fff; padding: 6px 11px;
  font-size: 12px; font-weight: 700; color: #8a93a8; cursor: pointer; transition: .2s;
}
.lang-switch button:first-child { border-radius: 6px 0 0 6px; }
.lang-switch button:last-child { border-radius: 0 6px 6px 0; }
.lang-switch button + button { border-left: 0; }
.lang-switch button:hover { color: var(--navy); }
.lang-switch button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
#navToggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
#navToggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

/* ===== Hero ===== */
#hero {
  position: relative; min-height: 620px; display: flex; align-items: center;
  padding-top: 72px; color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(18,28,52,.93) 35%, rgba(18,28,52,.55)),
    url("../assets/img/hero-building.jpg") center/cover no-repeat;
}
#hero .inner { position: relative; width: 100%; }
.hero-sub {
  font-size: 14px; letter-spacing: 3px; text-transform: uppercase;
  color: #ff8a65; font-weight: 700; margin-bottom: 16px;
}
#hero h2 { font-size: 46px; line-height: 1.3; font-weight: 800; margin-bottom: 20px; }
#hero h2 strong { color: #ff8a65; }
.hero-desc { font-size: 18px; color: #d6dbe6; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 12px; }
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 8px;
  font-weight: 700; font-size: 16px; transition: .2s; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c93a13; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ===== Sub-page Hero ===== */
.page-hero {
  margin-top: 72px; padding: 64px 0;
  background: linear-gradient(100deg, #121c34 30%, #2a3d63); color: #fff;
}
.page-hero h2 { font-size: 36px; font-weight: 800; }
.page-hero p { color: #8fa0c0; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; margin-top: 6px; }

.center-btn { text-align: center; margin-top: 40px; }

/* ===== Stats ===== */
#stats { background: var(--navy); color: #fff; padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-size: 34px; font-weight: 800; color: #ff8a65; }
.stat strong em { font-style: normal; font-size: 20px; }
.stat span { font-size: 14px; color: #b9c2d4; }

/* ===== Sections ===== */
.section { padding: 90px 0; }
.section.alt { background: var(--gray-bg); }
.sec-title {
  font-size: 32px; font-weight: 800; color: var(--navy);
  margin-bottom: 14px; padding-left: 16px; border-left: 5px solid var(--accent);
}
.sec-title span { font-size: 15px; font-weight: 600; color: #9aa3b5; margin-left: 12px; letter-spacing: 1px; }
.sec-desc { color: #667; margin-bottom: 36px; }

/* ===== About ===== */
.about-flex { display: flex; gap: 48px; margin-top: 36px; align-items: flex-start; }
.about-text { flex: 1.2; }
.about-text .lead { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.about-text > p { margin-bottom: 24px; color: #445; }
.about-img { flex: 1; }
.about-img img { border-radius: 12px; box-shadow: 0 8px 28px rgba(27,42,74,.14); }
.info-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table th, .info-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-line); text-align: left; vertical-align: top; }
.info-table th { width: 110px; color: var(--navy); background: var(--gray-bg); font-weight: 700; white-space: nowrap; }
.org, .facility { margin-top: 64px; }
.org h4, .facility h4 { font-size: 22px; color: var(--navy); margin-bottom: 20px; }
.org img { max-width: 640px; margin: 0 auto; }
.facility-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fcard {
  background: #fff; border: 1px solid var(--gray-line); border-radius: 12px;
  padding: 24px 20px; box-shadow: 0 2px 10px rgba(27,42,74,.05);
}
.fcard strong { display: block; color: var(--accent); font-size: 16px; margin-bottom: 8px; }
.fcard p { font-size: 14px; color: #556; }

/* ===== History ===== */
.timeline { position: relative; margin-top: 24px; padding-left: 150px; }
.timeline::before {
  content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px;
  width: 2px; background: var(--gray-line);
}
.timeline li { position: relative; padding: 0 0 28px 32px; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 7px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 3px solid var(--accent);
}
.timeline em {
  position: absolute; left: -150px; top: 0; width: 110px; text-align: right;
  font-style: normal; font-weight: 800; color: var(--navy); font-size: 17px;
}
.timeline p { color: #445; font-size: 15px; }

/* ===== Products ===== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pgroup-title { font-size: 20px; color: var(--navy); border-left: 4px solid var(--accent); padding-left: 12px; margin-bottom: 20px; }
.pgroup-divider { border: 0; border-top: 1px solid var(--gray-line); margin: 44px 0; }
.pcard {
  display: block; color: inherit;
  background: #fff; border: 1px solid var(--gray-line); border-radius: 14px;
  overflow: hidden; transition: .25s; box-shadow: 0 2px 10px rgba(27,42,74,.05);
}
.pcard:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(27,42,74,.14); }
.pimg { height: 200px; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
/* 제품 대표사진(JS 삽입)은 잘리지 않게 통째로 표시 (풍경 사진 카드는 cover 유지) */
.pimg.photo { background: #fff; padding: 12px; }
.pimg.photo img { object-fit: contain; }
.pimg.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f2f4f8, #f2f4f8 12px, #eceff5 12px, #eceff5 24px);
}
.pimg.placeholder span { color: #98a2b6; font-size: 14px; font-weight: 600; }
.pcard h4 { font-size: 18px; color: var(--navy); padding: 18px 20px 6px; }
.pcard p { font-size: 14px; color: #667; padding: 0 20px 22px; }

/* ===== 제품 상세 모달 ===== */
.pcard.clickable { cursor: pointer; position: relative; }
.pcard.clickable .hint {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,42,74,.75); color: #fff; border-radius: 50%;
  font-size: 18px; font-weight: 700; line-height: 1;
}
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; padding: 28px;
  max-width: 860px; width: 100%; max-height: 85vh; overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h4 { font-size: 20px; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 30px; line-height: 1; color: #98a2b6; cursor: pointer; }
.modal-close:hover { color: var(--navy); }
.modal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mitem { border: 1px solid var(--gray-line); border-radius: 10px; overflow: hidden; text-align: center; padding-bottom: 14px; }
.mimg { height: 150px; overflow: hidden; }
.mimg img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mimg.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f2f4f8, #f2f4f8 12px, #eceff5 12px, #eceff5 24px);
}
.mimg.placeholder span { color: #98a2b6; font-size: 13px; font-weight: 600; }
.mitem strong { display: block; margin-top: 10px; color: var(--navy); font-size: 15px; }
.mitem em { font-style: normal; font-size: 12px; color: #98a2b6; }

/* ===== Certs ===== */
.cert-flex { display: flex; gap: 48px; align-items: flex-start; }
.cert-text { flex: 1.2; }
.cert-list li {
  background: #fff; border: 1px solid var(--gray-line); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 12px;
}
.cert-list strong { display: block; color: var(--navy); font-size: 16px; }
.cert-list span { font-size: 14px; color: #667; }
.cert-note { margin-top: 20px; font-size: 14px; color: #556; }
.cert-imgs { flex: 1; display: flex; gap: 14px; }
.cert-imgs img { width: calc(50% - 7px); border: 1px solid var(--gray-line); border-radius: 8px; background: #fff; }

/* ===== Partners ===== */
.partners-img { background: #fff; border: 1px solid var(--gray-line); border-radius: 14px; padding: 32px; }
.partners-img img { margin: 0 auto; }

/* ===== Location ===== */
.loc-flex { display: flex; gap: 48px; align-items: stretch; }
.loc-info { flex: 1; }
.loc-info dt { font-weight: 800; color: var(--navy); margin-top: 20px; font-size: 15px; }
.loc-info dt:first-child { margin-top: 0; }
.loc-info dd { color: #445; margin-top: 4px; }
.loc-info small { color: #99a; }
.loc-map { flex: 1.4; }
.loc-map iframe {
  width: 100%; height: 380px; border: 0; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(27,42,74,.1); display: block;
}
.loc-map .map-link { margin-top: 14px; }

/* ===== Footer ===== */
footer { background: #121c34; color: #9aa3b5; padding: 44px 0; font-size: 14px; }
.f-logo { height: 36px; width: auto; margin-bottom: 16px; background: #fff; padding: 5px 10px; border-radius: 6px; }
footer .copy { margin-top: 8px; color: #6b7590; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  #gnb {
    position: fixed; top: 72px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--gray-line); display: none;
  }
  #gnb.open { display: block; }
  #gnb ul { flex-direction: column; padding: 10px 20px; }
  #navToggle { display: block; }
  #hero h2 { font-size: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-flex, .cert-flex, .loc-flex { flex-direction: column; }
  .facility-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { padding-left: 0; }
  .timeline::before { left: 6px; }
  .timeline li { padding-left: 30px; }
  .timeline em { position: static; display: block; text-align: left; margin-bottom: 4px; }
}
@media (max-width: 560px) {
  .product-grid, .facility-grid { grid-template-columns: 1fr; }
  #hero h2 { font-size: 26px; }
  .sec-title { font-size: 24px; }
  .modal-grid { grid-template-columns: repeat(2, 1fr); }
}
