/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #d50050;
  --primary-dark: #a3003e;
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --text: #222222;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e8e8e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --transition: all 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(213, 0, 80, 0.3);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header h1 span {
  font-weight: 300;
  font-size: 14px;
  opacity: 0.85;
  display: block;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ===== Search ===== */
.search-section {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  position: sticky;
  top: 62px;
  z-index: 99;
}

.search-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(213, 0, 80, 0.1);
}

.search-box::before {
  content: "\1F50D";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.5;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tab {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== Quick Stats ===== */
.quick-stats {
  max-width: 1400px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card .stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Section ===== */
.section {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 24px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary);
}

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.section-header .badge {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

/* ===== Insurance Card ===== */
.ins-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.ins-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-color: var(--primary);
}

.ins-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, #fafafa, white);
}

.ins-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.ins-card-header .ins-info h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.ins-card-header .ins-info .ins-type {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ins-card-body {
  padding: 16px 20px;
}

.ins-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.ins-row:last-child { border-bottom: none; }

.ins-row .label {
  width: 90px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.ins-row .value {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.ins-row .value a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.ins-row .value a:hover {
  text-decoration: underline;
}

.phone-link {
  color: #1a73e8 !important;
  font-weight: 600 !important;
}

.phone-link:hover {
  color: var(--primary) !important;
}

.ins-card-footer {
  display: flex;
  border-top: 1px solid var(--border);
}

.ins-card-footer a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
  border-right: 1px solid var(--border);
}

.ins-card-footer a:last-child { border-right: none; }

.ins-card-footer a:hover {
  background: var(--primary);
  color: white;
}

/* ===== Useful Links Section ===== */
.useful-links {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 24px;
}

.useful-links h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid #333;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.link-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.link-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.link-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.link-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Calculator Section ===== */
.calc-section {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 24px;
}

.calc-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  border: 1px solid var(--border);
}

.calc-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.calc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}

.calc-field input, .calc-field select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.calc-field input:focus, .calc-field select:focus {
  border-color: var(--primary);
}

.calc-result {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

.calc-result .amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 4px;
}

.calc-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.calc-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ===== Notice Banner ===== */
.notice-banner {
  max-width: 1400px;
  margin: 24px auto 0;
  padding: 0 24px;
}

.notice-inner {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.notice-inner .notice-icon {
  font-size: 24px;
}

.notice-inner .notice-text {
  flex: 1;
}

.notice-inner .notice-text strong {
  color: #856404;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(213, 0, 80, 0.4);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(213, 0, 80, 0.5);
}

/* ===== Footer ===== */
.footer {
  background: #1a1a2e;
  color: #aaa;
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.footer h3 {
  color: white;
  font-size: 16px;
  margin-bottom: 12px;
}

.footer p, .footer li {
  font-size: 13px;
  line-height: 1.8;
}

.footer ul { list-style: none; }

.footer a:hover { color: white; }

.footer-bottom {
  max-width: 1400px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; }
  .header h1 { font-size: 20px; }
  .header-badge { display: none; }

  .search-section { padding: 12px 16px; top: 50px; }
  .search-inner { gap: 10px; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .filter-tab { padding: 8px 14px; font-size: 13px; }

  .quick-stats { grid-template-columns: repeat(2, 1fr); padding: 0 16px; }

  .section { padding: 0 16px; margin: 24px auto; }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }

  .ins-card-body { padding: 12px 16px; }
  .ins-row .label { width: 80px; font-size: 11px; }
  .ins-row .value { font-size: 13px; }

  .links-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }

  .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .quick-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-number { font-size: 24px; }

  .ins-card-footer a { font-size: 12px; padding: 10px 8px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ===== Animation ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ins-card {
  animation: fadeInUp 0.4s ease forwards;
}

.ins-card:nth-child(2) { animation-delay: 0.05s; }
.ins-card:nth-child(3) { animation-delay: 0.1s; }
.ins-card:nth-child(4) { animation-delay: 0.15s; }
.ins-card:nth-child(5) { animation-delay: 0.2s; }
.ins-card:nth-child(6) { animation-delay: 0.25s; }

/* ===== No Results ===== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 16px;
}

.no-results .emoji { font-size: 48px; margin-bottom: 12px; display: block; }
