/* ================================================
   base.css — CSS 변수, 리셋, 공통 컴포넌트
   ================================================ */

:root {
  --color-primary:   #0d4f3c;
  --color-accent:    #0891b2;
  --color-accent-h:  #0e7490;
  --color-green:     #0d9e6e;
  --color-bg:        #f0f9f5;
  --color-surface:   #ffffff;
  --color-text:      #0c2e22;
  --color-text-sub:  #3d6b58;
  --color-border:    #b0d8c8;
  --color-overlay:   rgba(8, 40, 28, 0.82);

  --font-base: 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;

  --card-radius: 8px;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --card-shadow-h: 0 6px 24px rgba(0, 0, 0, 0.14);

  --section-pad: 80px 0;
  --container-w: 1180px;
  --container-px: 24px;

  --transition: 0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Container ---- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ---- Section ---- */
.section { padding: var(--section-pad); }
.section--dark { background: var(--color-primary); color: #fff; }
.section--light { background: var(--color-surface); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.section--dark .section-header h2 { color: #fff; }
.section-header p {
  font-size: 1rem;
  color: var(--color-text-sub);
  max-width: 560px;
  margin: 0 auto;
}
.section--dark .section-header p { color: rgba(255,255,255,0.75); }
.section-header .line {
  display: inline-block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-top: 14px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-h); box-shadow: 0 4px 16px rgba(8,145,178,0.35); }

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--card-shadow-h); transform: translateY(-3px); }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e0f0e8;
  color: var(--color-accent);
}

/* ---- Grid helpers ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 959px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 599px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header { margin-bottom: 32px; }
}

/* ---- Page hero ---- */
.page-hero {
  background: linear-gradient(135deg, #084232 0%, #0d6b4a 60%, #0e7490 100%);
  color: #fff;
  padding: 64px 0 52px;
  text-align: center;
}
.page-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.page-hero p { font-size: 1rem; opacity: 0.82; }

@media (max-width: 599px) {
  .page-hero { padding: 44px 0 36px; }
  .page-hero h1 { font-size: 1.5rem; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
