/* ==========================================================================
 * assets/css/style.css — 범표집수리(욕조수리)
 * Tailwind CDN이 커버하지 못하는 보강 스타일만 작성한다.
 * C07 팔레트 변수(--color-*)는 각 페이지 인라인 <style>의 :root에서 정의되므로
 * 여기서는 var(--color-*)를 그대로 참조만 한다. 라운드 코너는 rounded-2xl로
 * 이미 통일되어 있으므로 border-radius는 별도로 재정의하지 않는다.
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * 1. 헤더 스크롤 상태
 * footer.php 인라인 스크립트가 스크롤 10px 이상일 때 #site-header에
 * "scrolled" 클래스를 토글하지만, 이를 실제로 표현하는 스타일이 없었다.
 * -------------------------------------------------------------------------- */
.site-header {
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 4px 16px -8px rgba(31, 41, 55, .18);
}

/* --------------------------------------------------------------------------
 * 2. 모바일 햄버거 메뉴
 * 열림/닫힘 자체는 footer.php의 인라인 스크립트가 style.display로 처리한다.
 * 여기서는 아이콘 3줄 → X 전환, 메뉴 노출 시 부드러운 등장 효과만 추가한다.
 * -------------------------------------------------------------------------- */
#hamburger span {
  transform-origin: center;
}
#hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
#hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

#mobile-nav {
  animation: mobileNavIn .22s ease;
}
@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
 * 3. 카드 hover 효과 — 은은한 그림자 + 살짝 위로 이동
 * 대상: 서비스그리드/관련서비스 카드(a.rounded-2xl.bg-white.border)와
 *       시공사진 갤러리(.gallery-photo). 과장 없이 절제된 톤으로 처리한다.
 * -------------------------------------------------------------------------- */
a.rounded-2xl.bg-white.border,
.gallery-photo {
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}
a.rounded-2xl.bg-white.border:hover,
.gallery-photo:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -14px rgba(31, 41, 55, .2);
}
a.rounded-2xl.bg-white.border:active,
.gallery-photo:active {
  transform: translateY(-1px);
}

/* 상담 버튼류(.btn-consult) 및 CTA 버튼 미세한 눌림 반응 */
.btn-consult {
  transition: opacity .2s ease, transform .15s ease;
}
.btn-consult:hover {
  opacity: .92;
}
.btn-consult:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
 * 4. Floating CTA / Back-to-top
 * -------------------------------------------------------------------------- */
#floating-cta a {
  transition: transform .2s ease, box-shadow .2s ease;
}
#floating-cta a:hover {
  transform: scale(1.06);
}
#back-to-top {
  transition: background-color .2s ease, transform .2s ease;
}
#back-to-top:hover {
  background: rgba(0, 0, 0, .65);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
 * 5. FAQ <details>/<summary> 아코디언
 * 화살표(+) 회전은 Tailwind의 group-open:rotate-45 transition-transform으로
 * 이미 처리되므로 별도 회전 로직은 만들지 않는다. 다만 Safari 계열은
 * ::-webkit-details-marker로 기본 삼각형 마커를 따로 제거해야 하며,
 * 답변이 펼쳐질 때 부드럽게 나타나도록 페이드+슬라이드만 추가한다.
 * -------------------------------------------------------------------------- */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::marker {
  content: "";
}

details[open] > summary ~ p {
  animation: faqReveal .22s ease;
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
 * 6. 라이트박스 오버레이 (.gallery-photo[data-lightbox] 클릭 시 app.js가 생성)
 * -------------------------------------------------------------------------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 20, 24, .88);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.lb-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(900px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
}
.lb-images {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.lb-img-wrap {
  position: relative;
  display: block;
}
.lb-img-wrap-after {
  display: none;
}
.lb-overlay.is-pair .lb-img-wrap {
  flex: 1 1 0;
  width: 100%;
}
.lb-overlay.is-pair .lb-img-wrap-after {
  display: block;
}
.lb-img {
  max-width: min(900px, 92vw);
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 48px -16px rgba(0, 0, 0, .55);
  transform: scale(.96);
  transition: transform .2s ease;
  display: block;
}
.lb-overlay.is-open .lb-img {
  transform: scale(1);
}
.lb-overlay.is-pair .lb-img {
  width: 100%;
  max-width: none;
  max-height: 46vh;
  object-fit: cover;
}
.lb-badge {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
  z-index: 1;
}
.lb-overlay.is-pair .lb-badge {
  display: inline-block;
}
.lb-badge-before {
  background: rgba(0, 0, 0, .6);
}
.lb-badge-after {
  background: var(--color-accent);
}
.lb-desc {
  display: none;
  width: 100%;
  max-width: min(640px, 92vw);
  background: #fff;
  color: #14181F;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .35);
  text-align: left;
}
.lb-desc-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
}
.lb-desc-body p {
  font-size: 14px;
  line-height: 1.9;
  margin: 0 0 8px;
}
.lb-desc-body p:last-child {
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .lb-desc-body p {
    font-size: 15px;
  }
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease;
}
.lb-close:hover {
  background: rgba(255, 255, 255, .22);
}

@media (max-width: 640px) {
  .lb-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}
