/* ===================================================================
   거미두피탈모관리센터 - 공통 스타일시트
   디자인가이드(../디자인가이드.md) 기준 색상/타이포/브레이크포인트를
   그대로 반영. 색상 HEX 값은 임의로 변경하지 말 것.
   =================================================================== */

:root {
  /* 색상 팔레트 (디자인가이드 HEX 값 그대로) */
  --color-primary: #2C6E6B;
  --color-secondary: #1F3B4D;
  --color-accent: #C74E1B;
  --color-accent-dark: #A83F14;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F4F7F6;
  --color-text: #222222;
  --color-text-muted: #5C6B68;
  --color-border: #E1E8E6;
  --color-placeholder-bg: #D9D9D9;
  --color-placeholder-text: #6B6B6B;

  /* 레이아웃 */
  --container-max: 1120px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 8px rgba(31, 59, 77, 0.08);

  /* 폰트 */
  --font-base: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system,
    'Malgun Gothic', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.7;
  padding-bottom: 64px; /* 모바일 하단 고정 전화바 공간 확보 */
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 16px;
  color: var(--color-secondary);
}

h1 {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.3;
}

h2 {
  font-size: clamp(22px, 4vw, 28px);
}

h3 {
  font-size: clamp(18px, 3vw, 20px);
}

p {
  margin: 0 0 16px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

section {
  padding: 48px 0;
}

@media (min-width: 1024px) {
  section {
    padding: 80px 0;
  }
}

.section-alt {
  background: var(--color-bg-alt);
}

/* ------------------------- 상단 고정 정보 바 ------------------------- */
.top-info-bar {
  background: var(--color-secondary);
  color: #ffffff;
  font-size: 14px;
}

.top-info-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.top-info-bar a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.top-info-bar .info-address {
  display: none;
}

@media (min-width: 1024px) {
  .top-info-bar .info-address {
    display: inline;
  }
}

/* ------------------------------- 헤더 -------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
  border-radius: 6px;
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
  color: var(--color-secondary);
}

.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a[aria-current='page'],
.main-nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-secondary);
  cursor: pointer;
}

/* 모바일 드롭다운 메뉴 (JS로 is-open 토글) */
.main-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 16px 20px 20px;
  z-index: 40;
}

.main-nav.is-open ul {
  flex-direction: column;
  gap: 4px;
}

.main-nav.is-open a {
  display: block;
  padding: 12px 4px;
}

@media (min-width: 768px) {
  .main-nav {
    display: block;
    position: static;
    box-shadow: none;
    padding: 0;
  }
  .nav-toggle {
    display: none;
  }
}

/* --------------------------- 버튼 컴포넌트 ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  font-family: inherit;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-primary:disabled {
  background: var(--color-placeholder-bg);
  color: var(--color-placeholder-text);
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-accent-outline {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

.btn-accent-outline:hover {
  background: var(--color-accent);
  color: #ffffff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

/* ---------------------------- 히어로 영역 ----------------------------- */
.hero {
  padding: 56px 0;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, #ffffff 100%);
}

.hero .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(44, 110, 107, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.hero p.lead {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-visual {
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  background: var(--color-placeholder-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-placeholder-text);
  font-weight: 700;
  text-align: center;
  padding: 16px;
}

@media (min-width: 1024px) {
  .hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
  }
  .hero-visual {
    margin-top: 0;
  }
}

/* -------------------------- 플레이스홀더 공통 -------------------------- */
.placeholder-box {
  background: var(--color-placeholder-bg);
  color: var(--color-placeholder-text);
  border: 1px dashed #b4b4b4;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  padding: 20px;
}

.notice-badge {
  display: block;
  background: #fdf0e8;
  border: 1px solid var(--color-accent);
  color: var(--color-accent-dark);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 32px;
}

.sample-flag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #6B6B6B;
  background: #ECECEC;
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 8px;
}

/* ----------------------------- 카드 그리드 ----------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(44, 110, 107, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.card .card-price {
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

/* -------------------------- 오시는 길 요약 카드 -------------------------- */
.info-summary {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 1024px) {
  .info-summary {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.map-placeholder {
  aspect-ratio: 4 / 3;
  width: 100%;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

.info-list .info-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-list .info-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 2px;
  font-weight: 600;
}

.info-list .info-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-secondary);
}

.info-list a.info-value {
  text-decoration: none;
}

/* ------------------------------- 스텝 UI ------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.step-number {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------- 후기 게시판 ----------------------------- */
.review-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--color-secondary);
}

.form-row .hint {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
  font-weight: 400;
}

.form-row input[type='text'],
.form-row input[type='password'],
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(44, 110, 107, 0.15);
}

.rating-select {
  display: flex;
  gap: 6px;
}

.rating-select .star-btn {
  border: none;
  background: none;
  padding: 2px;
  font-size: 26px;
  line-height: 1;
  color: var(--color-placeholder-bg);
  cursor: pointer;
}

.rating-select .star-btn.filled {
  color: var(--color-accent);
}

.rating-select .star-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.honeypot-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-error,
.board-status.error {
  color: var(--color-accent-dark);
  font-weight: 700;
  background: #fdf0e8;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 12px;
}

.form-success {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
}

.review-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.review-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.review-nickname {
  font-weight: 700;
  color: var(--color-secondary);
}

.review-date {
  font-size: 14px;
  color: var(--color-text-muted);
}

.review-rating {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 14px;
}

.review-body {
  color: var(--color-text);
  margin-bottom: 12px;
  white-space: pre-line;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.delete-inline-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.delete-inline-form input {
  flex: 1 1 160px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 16px;
}

.delete-inline-form .delete-error {
  flex-basis: 100%;
  color: var(--color-accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.board-status {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  margin-top: 24px;
}

.board-status.error {
  text-align: left;
}

/* -------------------------- 관리자 전용 영역 --------------------------- */
.admin-zone {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 3px solid var(--color-border);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 32px 24px;
}

.admin-zone h2 {
  font-size: 18px;
}

.admin-zone .admin-desc {
  font-size: 14px;
  color: var(--color-text-muted);
}

.admin-login-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.admin-login-row input {
  flex: 1 1 200px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;
}

.admin-status {
  font-size: 14px;
  font-weight: 700;
  margin-top: 10px;
}

.admin-status.on {
  color: var(--color-primary);
}

.admin-status.off {
  color: var(--color-accent-dark);
}

/* ------------------------------ CTA 배너 ------------------------------- */
.cta-banner {
  background: var(--color-secondary);
  color: #fff;
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius);
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  color: #cfe0dd;
}

/* -------------------------------- 푸터 --------------------------------- */
.site-footer {
  background: var(--color-secondary);
  color: #e8efee;
  padding: 40px 0 24px;
  margin-top: 0;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.footer-grid h3 {
  color: #fff;
  font-size: 16px;
}

.footer-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-info-list a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav a {
  color: #cfe0dd;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
  color: #9db3af;
  font-size: 13px;
}

/* --------------------------- 모바일 하단 고정바 -------------------------- */
.mobile-call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--color-accent);
  display: flex;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.mobile-call-bar a {
  flex: 1;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 8px;
}

@media (min-width: 1024px) {
  .mobile-call-bar {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}

/* --------------------------------- 유틸 --------------------------------- */
.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  left: -9999px;
  top: auto;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.link-more {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}
