/* ============================================
   탑자원 정적 홈페이지 — 원본 동일 스타일
   ============================================
   글로벌 컬러 (Astra 테마 원본)
     --color-0: #6878d6  (아이콘)
     --color-1: #4d61d6  (링크/주색)
     --color-2: #242a56  (다크)
     --color-3: #393a56  (본문)
     --color-4: #eff2ff  (밝은 배경)
     --color-5: #ffffff
   ============================================ */

/* --- 리셋 & 기본 --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-0: #6878d6;
  --color-1: #4d61d6;
  --color-2: #242a56;
  --color-3: #393a56;
  --color-4: #eff2ff;
}

html {
  font-size: 106.25%;
  /* 원본 동일 */
  scroll-behavior: smooth;
  /* 스크롤바 숨기기 */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* 스크롤바 숨기기 - Webkit 브라우저 */
html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6em;
  color: var(--color-3);
  background: #fff;
  overflow-x: hidden;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

a {
  color: var(--color-1);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--color-1);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  line-height: 1em;
  color: var(--color-3);
}

h2 {
  font-size: 2.235rem;
  line-height: 1.3em;
}

h3 {
  font-size: 1.765rem;
  line-height: 1.3em;
}

h4 {
  font-size: 1.412rem;
  line-height: 1.2em;
}

h6 {
  font-size: 1rem;
  line-height: 1.25em;
}

/* ============================================
   헤더 — transparent 2단 구조 (원본 동일)
   ① above-header (50px): nav + kakao 우측 정렬
   ② primary-header (70px): 빈 로고영역 (모바일: hamburger)
   ============================================ */
#masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: none;
}

/* ─── ① Above header (50px) ─── */
.above-header {
  width: 100%;
  min-height: 50px;
}

.above-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 50px;
}

.above-left {
  flex: 1;
  /* 왼쪽 빈영역이 남은 공간 차지 */
}

.above-right {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Nav 메뉴 */
#primary-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0;
}

#primary-nav ul li a {
  display: block;
  color: #eff2ff;
  /* 원본: transparent header 메뉴 색상 */
  font-family: Arial, Helvetica, Verdana, sans-serif;
  font-size: 21px;
  /* 원본 동일 */
  font-weight: 700;
  /* 원본 동일 */
  line-height: 50px;
  /* 원본: above-header 높이와 동일 → 수직 중앙 */
  padding: 0 0.6em;
  /* 원본: 기본 nav item 간격 */
  position: relative;
  text-decoration: none;
  transition: color 0.2s;
}

/* hover underline 효과 (원본: ast-menu-hover-style-underline) */
#primary-nav ul li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 1px;
  background: transparent;
  transition: left 0.3s ease, right 0.3s ease, background 0.3s ease;
}

#primary-nav ul li a:hover::before,
#primary-nav ul li a.active::before {
  left: 0.6em;
  right: 0.6em;
  background: currentColor;
}

#primary-nav ul li a:hover,
#primary-nav ul li a.active {
  color: #fff;
}

/* ─── 카카오톡 소셜 (yellow icon + yellow label, 원본 동일) ─── */
.kakao-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 0;
  margin-left: 12px;
}

.kakao-icon svg {
  width: 21px;
  height: 21px;
  fill: #ffee00;
  /* 원본: ast-social-color-type-custom */
  display: block;
}

.kakao-label {
  color: #ffee00;
  /* 원본 동일 */
  font-size: 0.88rem;
  font-weight: 400;
  white-space: nowrap;
}

/* ─── ② Primary header (70px) ─── */
.primary-header {
  width: 100%;
  min-height: 70px;
}

.primary-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-branding {
  /* 원본 로고 영역 — 비어있음 */
  flex-shrink: 0;
}

