/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ===== Header ===== */
#site-header {
  background: rgba(255, 255, 255, 0);
}
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px -8px rgba(0, 134, 201, 0.15);
}

.nav-link {
  color: #40525f;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #0086c9;
}

/* ===== Mobile nav dropdown ===== */
#mobile-nav.open {
  display: flex;
  flex-direction: column;
}
.mobile-nav-link {
  color: #40525f;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.2s ease;
  width: 100%;
}
.mobile-nav-link:last-child {
  border-bottom: none;
}
.mobile-nav-link:hover {
  color: #0086c9;
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 전제품 렌탈 카드 (클릭 시 상담폼으로 이동, 클릭 가능함을 명확히 표시) ===== */
.rental-card {
  cursor: pointer;
  font-family: inherit;
  appearance: none;
}
.rental-card-action-icon {
  transition: color 0.2s ease, transform 0.2s ease;
}
.rental-card:hover .rental-card-action-icon {
  color: #0086c9;
  transform: scale(1.15);
}
.rental-card-cta i {
  transition: transform 0.2s ease;
}
.rental-card:hover .rental-card-cta i {
  transform: translateX(3px);
}
.rental-card:focus-visible {
  outline: 2px solid #0086c9;
  outline-offset: 2px;
}

/* ===== FAQ ===== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding-top: 0;
  padding-bottom: 0;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 1.25rem;
}
.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #9adcf7;
  border-radius: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== Form feedback ===== */
#form-feedback.success {
  color: #0086c9;
}
#form-feedback.error {
  color: #dc2626;
}

/* ===== Utility ===== */
.shadow-soft-hover:hover {
  box-shadow: 0 10px 40px -10px rgba(0, 134, 201, 0.25);
}

/* ===== Hero CTA 강조 (은은한 펄스 글로우로 시선 유도) ===== */
.hero-cta-pulse {
  animation: hero-cta-glow 2.2s ease-in-out infinite;
}
@keyframes hero-cta-glow {
  0%, 100% { box-shadow: 0 10px 30px -8px rgba(0, 134, 201, 0.35); }
  50% { box-shadow: 0 10px 34px -6px rgba(0, 134, 201, 0.6); }
}

/* ===== Testimonial Carousel ===== */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 280px;
}
@media (min-width: 768px) {
  .testimonial-card {
    width: 320px;
  }
}
.testimonial-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cdedfb;
  transition: all 0.25s ease;
  cursor: pointer;
}
.testimonial-dot.active {
  width: 20px;
  background: #0086c9;
}

/* ===== 케어 진행 7단계 카드 (모바일: 가로 스와이프 캐러셀 / PC: 그리드) ===== */
.process-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 78%;
}
@media (min-width: 640px) {
  .process-card {
    width: 320px;
  }
}
@media (min-width: 768px) {
  .process-card {
    width: auto;
    flex: initial;
  }
}

/* ===== 작업사례 카드 (모바일: 가로 스와이프 캐러셀 / PC: 그리드) ===== */
.case-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 82%;
}
@media (min-width: 640px) {
  .case-card {
    width: 320px;
  }
}
@media (min-width: 768px) {
  .case-card {
    width: auto;
    flex: initial;
  }
}

/* ===== 매트리스 제품 TOP 5 카드 (모바일: 가로 스와이프 캐러셀 / PC: 그리드) ===== */
.product-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 78%;
}
@media (min-width: 640px) {
  .product-card {
    width: 260px;
  }
}
@media (min-width: 768px) {
  .product-card {
    width: auto;
    flex: initial;
  }
}

/* ===== FAQ 목록 : 기본 노출 4개 + "질문 더보기" 토글 ===== */
.faq-item.faq-extra {
  display: none;
}
#faq-list.faq-expanded .faq-item.faq-extra {
  display: block;
}

/* ===== Case study content clamp / 더보기 ===== */
.case-content-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.case-content-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* ===== Admin image upload preview ===== */
.image-upload-input::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.4rem 0.9rem;
  border-radius: 0.6rem;
  border: none;
  background: #cdedfb;
  color: #0086c9;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}
