/* ===== 푸터 스타일 ===== */
.site-footer {
  min-height: 448px;
  height: 100%;
  background: #cbdcf5;
  color: rgba(255, 255, 255, 0.9);
  padding: 48px 0;
  font-family: "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.site-footer .footer-inner {
  max-width: 1500px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 19px;
}

/* 왼쪽 영역 */
.footer-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 550px;
  flex-shrink: 0;
}

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

.brand-mark-icon {
  width: 84px;
  height: 79px;
}

.brand-mark {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
}
.footer-logo-name {
  font-family: "Pretendard", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(42px, 3vw, 48px);
  line-height: 57px;

  color: #ffffff;
}
.brand-lines {
  margin: auto;
  text-align: center;
}

.brand-lines .brand-ko {
  font-family: "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.brand-lines .brand- {
  font-family: "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 200;
  font-size: 13px;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

/* 세로 구분선 */
.footer-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.35);
  opacity: 0.7;
}

/* 오른쪽 영역 */
.footer-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links {
  font-family: "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links .sep {
  margin: 0 12px;
  opacity: 0.7;
}

.corp-info {
  font-family: "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.95;
  white-space: nowrap;
}

.copyright {
  font-family: "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 18px;
  opacity: 0.95;
}

/* 푸터 아이콘 */
.clinic-icons {
  height: auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.clinic-icons a {
  text-decoration: none;
  color: inherit;
}

.clinic-icons img {
  width: 46px;
  height: 46px;
  margin: 0 6px;
  vertical-align: middle;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.clinic-icons img:hover {
  opacity: 0.7;
}

/* ===== 하단 고정바 스타일 ===== */
.bottom-fixed-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  min-width: 1500px;
  height: auto;
  min-height: 100px;
  background: linear-gradient(
    to bottom,
    rgba(189, 212, 255, 0.3) 0%,
    rgba(232, 241, 255, 0.2) 100%
  );
  backdrop-filter: blur(10px);
  border-top: 1px solid #e0e0e0;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  padding: 15px 25px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 102;
  flex-wrap: wrap;
}

/* 모바일 토글 버튼 */
.bottom-bar-toggle {
  display: none;
  width: 100%;
  background: linear-gradient(135deg, #2c5aa0 0%, #1e4a8c 100%);
  border: none;
  color: white;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.bottom-bar-toggle:hover {
  background: linear-gradient(135deg, #1e4a8c 0%, #2c5aa0 100%);
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.toggle-text {
  font-family: "Pretendard", sans-serif;
}

/* 메인 콘텐츠 영역 */
.bottom-bar-content {
  display: flex;
  align-items: center;
  gap: 0px;
  transition: all 0.3s ease;
}

.bot-add-style {
  transform: translateX(20%);
}

/* 폼 스타일 */
#consultationForm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.bottom-input {
  color: #404040cc;
}

.bottom-input:first-child {
  width: 226px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 15px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  background: white;
  flex-shrink: 0;
  margin-right: 15px;
  box-shadow: 0 4px 10.1px rgba(0, 0, 0, 0.25);
}

.bottom-input:nth-child(2) {
  width: 226px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 15px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  background: white;
  flex-shrink: 0;
  margin-right: 40px;
  box-shadow: 0 4px 10.1px rgba(0, 0, 0, 0.25);
}

.bottom-input:focus {
  outline: none;
  border-color: #1d4074;
  box-shadow: 0 0 0 2px rgba(29, 64, 116, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bottom-select {
  width: 300px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 15px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #404040cc;
  font-weight: 400;
  background: white;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 15px;
  box-shadow: 0 4px 10.1px rgba(0, 0, 0, 0.25);
}

.bottom-select:focus {
  outline: none;
  border-color: #1d4074;
  box-shadow: 0 0 0 2px rgba(29, 64, 116, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bottom-consultation-btn {
  width: 165px;
  height: 55px;
  background: white;
  color: #9a9595;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 60px;
  box-shadow: 0 4px 10.1px rgba(0, 0, 0, 0.25);
}

.bottom-consultation-btn:hover {
  background: #f8f9fa;
  border-color: #9a9595;
}

.bottom-consultation-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* 셀렉트와 개인정보 동의 래퍼 */
.select-privacy-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  margin-right: 15px;
}

.privacy-consent-inline {
  position: absolute;
  top: -20px;
  right: 15px;
  background-color: rgba(125, 131, 145, 0.3);
  padding: 0 4px;
  font-size: 11px;
  line-height: 1;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.privacy-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.privacy-checkbox {
  opacity: 0;
  position: absolute;
  cursor: pointer;
}

.privacy-checkmark {
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.privacy-checkmark:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.privacy-checkbox:checked + .privacy-checkmark {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.privacy-checkbox:checked + .privacy-checkmark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #7d8391;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  animation: checkFadeIn 0.3s ease forwards;
}

@keyframes checkFadeIn {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }

  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

.privacy-text {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
}

.privacy-detail-link {
  text-decoration: underline;
  cursor: pointer;
  color: #ffffff;
}

.privacy-detail-link:hover {
  text-decoration: none;
  opacity: 0.8;
  color: #ffffff;
}

/* 하단 아이콘들 */
.bottom-icons {
  display: flex;
  gap: 10px;
  margin-right: auto;
}

.bottom-icon-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 6px;
  text-align: center;
  gap: 10px;
  min-width: 70px;
}

.bottom-icon-item:hover {
  transform: translateY(-2px);
}

.bottom-icon-item img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.bottom-icon-item span {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 1.2;
  white-space: pre-line;
  text-align: left;
}

/* Top 버튼 */
button.top-button {
  height: 40px !important;
  width: 50px !important;
  background: transparent !important;
  border: none !important;
  font-family: "Pretendard", sans-serif !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px !important;
  margin-left: 95px !important;
  order: 999 !important;
  z-index: 1001 !important;
  pointer-events: auto !important;
  position: relative !important;
}

button.top-button:hover {
  transform: translateY(-1px) !important;
  background: transparent !important;
  border: none !important;
}

.top-button .top-arrow {
  font-size: 15px !important;
  line-height: 1 !important;
  margin-bottom: 12px !important;
  color: #353131 !important;
}

.top-button span {
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  color: #353131 !important;
  pointer-events: none !important;
  margin-bottom: 12px;
}

/* 모바일 전용 Top 버튼 */
.mobile-top-button {
  display: none;
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(189, 212, 255, 0.5);
  border: none;
  border-radius: 50%;
  color: #000000;
  font-family: "Pretendard", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  z-index: 101;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-top-button .top-arrow {
  font-size: 18px;
  line-height: 1;
  margin: 0;
  color: #353131;
}

.mobile-top-button span {
  font-size: 9px;
  font-weight: 400;
  line-height: 1;
  color: #353131;
  pointer-events: none;
  margin: 0;
  margin-top: 2px;
}

/* 모달 컨테이너 */
.modal-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  animation: slideUp 0.3s ease;
}

.modal-container.active {
  display: flex;
  flex-direction: column;
}

/* 모달 헤더 */
.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #333;
}

/* 모달 본문 */
.modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.8;
  color: #333;
}

.modal-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 12px;
  color: #222;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 15px;
  font-size: 14px;
}

.modal-body ul {
  margin: 10px 0 15px 20px;
}

.modal-body li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* 애니메이션 */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.privacy-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  table-layout: fixed;
  text-align: center;
  margin: 20px 0;
}

.privacy-table th,
.privacy-table td {
  border: 1px solid #ddd;
  padding: 15px 8px;
  vertical-align: middle;
  line-height: 1.6;
}

.privacy-table th {
  background: #fafafa;
  font-weight: 600;
}

.privacy-table thead th {
  background: #fafafa;
  font-weight: 600;
  padding: 15px 8px;
}

.privacy-table tbody td {
  padding: 20px 8px;
}

/* 반응형 처리 */
@media (max-width: 768px) {
  .privacy-table {
    font-size: 12px;
  }

  .privacy-table th,
  .privacy-table td {
    padding: 10px 5px;
  }
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
  /* 푸터 반응형 */
  .site-footer {
    min-height: auto;
    padding: 40px 0;
  }

  .site-footer .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
    text-align: center;
  }

  .footer-left {
    width: 100%;
    order: 1;
  }

  .footer-divider {
    display: none;
  }

  .footer-right {
    order: 2;
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .brand-mark-icon {
    width: 60px;
    height: 56px;
  }

  .brand-mark {
    max-width: 280px;
  }

  .brand-lines .brand-ko {
    font-size: 18px;
  }

  .brand-lines .brand- {
    font-size: 12px;
  }

  .footer-links {
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
  }

  .corp-info {
    font-size: 13px;
    text-align: center;
    white-space: normal;
    line-height: 1.6;
  }

  .copyright {
    font-size: 12px;
    text-align: center;
  }

  .clinic-icons {
    justify-content: center;
    margin-top: 20px;
  }

  .clinic-icons img {
    width: 36px;
    height: 36px;
    margin: 0 8px;
  }

  /* 하단 고정바 기본 스타일 수정 */
  .bottom-fixed-bar {
    width: 100%;
    left: 0;
    transform: none;
    padding: 0;
    flex-direction: column;
    gap: 0;
    height: auto;
    min-height: auto;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 33px 33px 0 0;
    min-width: auto;
    background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.07) -22.55%,
      rgba(255, 255, 255, 0.28) 21.9%,
      rgba(255, 255, 255, 0.7) 249.92%
    );
    box-shadow: 0px 4px 10.1px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(50px);
  }
  .btn-container {
    width: 100%;
    display: flex;
  }

  /* 접기/펼치기 토글 버튼 */
  .bottom-bar-toggle {
    display: flex !important;
    width: 100%;
    height: 50px;
    background: linear-gradient(
      to bottom,
      rgba(189, 212, 255, 0.4) 0%,
      rgba(232, 241, 255, 0.3) 100%
    );
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(224, 224, 224, 0.5);
    position: relative;
  }
  .bottom-bar-toggle:nth-child(2) a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
  }
  .bottom-bar-toggle:nth-child(2)::before {
    content: "";
    width: 1px;
    height: 10px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    z-index: 1002;
  }

  .bottom-bar-toggle:hover {
    background: linear-gradient(
      to bottom,
      rgba(189, 212, 255, 0.5) 0%,
      rgba(232, 241, 255, 0.4) 100%
    );
  }

  .toggle-icon {
    font-size: 16px;
    color: #666;
    margin-right: 8px;
    transition: transform 0.3s ease;
  }

  .toggle-text {
    font-family: "Inter", sans-serif;
    color: #000;
    font-size: 12px;
    font-weight: 400;
  }

  /* 접힌 상태에서 아이콘 회전 */
  .bottom-fixed-bar.collapsed .toggle-icon {
    transform: rotate(45deg);
  }

  /* 메인 콘텐츠 영역 */
  .bottom-bar-content {
    width: 100%;
    padding: 40px 15px;
    background: linear-gradient(
      to bottom,
      rgba(189, 212, 255, 0.3) 0%,
      rgba(232, 241, 255, 0.2) 100%
    );
    backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    overflow: hidden;
    flex-direction: column;
    gap: 15px;
  }

  /* 접힌 상태 */
  .bottom-fixed-bar.collapsed .bottom-bar-content {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    padding: 0 15px;
  }

  /* 폼 스타일 */
  #consultationForm {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .bottom-input:first-child,
  .bottom-input:nth-child(2) {
    width: 100%;
    margin-right: 0;
    font-size: 16px;
    height: 44px;
  }

  .bottom-select {
    width: 100%;
    margin-right: 0;
    height: 44px;
    font-size: 16px;
  }

  .bottom-consultation-btn {
    width: 100%;
    margin-right: 0;
    height: 50px;
    font-size: 16px;
    margin-top: 5px;
  }

  .bottom-icons {
    justify-content: space-around;
    margin: 15px 0 0 0;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
  }

  .bottom-icon-item {
    flex-direction: column;
    gap: 8px;
    min-width: auto;
  }

  .bottom-icon-item img {
    width: 32px;
    height: 32px;
  }

  .bottom-icon-item span {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }

  /* 개인정보 동의 영역 */
  .select-privacy-wrapper {
    width: 100%;
    align-items: stretch;
    margin-right: 0;
  }

  .privacy-consent-inline {
    position: static;
    background-color: rgba(125, 131, 145, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: 100%;
    justify-content: center;
  }

  .privacy-text,
  .privacy-detail-link {
    font-size: 12px;
  }

  /* 모바일에서 기존 Top 버튼 숨기기 */
  .bottom-fixed-bar .top-button,
  button.top-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* 모바일 전용 Top 버튼 표시 */
  .mobile-top-button {
    display: flex !important;
  }
}

/* PC에서만 표시 */
@media (min-width: 769px) {
  .bottom-bar-toggle {
    display: none;
  }

  .bottom-fixed-bar {
    position: fixed;
  }

  .top-button {
    display: flex;
  }

  .mobile-top-button {
    display: none;
  }
}

/* 모바일에서 입력 필드 터치 영역 개선 */
@media (max-width: 768px) {
  .bottom-input:first-child,
  .bottom-input:nth-child(2) {
    width: 100%;
    margin-right: 0;
    font-size: 16px !important;
    /* iOS에서 자동 줌인 방지 */
    height: 44px;
    touch-action: manipulation;
    /* 더블탭 줌 방지 */
  }

  .bottom-select {
    width: 100%;
    margin-right: 0;
    height: 44px;
    font-size: 16px !important;
    /* iOS에서 자동 줌인 방지 */
    touch-action: manipulation;
  }

  /* 입력 필드 포커스 시 하단바가 닫히지 않도록 */
  .bottom-bar-content:has(input:focus),
  .bottom-bar-content:has(select:focus) {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 500px !important;
    padding: 40px 15px !important;
  }

  /* 펼쳐진 상태에서 입력 필드에 포커스가 있을 때 */
  .bottom-fixed-bar:not(.collapsed) .bottom-bar-content {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 500px !important;
  }

  /* 폼 영역 터치 이벤트 개선 */
  #consultationForm {
    pointer-events: auto;
    touch-action: auto;
  }

  #consultationForm input,
  #consultationForm select {
    pointer-events: auto;
    touch-action: auto;
  }
}

/* 모바일 뷰포트 높이 변경에도 안정적인 동작 */
@media (max-width: 768px) {
  .bottom-fixed-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 102;
  }

  /* 키보드가 올라와도 하단바 위치 고정 */
  .bottom-fixed-bar.collapsed {
    bottom: 0;
  }
}
