/* =========================================================
   살림답 공통 스타일
   PULSE SITE UI FOUNDATION V0.1
   ========================================================= */

/* ---------- 기본 설정 ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    Arial,
    sans-serif;
  color: #222222;
  background: #f7f8f5;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.wide-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- 접근성 ---------- */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 11px 16px;
  border-radius: 10px;
  color: #ffffff;
  background: #24583a;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(229, 139, 49, 0.55);
  outline-offset: 3px;
}

/* ---------- 공통 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #e5e7e2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.header-inner {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  flex-shrink: 0;
  color: #24583a;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -1px;
}

.logo span {
  color: #e58b31;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-size: 13px;
  font-weight: 750;
}

.site-nav a {
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #24583a;
}

.site-nav a[aria-current="page"] {
  font-weight: 850;
}

.tools-link {
  padding: 9px 13px;
  border: 1px solid #c9d9cb;
  border-radius: 999px;
  color: #24583a;
  background: #f5faf4;
}

/* ---------- 모바일 메뉴 버튼 ---------- */

.mobile-menu-button {
  width: 42px;
  height: 42px;
  display: none;
  flex-shrink: 0;
  padding: 9px;
  border: 1px solid #d9e1d8;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 100%;
  height: 2px;
  display: block;
  margin: 5px 0;
  border-radius: 999px;
  background: #24583a;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.mobile-menu-button.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 공통 카테고리 히어로 ---------- */

.category-hero {
  padding: 76px 0 62px;
  background:
    radial-gradient(
      circle at 86% 20%,
      var(--hero-accent-one, #dce9d7) 0,
      transparent 29%
    ),
    radial-gradient(
      circle at 12% 88%,
      var(--hero-accent-two, #f2dfc2) 0,
      transparent 27%
    ),
    linear-gradient(
      135deg,
      var(--hero-background-one, #f2f7ef),
      var(--hero-background-two, #fff9f0)
    );
}

.category-label {
  display: inline-block;
  margin-bottom: 15px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--category-label-color, #24583a);
  background: var(--category-label-background, #dfecdc);
  font-size: 14px;
  font-weight: 800;
}

.category-title {
  max-width: 800px;
  margin: 0;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.18;
  letter-spacing: -2.5px;
}

.category-description {
  max-width: 760px;
  margin: 20px 0 0;
  color: #575757;
  font-size: 18px;
  line-height: 1.75;
}

/* ---------- 공통 본문 ---------- */

.site-main {
  padding: 68px 0 96px;
}

.section + .section {
  margin-top: 76px;
}

.section-heading {
  margin-bottom: 27px;
}

.section-heading h2 {
  margin: 0;
  font-size: 31px;
  line-height: 1.35;
  letter-spacing: -1.2px;
}

.section-heading p {
  margin: 9px 0 0;
  color: #666666;
}

/* ---------- 하위 주제 카드 ---------- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.topic-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-card {
  min-height: 190px;
  padding: 23px;
  border: 1px solid #e3e6df;
  border-radius: 18px;
  background: #ffffff;
}

.topic-icon {
  width: 43px;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 13px;
  color: var(--topic-icon-color, #24583a);
  background: var(--topic-icon-background, #eef5ec);
  font-size: 21px;
}

.topic-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--topic-title-color, #24583a);
  font-size: 19px;
}

.topic-card span {
  color: #666666;
  font-size: 14px;
}

/* ---------- 준비 콘텐츠 카드 ---------- */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  overflow: hidden;
  border: 1px solid #e3e6df;
  border-radius: 19px;
  background: #ffffff;
}

.article-image {
  min-height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--article-image-background, #edf4ea);
  font-size: 52px;
}

.article-body {
  padding: 23px;
}

.article-meta {
  color: var(--article-meta-color, #287147);
  font-size: 13px;
  font-weight: 800;
}

.article-card h3 {
  margin: 8px 0 10px;
  font-size: 21px;
  line-height: 1.42;
  letter-spacing: -0.5px;
}

.article-card p {
  margin: 0;
  color: #666666;
  font-size: 14px;
}

/* ---------- PULSE 분류 안내 ---------- */

.classification-box {
  margin-top: 30px;
  padding: 25px;
  border-radius: 17px;
  color: var(--classification-color, #31513c);
  background: var(--classification-background, #eef5ec);
}

.classification-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.classification-box p {
  margin: 0;
}

/* ---------- 일반 안내 박스 ---------- */

.notice-box {
  margin-top: 30px;
  padding: 24px;
  border-radius: 16px;
  color: #5f4b32;
  background: #fff8ee;
}

.notice-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.notice-box p {
  margin: 0;
}

.emergency-box {
  margin-top: 30px;
  padding: 25px;
  border-left: 5px solid #c65c4d;
  border-radius: 16px;
  color: #693d36;
  background: #fff0ed;
}

.emergency-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.emergency-box p {
  margin: 0;
}

/* ---------- 공통 푸터 ---------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid #e5e7e2;
  background: #ffffff;
  color: #666666;
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.footer-brand strong {
  display: block;
  margin-bottom: 5px;
  color: #24583a;
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.footer-links a:hover {
  color: #24583a;
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid #eeeeeb;
  color: #888888;
  font-size: 13px;
}

/* ---------- 태블릿 및 모바일 메뉴 ---------- */

@media (max-width: 1080px) {
  .mobile-menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 14px;
    border: 1px solid #e5e7e2;
    border-radius: 0 0 16px 16px;
    background: #ffffff;
    box-shadow: 0 16px 30px rgba(35, 55, 40, 0.1);
  }

  .site-nav.mobile-nav-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .site-nav a {
    padding: 12px;
    border-radius: 10px;
    background: #f7f9f5;
    text-align: center;
  }

  .site-nav a[aria-current="page"] {
    color: #ffffff;
    background: #55775d;
  }

  .site-nav .tools-link {
    border: 0;
    color: #ffffff;
    background: #24583a;
  }

  .topic-grid,
  .topic-grid.three-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 작은 화면 ---------- */

@media (max-width: 620px) {
  .container,
  .wide-container {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .site-nav.mobile-nav-open {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .category-hero {
    padding: 54px 0 47px;
  }

  .category-title {
    letter-spacing: -1.8px;
  }

  .category-description {
    font-size: 16px;
  }

  .site-main {
    padding: 50px 0 72px;
  }

  .section + .section {
    margin-top: 60px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .topic-grid,
  .topic-grid.three-columns {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
