/* 동백꽃 필 무렵 재가센터 - 메인 스타일 */

@font-face {
  font-family: 'Hamchorom Dotum';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_four@1.0/HCRDotum.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-cream: #fffaf5;
  --bg-page: rgb(255, 211, 0); /* #FFD300 - 네이버 블로그(26_camellia) 바탕색 */
  --bg-white: #ffffff;
  --accent-red: #c0392b;
  --accent-camellia: #d63031;
  --accent-yellow: #f9ca24;
  --accent-green: #27ae60;
  --text-dark: #2c3e50;
  --text-muted: #5d6d7e;
  --border-light: #f0e6dc;
  --shadow-soft: 0 4px 20px rgba(192, 57, 43, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Hamchorom Dotum', '함초롬돋움', sans-serif;
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-page);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(214, 48, 49, 0.15);
}

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

a,
button {
  touch-action: manipulation;
}

/* 헤더 */
.site-header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--accent-camellia);
  padding: 1rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.site-header h1 {
  font-family: 'Hamchorom Dotum', '함초롬돋움', sans-serif;
  font-size: 2.2rem;
  color: var(--accent-camellia);
  font-weight: 700;
}

.site-header .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* 메인 히어로 */
.hero {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.hero-image {
  max-width: 420px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 4px solid var(--bg-white);
}

/* 컨테이너 */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* 섹션 */
section {
  margin-bottom: 2.5rem;
}

section h2 {
  font-family: 'Hamchorom Dotum', '함초롬돋움', sans-serif;
  font-size: 2rem;
  color: var(--accent-camellia);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dashed var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

section h2 .icon {
  font-size: 1.6rem;
}

/* 소개 박스 */
.intro-box {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  box-shadow: var(--shadow-soft);
  border-left: 5px solid var(--accent-camellia);
  font-size: 1.4rem;
  line-height: 1.9;
}

.intro-box strong {
  color: var(--accent-camellia);
}

/* 서비스 카드 그리드 */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.service-card {
  background: var(--bg-white);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--accent-yellow);
  transition: transform 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
}

.service-card .card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.service-card h3 {
  font-size: 1.5rem;
  color: var(--accent-camellia);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 서비스 비교 표 */
.service-table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.service-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  font-size: 1.2rem;
}

.service-table thead {
  background: linear-gradient(135deg, var(--accent-camellia), #e17055);
  color: white;
}

.service-table th,
.service-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.service-table th {
  font-size: 1.3rem;
  font-weight: 700;
}

.service-table tbody tr:hover {
  background: #fff8f0;
}

.service-table tbody tr:nth-child(even) {
  background: #fffcf9;
}

.service-table tbody tr:nth-child(even):hover {
  background: #fff8f0;
}

/* 이용 절차 플로우 */
.process-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.process-step {
  background: var(--bg-white);
  border: 2px solid var(--accent-yellow);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  text-align: center;
  min-width: 130px;
  flex: 1 1 130px;
  max-width: 160px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.process-step .step-num {
  display: inline-block;
  background: var(--accent-camellia);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  line-height: 28px;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.process-step .step-title {
  font-size: 1.15rem;
  color: var(--text-dark);
  font-weight: 700;
}

.process-step .step-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.process-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--accent-camellia);
  flex: 0 0 auto;
}

/* 이용절차 상세 박스 */
.procedure-box {
  background: linear-gradient(135deg, #fff8f0, var(--bg-white));
  border: 2px solid var(--accent-camellia);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.procedure-box h3 {
  font-size: 1.8rem;
  color: var(--accent-camellia);
  margin-bottom: 1rem;
  text-align: center;
}

.procedure-list {
  list-style: none;
  counter-reset: procedure;
}

.procedure-list li {
  counter-increment: procedure;
  padding: 0.7rem 0 0.7rem 3rem;
  position: relative;
  font-size: 1.35rem;
  border-bottom: 1px dashed var(--border-light);
}

.procedure-list li:last-child {
  border-bottom: none;
}

.procedure-list li::before {
  content: counter(procedure);
  position: absolute;
  left: 0;
  top: 0.65rem;
  background: var(--accent-yellow);
  color: var(--text-dark);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 1.1rem;
}

.procedure-list li.highlight {
  background: rgba(249, 202, 36, 0.15);
  border-radius: 8px;
  padding-left: 3rem;
  margin: 0.3rem 0;
}

.procedure-list li.highlight::before {
  background: var(--accent-camellia);
  color: white;
}

/* 연락처 */
.contact-box {
  background: var(--bg-white);
  color: var(--text-dark);
  border-radius: 16px;
  padding: 1.8rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.contact-box h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.contact-box .phone {
  font-weight: 700;
  letter-spacing: 2px;
}

.contact-box .phone-link {
  font-size: 2.2rem;
  color: var(--text-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  line-height: 1;
}

.contact-box .phone-link:hover {
  text-decoration: underline;
}

.contact-box .phone-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  background-color: #34A853;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
  background-size: 58%;
  background-position: center;
  background-repeat: no-repeat;
}

.contact-box .blog-link {
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.contact-box .blog-link a {
  color: var(--text-dark);
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-box .blog-link a:hover {
  opacity: 0.9;
}

.contact-box .blog-qr {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-box .blog-qr img {
  background: #fff;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.contact-box .blog-qr-caption {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.contact-hours {
  margin-top: 0.5rem;
  font-size: 1.2rem;
}

/* 등급 안내 다이어그램 */
.grade-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.grade-item {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-soft);
}

.grade-item .grade-label {
  font-size: 1.4rem;
  color: var(--accent-camellia);
  font-weight: 700;
}

.grade-item .grade-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* 푸터 */
.site-footer {
  background: var(--text-dark);
  color: #ecf0f1;
  text-align: center;
  padding: 1.5rem;
  font-size: 1.1rem;
}

.site-footer a {
  color: var(--accent-yellow);
}

.visitor-stats {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.05rem;
  opacity: 0.9;
}

.visitor-stats a {
  color: var(--accent-yellow);
  text-decoration: none;
}

.visitor-stats a:hover {
  text-decoration: underline;
}

.visitor-stats .count {
  color: var(--accent-yellow);
  font-weight: 700;
}

/* 반응형 - Galaxy S23/S24/S25/S26 등 (360~430px) */
@media (max-width: 480px) {
  body {
    font-size: 1.15rem;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-header {
    padding: 0.85rem 1rem;
    padding-top: max(0.85rem, env(safe-area-inset-top));
  }

  .site-header h1 {
    font-size: 1.55rem;
    line-height: 1.35;
    word-break: keep-all;
  }

  .site-header .subtitle {
    font-size: 1.05rem;
  }

  .hero {
    padding: 1.25rem 0.75rem 0.75rem;
  }

  .hero-image {
    border-width: 3px;
  }

  .container {
    padding: 0 1rem 2.5rem;
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }

  section {
    margin-bottom: 2rem;
  }

  section h2 {
    font-size: 1.45rem;
    flex-wrap: wrap;
    word-break: keep-all;
  }

  .intro-box {
    padding: 1.2rem 1rem;
    font-size: 1.1rem;
    line-height: 1.75;
  }

  .grade-diagram {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .grade-item {
    padding: 0.85rem 0.5rem;
  }

  .grade-item .grade-label {
    font-size: 1.2rem;
  }

  .grade-item .grade-desc {
    font-size: 0.95rem;
    word-break: keep-all;
  }

  .procedure-box {
    padding: 1.2rem 1rem;
    margin-top: 1rem;
  }

  .procedure-box h3 {
    font-size: 1.45rem;
    word-break: keep-all;
  }

  .procedure-list li {
    font-size: 1.1rem;
    padding: 0.65rem 0 0.65rem 2.6rem;
  }

  .procedure-list li::before {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 1rem;
    top: 0.6rem;
  }

  .procedure-list li.highlight {
    padding-left: 2.6rem;
  }

  .contact-box {
    padding: 1.2rem 1rem;
  }

  .contact-box h3 {
    font-size: 1.35rem;
    line-height: 1.45;
    word-break: keep-all;
  }

  .contact-box .phone-link {
    font-size: 1.65rem;
    min-height: 48px;
    padding: 0.4rem 0;
    justify-content: center;
  }

  .contact-box .blog-link {
    font-size: 1rem;
    line-height: 1.5;
    word-break: keep-all;
  }

  .contact-box .blog-link a {
    display: inline-block;
    min-height: 44px;
    padding: 0.2rem 0;
  }

  .contact-box .blog-qr img {
    width: 140px;
    height: 140px;
  }

  .contact-hours {
    font-size: 1.05rem;
  }

  .site-footer {
    padding: 1.2rem 1rem;
    padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
    font-size: 1rem;
  }

  .visitor-stats {
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: keep-all;
  }

  .process-arrow {
    display: none;
  }

  .process-flow {
    flex-direction: column;
    align-items: center;
  }

  .process-step {
    max-width: 100%;
    width: 100%;
  }
}

/* 벚꽃 잎 흩날림 효과 */
.petals-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}

.petal {
  position: absolute;
  top: -5vh;
  display: block;
  border-radius: 150% 0 150% 0;
  opacity: 0;
  box-shadow: 0 1px 2px rgba(214, 48, 49, 0.08);
  will-change: transform, opacity;
  animation: petal-fall linear infinite;
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.85;
  }
  25% {
    transform: translate3d(calc(var(--sway) * 0.5), 28vh, 0) rotate(calc(var(--spin) * 0.25));
  }
  50% {
    transform: translate3d(calc(var(--sway) * -0.4), 55vh, 0) rotate(calc(var(--spin) * 0.5));
  }
  75% {
    transform: translate3d(calc(var(--sway) * 0.6), 82vh, 0) rotate(calc(var(--spin) * 0.75));
  }
  100% {
    transform: translate3d(calc(var(--sway) * -0.2), 110vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .petals-layer {
    display: none;
  }
}
