/* 기본 설정 */
body {
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

/* 공지사항 위젯 notice-widget.js 용 */
/* ============================
   🔔 공지사항 스타일
============================ */

/* 전체 감싸는 박스 */
.notice-wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px 30px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #dce3ea;
}

/* 제목 */
.page-header {
  font-size: 1.8rem;
  color: #003366;
  margin-bottom: 24px;
  text-align: center;
}

/* 관리자 로그인 영역 */
#adminLogin {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

#adminLogin input {
  padding: 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 220px;
}

#adminLogin button {
  padding: 10px 16px;
  background-color: #139ca5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

#adminLogin button:hover {
  background-color: #117a85;
}

/* 공지사항 등록 폼 */
.notice-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.notice-form input,
.notice-form textarea {
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.notice-form textarea {
  min-height: 120px;
  resize: vertical;
}

.notice-form button {
  align-self: flex-end;
  background-color: #003366;
  color: white;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.notice-form button:hover {
  background-color: #005199;
}

/* 공지사항 테이블 */
.notice-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
}

.notice-table thead {
  background-color: #f0f2f5;
}

.notice-table th,
.notice-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e1e8f0;
  text-align: left;
}

.notice-table th {
  color: #003366;
  font-weight: 600;
}

.notice-table td button {
  background-color: #ff5c5c;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.notice-table td button:hover {
  background-color: #e84242;
}

/* 숨김 클래스 */
.hidden {
  display: none;
}

/* 반응형 대응 */
@media screen and (max-width: 768px) {
  .notice-wrapper {
    padding: 20px 16px;
  }

  #adminLogin {
    flex-direction: column;
    align-items: center;
  }

  #adminLogin input {
    width: 100%;
  }

  .notice-form button {
    width: 100%;
  }
}


/* 헤더 */
.navbar {
  background-color: #139ca5;
  color: #ccc;
  padding: 20px 0;
}

.navbar-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-img {
  width: 44px;
  height: auto;
}

.logo-text {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ccc;
  margin: 0;
  letter-spacing: -0.02em;
}

.navbar-right ul {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
}

.navbar-right ul li a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}

.navbar-right ul li a:hover {
  color: #ffd700;
}

/* Hero 영역 */
.hero {
  position: relative;
  background-image: url('/images/background-main.png');
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #f7f8fa;
  padding: 100px 20px;
  color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  z-index: 0;
  min-height: 40vh;
}


.hero-button-top {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  pointer-events: auto;
}