/* hamburger 버튼 (모바일용만 — 기본 숨김) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  padding: 8px 4px;
  line-height: 1;
}

/* ─── ③ 모바일 드롭다운 메뉴 ─── */
.mobile-menu {
  display: none;
  background: linear-gradient(180deg, rgba(36, 42, 86, 0.98), rgba(57, 58, 86, 0.95));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu nav ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu nav ul li:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu nav ul li a {
  display: block;
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.mobile-menu nav ul li a:hover {
  color: #fff;
  background: rgba(77, 97, 214, 0.3);
}

/* ============================================
   히어로 — 배경 이미지 + wave SVG (텍스트 없음)
   ============================================ */
.hero {
  position: relative;
  min-height: 550px;
  background-image: url('images/hero_bg.png');
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: cover;
  background-attachment: scroll;
  padding: 50px 50px 70px;
  overflow: hidden;
}

/* Wave SVG: shape-top → 상단에 dark wave overlay */
.hero__shape {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 1.3px);
  height: 60px;
}

.hero__shape svg {
  width: 100%;
  height: 100%;
}

.hero__shape .shape-fill {
  fill: rgba(51, 51, 51, 0.55);
}

/* ============================================
   섹션 공통
   ============================================ */
.section-wrap {
  width: 100%;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================
   회사소개
   ============================================ */
#about {
  background-color: #fff;
  padding: 50px 30px;
}

.about-heading {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
}

.about-heading h2 {
  color: var(--color-2);
  font-size: 2rem;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.about-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-1);
  border-radius: 2px;
}

/* 2컬럼 그리드 (원본: wp-block-columns flex, margin-top 50px) */
.about-grid {
  max-width: 1200px;
  margin: 50px auto 0;
  /* margin-top 50px — 원본 동일 */
  padding: 10px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  /* 원본: column-gap 20px */
}

.about-col {
  flex: 1;
  min-width: 0;
}

/* 왼쪽: 메인 이미지 */
.about-col:first-child img {
  width: 100%;
  height: auto;
  display: block;
}

/* 오른쪽: 썸네일 그룹 (원본: is-nowrap flex, 가로 배치) */
.about-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.about-thumbs img {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

/* 텍스트 블록 (원본: has-medium-font-size → 20px) */
p.about-text {
  margin-top: 0;
  font-size: 18px;
  color: #2d2d2d;
  line-height: 1.9em;
  letter-spacing: -0.3px;
  word-spacing: 1px;
  text-align: left;
  word-break: keep-all;
}

p.about-text strong {
  color: var(--color-1);
  font-weight: 700;
}

/* ============================================
   주요업무
   ============================================ */
#service {
  background-color: var(--color-4);
  /* #eff2ff */
  padding: 50px 0;
}

.service-heading {
  text-align: center;
  padding: 0;
  margin-bottom: 30px;
}

.service-heading h2 {
  color: var(--color-2);
  font-size: 2rem;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.service-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-1);
  border-radius: 2px;
}

/* 카드 그리드: flex 레이아웃 (원본 동일) */
.service-cards-wrap {
  padding: 10px;
}

.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 10px;
}

.service-card {
  flex: 1 1 calc(33.333% - 20px);
  min-width: 200px;
  max-width: calc(33.333% - 14px);
  background-color: #fff;
  padding: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* 아이콘 */
.service-card .icon-wrap {
  margin-bottom: 12px;
}

.service-card .icon-wrap svg {
  width: 42px;
  height: 42px;
  fill: var(--color-0);
  /* #6878d6 */
}

/* 타이틀 */
.service-card h4 {
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: #2d2d2d;
  line-height: 1.7;
  letter-spacing: -0.3px;
  word-spacing: 1px;
  word-break: keep-all;
  margin-bottom: 20px;
  margin-top: 15px;
}

/* ============================================
   시공사례
   ============================================ */
#reviews {
  background-color: #fff;
  padding: 50px 30px;
}

.reviews-heading {
  text-align: center;
  margin-bottom: 30px;
}

.reviews-heading h2 {
  color: var(--color-2);
  font-size: 2rem;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.reviews-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-1);
  border-radius: 2px;
}

.reviews-images-wrap {
  padding: 10px;
}

.reviews-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.reviews-images .review-img {
  flex: 1 1 calc(25% - 12px);
  min-width: 140px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  text-decoration: none;
}

.reviews-images .review-img:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.reviews-images .review-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.reviews-images .review-img:hover img {
  transform: scale(1.05);
}

/* 블로그 이동 버튼 */
.btn-blog-wrap {
  text-align: center;
  margin-top: 40px;
}

.btn-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--color-1);
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-blog:hover,
.btn-blog:focus,
.btn-blog:active,
.btn-blog:visited {
  background-color: var(--color-1);
  color: #fff;
}

.btn-blog svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ============================================
   CTA — nature 배경 이미지
   ============================================ */
.cta {
  background-image: url('images/cta_bg.jpg');
  background-repeat: no-repeat;
  background-position: 60% 60%;
  background-size: cover;
  background-attachment: scroll;
  padding: 40px 40px;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 50, 0.6);
  z-index: 0;
}

