/* ==========================================================================
   재사용 컴포넌트 - 버튼, 카드, 폼 등
   ========================================================================== */

/* 버튼
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-header {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
  padding: 10px 20px;
}

.btn-header:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.header.scrolled .btn-header {
  background: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-sm);
}

.header.scrolled .btn-header:hover {
  background: var(--primary-blue-dark);
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-green {
  background: var(--eco-green);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-green:hover {
  background: var(--eco-green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-large {
  padding: 18px 36px;
  font-size: var(--text-body);
  border-radius: var(--radius-lg);
}

/* 로고 컴포넌트
   ========================================================================== */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 8px 16px;
  backdrop-filter: blur(10px);
  border-radius: 8px;
  transition: var(--transition);
}

.header.scrolled .logo {
  background: transparent;
  backdrop-filter: none;
}

.logo-image {
  height: 32px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.header.scrolled .logo-image {
  filter: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(
    135deg,
    var(--medical-blue-500),
    var(--eco-green-500)
  );
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  font-weight: 700;
  color: var(--white);
  transition: var(--transition);
}

.header.scrolled .logo-text {
  color: var(--slate-800);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-image {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(
    135deg,
    var(--medical-blue-500),
    var(--eco-green-500)
  );
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-icon svg {
  width: 18px;
  height: 18px;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  font-weight: 700;
  color: var(--slate-800);
}

/* 배지 컴포넌트
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
}

.badge-primary {
  background: linear-gradient(
    135deg,
    var(--eco-green-500),
    var(--medical-blue-400)
  );
  color: white;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 문제 항목 카드
   ========================================================================== */
.problem-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.problem-item:hover {
  border-color: var(--medical-blue-200);
  box-shadow: var(--shadow-md);
}

.problem-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--warning-100), #fff7ed);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.problem-item-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--warning-500);
  fill: none;
}

.problem-item-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 2px;
}

.problem-item-content p {
  font-size: 14px;
  color: var(--slate-500);
}

/* 솔루션 카드
   ========================================================================== */
.solution-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  padding: 32px 24px;
}

.solution-card-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .solution-card {
    padding: 40px 32px;
  }
}

@media (min-width: 1025px) {
  .solution-card {
    grid-template-columns: auto 1fr;
    gap: 48px;
    padding: 48px 56px;
  }

  .solution-card.reverse {
    grid-template-columns: 1fr auto;
  }

  .solution-card.reverse .solution-card-visual {
    order: 2;
  }
}

.solution-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.15);
}

.solution-card-icon {
  width: 150px;
  height: 150px;
  background: linear-gradient(
    135deg,
    var(--eco-green-500),
    var(--medical-blue-400)
  );
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(34, 197, 94, 0.3);
  position: relative;
  margin: 0 auto;
}

.solution-card-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
}

.solution-card-icon svg {
  width: 75px;
  height: 75px;
  fill: white;
}

.solution-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.solution-card-icon.has-image {
  width: 180px;
  height: 180px;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

@media (min-width: 1025px) {
  .solution-card-icon {
    width: 170px;
    height: 170px;
  }

  .solution-card-icon svg {
    width: 90px;
    height: 90px;
  }

  .solution-card-icon.has-image {
    width: 210px;
    height: 210px;
  }
}

.solution-card-icon.has-image::before {
  display: none;
}

.solution-card-footnote {
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray-600);
  text-align: left;
}

/* 혜택 카드
   ========================================================================== */
.benefit-card {
  padding: 36px 32px;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 100%);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  word-break: keep-all;
}

.benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--medical-blue-400),
    var(--eco-green-400)
  );
  opacity: 0;
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.benefit-card:hover::before {
  opacity: 1;
}

.benefit-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: linear-gradient(
    135deg,
    var(--medical-blue-100),
    var(--eco-green-100)
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--medical-blue-500);
}

.benefit-card:nth-child(2) .benefit-icon svg {
  fill: var(--eco-green-600);
}

.benefit-card:nth-child(3) .benefit-icon svg {
  fill: var(--medical-blue-400);
}

.benefit-title {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 10px;
}

.benefit-desc {
  font-size: 15px;
  color: var(--slate-500);
  line-height: 1.7;
}

.benefit-highlight {
  margin-top: 16px;
  padding: 10px 16px;
  background: var(--eco-green-100);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--eco-green-700);
}

/* 폼 컴포넌트
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-label .required {
  color: #ef4444;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--slate-800);
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--medical-blue-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--slate-400);
}

.form-select {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--slate-800);
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-select:focus {
  outline: none;
  border-color: var(--medical-blue-400);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.form-checkbox input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--medical-blue-500);
  cursor: pointer;
}

.form-checkbox-text {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.5;
}

.form-checkbox-text a {
  color: var(--medical-blue-500);
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  margin-top: 28px;
  padding: 18px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 700;
  color: white;
  background: linear-gradient(
    135deg,
    var(--eco-green-500),
    var(--medical-blue-400)
  );
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(34, 197, 94, 0.4);
}

/* 문제 섹션 배경 이미지 오버라이드
   ========================================================================== */
.problem-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.problem-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.problem-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.78) 50%,
    rgba(15, 23, 42, 0.88) 100%
  );
}

.problem-icon-wrapper {
  width: 88px;
  height: 88px;
  margin: 0 auto 32px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: problemPulse 2.5s ease-in-out infinite;
}

.problem-icon-wrapper svg {
  width: 44px;
  height: 44px;
  stroke: var(--warning-500);
  fill: none;
}

@keyframes problemPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

.problem-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 768px) {
  .problem-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.problem-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px 20px;
  transition: var(--transition);
  text-align: center;
}

.problem-stat:hover {
  background: rgba(255, 255, 255, 0.185);
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.3);
}

.problem-stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.problem-stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--warning-500);
  fill: none;
}

.problem-stat-label {
  font-size: 13px;
  color: var(--slate-400);
  margin-bottom: 6px;
  word-break: keep-all;
}

.problem-stat-value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
}