.btn-ai {
  background: linear-gradient(135deg, #003366, #005199);
  color: #fff;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
  display: inline-block;
  margin-top: 30px;
  text-decoration: none;
}

.btn-ai:hover {
  background: linear-gradient(135deg, #005199, #0077cc);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 768px) {
  .hero-button-top {
    top: 12px;
    right: 12px;
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(251, 255, 254, 0.4);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
  padding-left: 40px;
}

.hero h2 {
  font-size: 2.7em;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2em;
  margin-top: 10px;
  color: #e0e0e0;
}

/* 푸터 */
footer {
  background-color: #f0f2f5;
  color: #003366;
  text-align: center;
  padding: 4px 0;          /* ✅ 아주 얇은 위아래 패딩 */
  font-size: 0.8rem;
  line-height: 1.2;
  margin: 0;
}

footer p {
  margin: 2px 0;           /* ✅ 문단 사이 최소 여백 */
  padding: 0;
}

footer * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;  /* ✅ 여백 계산 정확히 */
}



/* 병원 소개 */
.about-wrapper {
  display: flex;
  justify-content: start;
  align-items: flex-start;
  gap: 20px;
  max-width: 1080px;
  margin: 20px auto;
}

.about-left,
.about-right {
  padding: 14px 16px;
  border-radius: 10px;
  background-color: #fff;
  border: 1px solid #dce3ea;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  display: block;
  width: auto;        /* ✅ 핵심 */
  max-width: 520px;   /* ✅ 너무 넓어지지 않게 제한 */
}

.about-left {
  background-color: #f6f9fc;
}

.about-left h3,
.about-right h3 {
  margin: 0 0 8px;          /* ✅ 여백 줄이기 */
  font-size: 1.2rem;        /* ✅ 약간 축소 */
  color: #003366;
}

.about-left p,
.about-right p {
  margin: 0;
  font-size: 1rem;          /* ✅ 본문도 소폭 축소 */
  line-height: 1.4;         /* ✅ 지나친 줄간격 줄이기 */
  color: #333;
}


.about-wrapper h3 {
  color: #003366;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.about-wrapper p {
  font-size: 1.05rem;
  line-height: 1.0;
  color: #333;
}


/* 병원 소개 하단 갤러리 */
.clinic-gallery {
  display: flex;
  flex-wrap: wrap;           /* ✅ 줄바꿈 허용 */
  justify-content: center;
  gap: 12px;
  margin: 40px 0 60px;
  overflow: visible;         /* ✅ 자식 이미지가 박스 밖으로 커질 수 있도록 */
  position: relative;        /* ✅ 이미지 확장 시 기준 */
}

/* 갤러리 이미지 */
.clinic-gallery img {
  width: 70px;              /* ✅ 적당한 크기 */
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;        /* 기본값 */
  z-index: 1;
}


/* 팝업 모달 기본 숨김 */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

/* 팝업 이미지 */
.modal-content {
  display: block;
  margin: auto;
  max-width: 80%;
  max-height: 80%;
  border-radius: 8px;
}

/* 닫기 버튼 */
.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.clinic-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 40px 0 60px;
  max-width: 100%;
}

.clinic-gallery img {
  flex: 1 1 calc(10% - 12px); /* 이미지 5개씩 한 줄 */
  max-width: 160px;           /* 최대 크기 제한 */
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* 좌우 넘김 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  text-align: center;
}

.modal-content {
  max-width: 90%;
  max-height: 80vh;
  margin: 60px auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.modal .close {
  position: absolute;
  top: 20px; right: 30px;
  color: white;
  font-size: 32px;
  cursor: pointer;
}

.modal-nav .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  color: white;
  cursor: pointer;
  padding: 10px;
  user-select: none;
  background-color: rgba(0,0,0,0.3);
  border-radius: 8px;
}

#prev { left: 20px; }
#next { right: 20px; }

@media (max-width: 600px) {
  .modal-content {
    max-width: 95%;
  }

  .modal-nav .nav-btn {
    font-size: 36px;
  }
}




/* 진료시간 */
.clinic-hours {
  margin: 60px 0;
}

.clinic-hours h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #003366;
}

.hours-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hours-card {
  flex: 1 1 calc(33.33% - 20px);
  background: #ffffff;
  border: 1px solid #ccd8e3;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hours-card strong {
  font-size: 1.1rem;
  color: #003366;
  display: block;
  margin-bottom: 8px;
}

.hours-card p {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 6px 0;
}

.hours-card span {
  font-size: 0.9rem;
  color: #666;
}

/* 진료 항목 */
.treatment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.section-wrapper {
  margin: 60px 0;
}

.treatment-box {
  position: relative;
  flex: 1 1 calc(16.6% - 12px);
  background: #ffffff;
  border: 1px solid #ccd8e3;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  font-size: 0.85rem;
  color: #333;
  text-align: center;
  min-height: auto;
  transition: all 0.2s ease;
}

.treatment-box:hover {
  background-color: #f5faff;
  border-color: #0077cc;
}

/* 오시는 길 */
.map-info-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px auto;
  max-width: 1080px;
  justify-content: space-between;
}

.map-box {
  flex: 1 1 30%;
  background-color: #ffffff;
  border: 1px solid #dce3ea;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.map-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #003366;
}

.map-box p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
}

.map-box a.btn-ai {
  font-size: 1rem;
}

@media screen and (max-width: 1024px) {
  .treatment-box {
    flex: 1 1 calc(33.3% - 12px);
  }
}


@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body, html {
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .about-wrapper {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 20px 0;
    box-sizing: border-box;
    gap: 16px;
  }

  .about-left,
  .about-right {
    width: 100%;
    padding: 16px;
    min-height: auto;
    box-sizing: border-box;
  }

  .about-wrapper h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .about-wrapper p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}



@media screen and (max-width: 600px) {
  .treatment-box {
    flex: 1 1 calc(50% - 12px);
  }
}

/* 진료과목 말풍선 */
.popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #003366;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  z-index: 9999;
  width: 260px;
  text-align: center;
  border: 1px solid #ccddee;
  white-space: pre-wrap;
  line-height: 1.5;
}



/* === AI 상담창 전용 스타일 === */
/* 기본 설정 */
body {
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

/* 공지사항 위젯 notice-widget.js 용 */
/* ============================
   🔔 공지사항 스타일
============================ */

/* 전체 감싸는 박스 */
.notice-wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px 30px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #dce3ea;
}

/* 제목 */
.page-header {
  font-size: 1.8rem;
  color: #003366;
  margin-bottom: 24px;
  text-align: center;
}