.cta-content {
  text-align: center;
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

.cta-content h6 {
  color: #fff;
  font-size: 2.25rem;
  line-height: 1.3;
  letter-spacing: 3px;
  font-weight: 700;
  font-family: 'Barlow Semi Condensed', sans-serif;
}

/* ============================================
   푸터
   ============================================ */
footer {
  background: linear-gradient(135deg, rgba(20, 24, 50, 0.98), rgba(36, 42, 86, 0.95));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px 30px;
}

footer p {
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

/* ============================================
   고정 Sticky 버튼 — 모바일 전용
   ============================================ */
.sticky-buttons {
  position: fixed;
  right: 21px;
  z-index: 999;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sticky-buttons-1 {
  bottom: 80px;
}

.sticky-buttons-2 {
  bottom: 136px;
}

.sticky-buttons li {
  margin-bottom: 0;
}

.sticky-buttons li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  /* rsquare = rounded square */
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, box-shadow 0.15s;
}

.sticky-buttons li a:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sticky-buttons-1 li a {
  background: rgb(255, 240, 86);
  color: rgb(0, 0, 0);
}

.sticky-buttons-2 li a {
  background: rgb(101, 214, 21);
  color: rgb(0, 0, 0);
}

.sticky-buttons .sb-icon {
  font-size: 1.2rem;
}

/* 모바일 이외 숨기기 (원본: min-width 1024px에서 display:none) */
@media only screen and (min-width: 1024px) {

  .sticky-buttons-1,
  .sticky-buttons-2 {
    display: none;
  }
}

/* ============================================
   스크롤 맨 위로 버튼
   ============================================ */
#ast-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 21px;
  width: 40px;
  height: 40px;
  background: var(--color-2);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 998;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

#ast-scroll-top.visible {
  display: flex;
}

#ast-scroll-top:hover {
  background: var(--color-1);
}

/* ============================================
   모달 (이미지 확대)
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  max-width: 500px;
  width: 100%;
  animation: modalSlideUp 0.3s ease forwards;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* (모바일 메뉴 스타일은 헤더 섹션에 포함됨) */

/* ============================================
   반응형 — Tablet (768px 이하: 모바일 헤더)
   ============================================ */
@media (max-width: 768px) {

  /* 모바일 헤더: absolute + 투명 유지 */
  #masthead {
    position: absolute;
    background: none;
  }

  /* 드롭다운 열렸을 때 헤더 배경 불투명 */
  #masthead.menu-open {
    background: rgba(36, 42, 86, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #masthead.menu-open .menu-toggle {
    color: #fff;
  }

  /* above-header 숨기기 (nav, kakao) */
  .above-header {
    display: none;
  }

  /* primary-header: hamburger만 표시 */
  .primary-header {
    min-height: 60px;
  }

  .primary-header-inner {
    height: 60px;
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 240px;
    background-image: url('images/hero_mobile_bg.png');
    background-position: 50% 0%;
    background-size: 100%;
    padding: 38px 30px 50px;
  }

  .hero__shape {
    height: 40px;
  }

  #about {
    padding: 50px 20px;
  }

  /* 모바일: 컬럼 세로 스택 (원본: flex-wrap wrap, gap 0) */
  .about-grid {
    flex-wrap: wrap;
    gap: 0;
    margin-top: 17px;
    /* 원본 모바일: margin-top 17px */
    padding: 0;
  }

  .about-col {
    flex: 1 1 100%;
    /* 각 컬럼 100% → 세로 스택 */
  }

  .about-thumbs {
    margin-top: 20px;
  }

  #service {
    padding: 20px 0;
  }

  .service-cards {
    padding: 15px;
  }

  .service-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: unset;
    padding: 20px 15px;
  }

  #reviews {
    padding: 20px 20px;
  }

  .reviews-images {
    flex-wrap: wrap;
  }

  .reviews-images .review-img {
    flex: 1 1 calc(50% - 12px);
  }

  .reviews-images .review-img img {
    height: 220px;
  }

  .cta {
    padding: 20px 0;
  }

  .cta-content {
    padding: 15px 0;
  }

  .cta-content h6 {
    font-size: 1rem;
    letter-spacing: -1px;
    line-height: 0em;
  }
}

/* ============================================
   반응형 — Mobile (480px 이하)
   ============================================ */
@media (max-width: 480px) {
  .service-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: unset;
    padding: 15px;
  }

  .reviews-images .review-img {
    flex: 1 1 calc(50% - 8px);
  }

  .reviews-images .review-img img {
    height: 180px;
  }

  .about-images .img-thumbs {
    gap: 8px;
  }
}