* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f4f4f4;
}
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
header {
  padding: 20px 16px;
  text-align: center;
  background-color: #ffffff;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 15px 16px 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-right: 60px;
}

.logo-img {
  width: 120px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}
.company-name {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 30px;
  color: rgb(20, 33, 129);
}
.company-subtext {
  margin-top: 5px;
  margin-bottom: 20px;
  font-size: 20px;
  color: rgb(4, 78, 16);
  margin-right: 30px;
}
.main-nav {
  width: 100%;
  border-top: 1px solid rgb(20, 33, 129);
  padding-top: 18px;
}
.main-nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}
.main-nav-list a {
  text-decoration: none;
  color: #111827;
  font-size: 18px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background-color 0.5s ease;
}
.main-nav-list a:hover {
  background-color: #cdcdcd;
  color: rgb(20, 33, 129);
}

main {
  flex: 1;
  padding: 24px 16px 32px;
}
.content-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.main-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  background-color: black;
}
.slide {
  position: absolute;
  inset: 0;
  /* inset은 top, right, bottom, left모두 0을 넣은 것. */
  opacity: 0;
  transition: opacity 1s ease-in-out;
  /* opacity는 투명도 */
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide.active {
  opacity: 1;
}
.main-caption {
  position: absolute;
  left: 20px;
  bottom: 48px;
  color: rgb(255, 255, 255);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  font-size: 20px;
  font-weight: 600;
}

.cap-line {
  opacity: 0;
  transform: translateX(-40px);
  will-change: transform, opacity;
}
.caption-animate .cap-line1 {
  animation: captionIn 1.5s ease-out forwards;
}
.caption-animate .cap-line2 {
  animation: captionIn 1.5s ease-out forwards;
  animation-delay: 1s;
}
@keyframes captionIn {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #f9fafb;
  background-color: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.slider-dot.active {
  background-color: #f9fafb;
}

.intro-section {
  border-radius: 10px;
  padding: 20px 18px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
  font-size: 14px;
  line-height: 1.6;
  color: #152a4d;
}
.intro-section h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.intro-section p {
  font-size: 17px;
}

footer {
  background-color: #111827;
  color: #e5e7eb;
  padding: 16px 20px;
  font-size: 13px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
}

.history-section {
  border-radius: 10px;
  padding: 20px 18px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
  color: #152a4d;
}
.history-section h2 {
  font-size: 20px;
  margin-bottom: 14px;
}
.history-section p {
  font-size: 17px;
}
.history-section h3 {
  font-size: 17px;
}
.patent-card h3 {
  font-size: 20px;
  margin-bottom: 14px;
}
.patent-card li {
  font-size: 17px;
}

.timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 20px;
  margin-top: 10px;
}

.patent-section {
  border-radius: 10px;
  padding: 20px 18px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
  color: #152a4d;
}
.patent-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 20px;
  margin-top: 10px;
}

.patent-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.patent-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

/* ✅ 산업기계 갤러리 (3개 한줄) */
.machine-section {
  border-radius: 10px;
  padding: 20px 18px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
  color: #152a4d;
}

.machine-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.machine-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.machine-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.machine-item img {
  width: 100%;
  aspect-ratio: 16 / 9; /* 임시 홈페이지처럼 가로형 사진 느낌 */
  object-fit: cover;
  display: block;
}

.machine-caption {
  padding: 12px 10px;
  text-align: center;
  background: #efefef; /* 임시 홈페이지 캡션 바 느낌 */
  font-size: 16px;
  font-weight: 600;
}

/* ✅ 농기계(제품컷 위주): 세로로 더 긴 카드 + 덜 잘리게 */
.machine-gallery--agri .machine-item img {
  aspect-ratio: 4 / 3; /* 16/9보다 세로가 늘어남(덜 납작) */
  object-fit: contain; /* ✅ 제품이 안 잘리게 */
  background: #ffffff; /* 투명 PNG/배경 제거된 이미지면 흰 배경 */
  padding: 10px; /* 가장자리 여백 */
}