/* 관리자 로그인 영역 */
#adminLogin {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

#adminLogin input {
  padding: 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 220px;
}

#adminLogin button {
  padding: 10px 16px;
  background-color: #139ca5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

#adminLogin button:hover {
  background-color: #117a85;
}

/* 공지사항 등록 폼 */
.notice-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.notice-form input,
.notice-form textarea {
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.notice-form textarea {
  min-height: 120px;
  resize: vertical;
}

.notice-form button {
  align-self: flex-end;
  background-color: #003366;
  color: white;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.notice-form button:hover {
  background-color: #005199;
}

/* 공지사항 테이블 */
.notice-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
}

.notice-table thead {
  background-color: #f0f2f5;
}

.notice-table th,
.notice-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e1e8f0;
  text-align: left;
}

.notice-table th {
  color: #003366;
  font-weight: 600;
}

.notice-table td button {
  background-color: #ff5c5c;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.notice-table td button:hover {
  background-color: #e84242;
}

/* 숨김 클래스 */
.hidden {
  display: none;
}

/* 반응형 대응 */
@media screen and (max-width: 768px) {
  .notice-wrapper {
    padding: 20px 16px;
  }

  #adminLogin {
    flex-direction: column;
    align-items: center;
  }

  #adminLogin input {
    width: 100%;
  }

  .notice-form button {
    width: 100%;
  }
}


/* 헤더 */
.navbar {
  background-color: #139ca5;
  color: #ccc;
  padding: 20px 0;
}

.navbar-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-img {
  width: 44px;
  height: auto;
}

.logo-text {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ccc;
  margin: 0;
  letter-spacing: -0.02em;
}

.navbar-right ul {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
}

.navbar-right ul li a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}

.navbar-right ul li a:hover {
  color: #ffd700;
}

/* Hero 영역 */
.hero {
  position: relative;
  background-image: url('/images/background-main.png');
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #f9f9f9;
  padding: 100px 20px;
  color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  z-index: 0;
  min-height: 40vh;
}

.hero-button-top {
  position: relative;
  top: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  pointer-events: auto;
}

.btn-ai {
  background: linear-gradient(135deg, #003366, #005199);
  color: #fff;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
  display: inline-block;
  margin-top: 30px;
  text-decoration: none;
}

.btn-ai:hover {
  background: linear-gradient(135deg, #005199, #0077cc);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 768px) {
  .hero-button-top {
    top: 12px;
    right: 12px;
  }
}

/* 모바일용 위치 조정 */
@media screen and (max-width: 768px) {
  .hero {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .btn-ai {
    margin-top: -30px;
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(155, 153, 165, 0.4);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
  padding-left: 40px;
}

.hero h2 {
  font-size: 2.7em;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2em;
  margin-top: 10px;
  color: #e0e0e0;
}

/* 푸터 */
footer {
  background-color: #f0f2f5;
  color: #003366;
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer p {
  margin: 3px 0;
}

.footer a {
  color: #3f617f;
  text-decoration: none;
}

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

/* 병원 소개 */
.about-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 30px;
  margin: 40px auto;
  padding: 10px;
  max-width: 1080px;
}

.about-left,
.about-right {
  flex: 1;
  min-height: 280px;
  padding: 30px;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid #dce3ea;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-left {
  background-color: #f6f9fc;
}

.about-wrapper h3 {
  color: #003366;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.about-wrapper p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
}

/* 진료시간 */
.clinic-hours {
  margin: 60px 0;
}

.clinic-hours h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #003366;
}

.hours-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hours-card {
  flex: 1 1 calc(33.33% - 20px);
  background: #ffffff;
  border: 1px solid #ccd8e3;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hours-card strong {
  font-size: 1.1rem;
  color: #003366;
  display: block;
  margin-bottom: 8px;
}

.hours-card p {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 6px 0;
}

.hours-card span {
  font-size: 0.9rem;
  color: #666;
}

/* 진료 항목 */
.treatment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.section-wrapper {
  margin: 60px 0;
}

.treatment-box {
  position: relative;
  flex: 1 1 calc(16.6% - 12px);
  background: #ffffff;
  border: 1px solid #ccd8e3;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  font-size: 0.85rem;
  color: #333;
  text-align: center;
  min-height: auto;
  transition: all 0.2s ease;
}

.treatment-box:hover {
  background-color: #f5faff;
  border-color: #0077cc;
}

/* 오시는 길 */
.map-info-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px auto;
  max-width: 1080px;
  justify-content: space-between;
}

.map-box {
  flex: 1 1 30%;
  background-color: #ffffff;
  border: 1px solid #dce3ea;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.map-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #003366;
}

.map-box p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
}


.map-box .btn-ai {
  align-self: flex-start;  /* 왼쪽 정렬 (또는 center도 가능) */
  margin-top: 10px;        /* 버튼과 텍스트 사이 여백 */
}

@media screen and (max-width: 1024px) {
  .treatment-box {
    flex: 1 1 calc(33.3% - 12px);
  }
}

@media screen and (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .navbar-right ul {
    flex-wrap: wrap;
    gap: 10px;
  }

  .about-wrapper {
    flex-direction: column;
  }

  .about-left,
  .about-right {
    width: 100%;
    min-height: auto;
  }

  .map-info-wrapper {
    flex-direction: column;
  }

  .map-box {
    flex: 1 1 100%;
  }

  .hero {
    flex-direction: column;
    background-size: 80vw auto;
    background-position: bottom center;
    text-align: center;
    padding: 60px 20px;
  }

  .hero-content {
    padding-left: 0;
  }
}

@media screen and (max-width: 600px) {
  .treatment-box {
    flex: 1 1 calc(50% - 12px);
  }
}

/* 진료과목 말풍선 */
.popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #003366;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  z-index: 9999;
  width: 260px;
  text-align: center;
  border: 1px solid #ccddee;
  white-space: pre-wrap;
  line-height: 1.5;
}