/* ✅ 반응형: 태블릿 2개, 모바일 1개 */
@media (max-width: 900px) {
  .machine-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .machine-caption {
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .machine-gallery {
    grid-template-columns: 1fr;
  }
}

/* 반응형 처리 */
@media (max-width: 900px) {
  .header-inner {
    padding: 16px 12px 8px;
    gap: 10px;
  }

  .logo-img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 20px;
  }

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

  .main-caption {
    font-size: 16px;
    left: 12px;
    right: 12px;
    bottom: 40px;
  }

  main {
    padding: 16px 12px 24px;
  }

  .intro-section {
    border-radius: 10px;
    padding: 20px 18px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
    font-size: 14px;
    line-height: 1.6;
    color: #182944;
  }
  .intro-section h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .intro-section p {
    font-size: 15px;
  }

  .history-section h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .history-section p {
    font-size: 15px;
  }
  .history-section h3 {
    font-size: 15px;
  }
  .history-card h3 {
    font-size: 18px;
  }
  .history-card li {
    font-size: 15px;
  }
  .patent-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .patent-card li {
    font-size: 15px;
  }

  footer {
    font-size: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  touch-action: pan-y;
}
.lightbox.open {
  display: flex;
}
.lightbox-content {
  position: relative;
  max-width: min(1100px, 96vw);
  max-height: 90vh;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 50px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 1;
  z-index: 10000;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  user-select: none;
}
.lightbox-nav.prev {
  left: -56px;
}
.lightbox-nav.next {
  right: -56px;
}

/* ===== 문의 페이지 ===== */
.contact-main .content-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 50px;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  background: #fff;
  border-radius: 14px;
  padding: 34px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.contact-hello {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}

.contact-desc {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.contact-thanks {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 26px;
}

.contact-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
}

.mini-label {
  font-weight: 700;
  margin-bottom: 6px;
}

.mini-value {
  opacity: 0.85;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field label {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-field .req {
  color: #d13b3b;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1.5px solid #2f2e83;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}

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

.contact-submit {
  margin-top: 10px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  background: #1b7a2e;
  color: #fff;
}

.contact-submit:hover {
  filter: brightness(0.95);
}

/* 모바일 */
@media (max-width: 860px) {
  .contact-wrap {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .contact-mini {
    grid-template-columns: 1fr;
  }
  .form-row.two {
    grid-template-columns: 1fr;
  }
}

/* ===== 전송 완료(Thanks) 페이지 ===== */
.thanks-main .content-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 50px;
}

.thanks-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px 34px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.thanks-badge {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: #1b7a2e;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.thanks-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.thanks-desc {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 22px;
}

.thanks-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.thanks-btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d9d9d9;
  text-decoration: none;
  font-weight: 800;
  color: #222;
  background: #fff;
}

.thanks-btn.primary {
  background: #1b7a2e;
  color: #fff;
  border: 0;
}

.thanks-btn:hover {
  filter: brightness(0.97);
}

.thanks-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
  text-align: left;
}

@media (max-width: 860px) {
  .thanks-card {
    padding: 28px 20px;
  }
  .thanks-mini {
    grid-template-columns: 1fr;
  }
}

/* ===== 상단 공지바 ===== */
.notice-bar {
  position: sticky; /* 스크롤 내려도 상단에 붙어있게 */
  top: 0;
  z-index: 10040;
  display: none; /* 기본 숨김 */
  background: #111827;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.notice-bar.show {
  display: block;
}

.notice-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice-bar__text {
  font-size: 14px;
  line-height: 1.4;
}

.notice-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.notice-bar__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  user-select: none;
  white-space: nowrap;
}

.notice-bar__close {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
  background: #f3f4f6;
  color: #111827;
}

.notice-bar__close:hover {
  filter: brightness(0.95);
}

/* 모바일에서 줄바꿈/정렬 */
@media (max-width: 560px) {
  .notice-bar__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .notice-bar__actions {
    width: 100%;
    justify-content: space-between;
  }
}