/* GPT 상담 영역 */
.chatbot {
  background-color: #f5f7fa;
  padding: 30px;
  margin-top: 40px;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 숨김 처리용 */
.hidden {
  display: none !important;
}

/* 대화 라인 정렬 */
.chat-line {
  display: flex;
  margin-bottom: 12px;
}

.chat-line.user {
  justify-content: flex-end;
}

.chat-line.gpt {
  justify-content: flex-start;
}

/* 말풍선 공통 */
.message {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 70%;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 사용자 메시지 */
.user-message {
  background-color: #dcf8c6;
  color: #000;
  border-bottom-right-radius: 4px;
}

/* GPT 메시지 */
.gpt-message {
  background-color: #eeeeee;
  color: #000;
  border-bottom-left-radius: 4px;
}

/* 채팅창 출력 영역 */
#chatMessages {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

/* 입력창 영역 */
.chat-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background-color: #f9f9f9;
}

.chat-input-area input {
  flex: 1;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
}

.chat-input-area button {
  margin-left: 10px;
  padding: 0 20px;
  font-size: 1rem;
  background-color: #139ca5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.chat-input-area button:hover {
  background-color: #0f7e89;
}



/* 전체 doctor-profile 섹션 압축 */
.doctor-profile {
  padding: 20px 10px;
  max-width: 1000px;
  margin: 0 auto;
  font-size: 14.5px; /* 전체 폰트 소폭 축소 */
}

/* 제목 */
.doctor-profile h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

/* 부제목 */
.doctor-profile .subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

/* 각 박스 */
.profile-box {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background-color: #fff;
}

/* 박스 제목 */
.profile-box h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

/* 리스트 글자 */
.profile-box ul li {
  font-size: 14px;
  line-height: 1.4;
}

/* 학회 리스트 2열 */
.column-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}


@media screen and (min-width: 769px) and (max-width: 1024px) {
  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .navbar-right ul {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .navbar-right ul li a {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
  }

  .hero-button-top {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
  }

  .btn-ai {
    width: 80%;
    max-width: 300px;
    font-size: 1rem;
    padding: 12px 16px;
  }
}

/* ✅ Safari 대응용 중간 해상도 깨짐 수정 */


@media screen and (min-width: 769px) and (max-width: 1024px) {
  .navbar-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .navbar-right ul {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: nowrap;
  }

  .navbar-right ul li {
    white-space: nowrap;
  }

  .navbar-right ul li a {
    font-size: 0.95rem;
    padding: 4px 6px;
    display: inline-block;

    /* ✅ 밑줄 제거 */
    border-bottom: none !important;
    text-decoration: none !important;
  }

  .logo-text {
  font-size: clamp(1.1rem, 2.8vw, 1.9rem);  /* 화면에 따라 유연하게 변화 */
  font-weight: 700;
  color: #ccc;
  margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


  .hero-button-top {
    top: 24px;
    right: 24px;
    position: absolute;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-top: 0;
  }

  .btn-ai {
    font-size: 1.05rem;
    padding: 12px 20px;
    width: auto;
    max-width: none;
  }
}

