/* =====================================================
   RESPONSIVE STYLES - Common Components
   공통 컴포넌트 반응형 스타일 (navigation, footer, floating-banner 등)
   Bootstrap-based breakpoints:
   - 576px (sm): Small mobile
   - 768px (md): Tablet portrait
   - 992px (lg): Tablet landscape, mobile menu transition
   - 1200px (xl): Laptop/Desktop
   ===================================================== */

/* --------------------- Mobile Menu Button --------------------- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-btn .hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #393838;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* White hamburger on non-scrolled header (for non-main pages) */
.nav-container:not(.scroll) .mobile-menu-btn .hamburger-line {
  background-color: #fff;
}

/* Dark hamburger on main page */
.main-page .nav-container:not(.scroll) .mobile-menu-btn .hamburger-line {
  background-color: #393838;
}

/* Dark hamburger when scrolled */
.nav-container.scroll .mobile-menu-btn .hamburger-line {
  background-color: #393838;
}

/* --------------------- Mobile Menu Overlay --------------------- */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s;
}

.mobile-menu-overlay.active {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-overlay .mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.mobile-menu-overlay .mobile-logo img {
  max-width: 80px;
  height: auto;
}

.mobile-menu-overlay .mobile-menu-close {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.mobile-menu-overlay .mobile-menu-close span {
  display: block;
  width: 24px;
  height: 2px;
  background: #393838;
  position: absolute;
  top: 50%;
  left: 50%;
  transition: all 0.3s ease;
}

.mobile-menu-overlay .mobile-menu-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-overlay .mobile-menu-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu-overlay .mobile-nav {
  background: #fff;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay .mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-overlay .mobile-menu-item {
  border-bottom: 1px solid #eee;
}

.mobile-menu-overlay .mobile-menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.mobile-menu-overlay .mobile-menu-link::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: #999;
  transition: transform 0.3s;
}

.mobile-menu-overlay .mobile-menu-item.active .mobile-menu-link::after {
  content: '-';
}

.mobile-menu-overlay .mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f9f9f9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu-overlay .mobile-menu-item.active .mobile-submenu {
  max-height: 500px;
}

.mobile-menu-overlay .mobile-submenu li a {
  display: block;
  padding: 14px 20px 14px 35px;
  font-size: 15px;
  color: #555;
  text-decoration: none;
  border-top: 1px solid #eee;
}

.mobile-menu-overlay .mobile-submenu li a:hover {
  background: #f0f0f0;
  color: #00bc9e;
}

.mobile-menu-overlay .mobile-menu-contact {
  background: #fff;
  padding: 20px;
  border-top: 1px solid #eee;
}

.mobile-menu-overlay .mobile-phone-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: #00bc9e;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  min-height: 44px;
}

.mobile-menu-overlay .mobile-phone-btn span {
  font-size: 12px;
  opacity: 0.9;
}

.mobile-menu-overlay .mobile-phone-btn strong {
  font-size: 20px;
  font-weight: 700;
  margin-top: 3px;
}

/* --------------------- Responsive: 992px (lg) --------------------- */
@media all and (max-width: 992px) {
  /* Navigation - Show mobile menu button, hide desktop menu */
  .mobile-menu-btn {
    display: flex;
    margin-left: auto;
  }

  .nav_bar .nav {
    display: none;
  }

  .menu__veil {
    display: none !important;
  }

  .nav_bar {
    justify-content: space-between;
  }

  /* Footer - Single column */
  footer .container .wrapper {
    flex-direction: column;
    gap: 0px;
  }

  footer .container .wrapper .info-section {
    flex: none;
    width: 100%;
    padding-right: 0;
    text-align: center;
  }

  footer .info-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  footer .info-item {
    flex-direction: column;
    text-align: center;
    padding: 15px 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  footer .container .wrapper .map-section-right {
    width: 100%;
  }

  footer .container .wrapper .map .root_daum_roughmap {
    width: 100% !important;
    height: 250px !important;
  }

  footer .info-title {
    font-size: 40px;
  }
}

/* --------------------- Responsive: 768px (md) --------------------- */
@media all and (max-width: 768px) {
  /* Floating Banner - 크기 축소 */
  .floating-banner {
    right: 8px;
    border-radius: 30px;
  }
  .floating-banner .container .wrapper {
    padding: 6px;
  }
  .floating-banner .container .wrapper .item {
    padding: 10px 0;
  }
  .floating-banner .container .wrapper .item a img {
    width: 40px;
    height: 40px;
  }

  /* Reservation Banner - 세로 레이아웃으로 변경 */
  .reservation-banner .container .wrapper .toggle_btn {
    width: 200px;
    font-size: 1.1rem;
    padding: 0.5rem;
  }
  .reservation-banner .container .wrapper .form {
    flex-direction: column;
    gap: 12px;
    padding: 20px 15px;
  }
  .reservation-banner .container .wrapper .form span {
    font-size: 24px;
  }
  .reservation-banner .container .wrapper .form input {
    width: 100%;
    font-size: 16px;
    padding: 12px;
  }
  .reservation-banner .container .wrapper .form div label {
    font-size: 14px;
  }
  .reservation-banner .container .wrapper .form .reserve-btn {
    width: 100%;
    font-size: 16px;
    padding: 12px;
  }

  /* Footer */
  footer {
    padding: 60px 0;
  }

  footer .container {
    padding: 0 20px;
  }

  footer .info-title {
    font-size: 32px;
    margin-bottom: 35px;
  }

  footer .info-items {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  footer .info-item {
    padding: 12px 5px;
    margin-bottom: 0;
  }

  footer .info-item .info-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
  }

  footer .info-label {
    font-size: 12px;
    min-width: auto;
    margin-bottom: 4px;
  }

  footer .info-value {
    font-size: 12px;
  }

  footer .info-link {
    font-size: 10px;
  }

  footer .location-section {
    gap: 30px;
  }

  footer .location-title {
    font-size: 22px;
  }

  footer .location-address {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  /* Map Responsive - 768px */
  footer .container .wrapper .map {
    width: 100%;
    overflow: hidden;
  }

  footer .container .wrapper .map .root_daum_roughmap {
    width: 100% !important;
    height: 220px !important;
  }

  footer .container .wrapper .map .root_daum_roughmap .wrap_map {
    width: 100% !important;
  }
}

/* --------------------- Responsive: 576px (sm) --------------------- */
@media all and (max-width: 576px) {
  /* Navigation */
  .nav_bar {
    height: 70px;
  }

  .logo img {
    max-width: 80px;
  }

  /* Footer */
  footer {
    padding: 40px 0;
  }

  footer .info-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  footer .info-items {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  footer .info-item {
    padding: 10px 4px;
  }

  footer .info-item .info-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
  }

  footer .info-label {
    font-size: 10px;
  }

  footer .info-value {
    font-size: 10px;
  }

  footer .info-link {
    font-size: 9px;
  }

  footer .location-title {
    font-size: 18px;
  }

  footer .address-label,
  footer .address-text {
    font-size: 14px;
  }

  /* Map Responsive - 576px */
  footer .container .wrapper .map {
    width: 100%;
  }

  footer .container .wrapper .map .root_daum_roughmap {
    width: 100% !important;
    height: 180px !important;
  }
}

/* --------------------- Responsive: 480px --------------------- */
@media screen and (max-width: 480px) {
  /* Floating Banner - 더 작게 */
  .floating-banner .container .wrapper .item a img {
    width: 32px;
    height: 32px;
  }
  .floating-banner .container .wrapper .item {
    padding: 8px 0;
  }

  /* Reservation Banner - 더 컴팩트하게 */
  .reservation-banner .container .wrapper .toggle_btn {
    width: 160px;
    font-size: 1rem;
  }
  .reservation-banner .container .wrapper .form span {
    font-size: 20px;
  }
}

/* --------------------- Prevent Horizontal Scroll --------------------- */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* --------------------- Touch Target Minimum Size --------------------- */
@media (pointer: coarse) {
  a, button, input[type="submit"], input[type="button"], .btn-primary, .btn-secondary {
    min-height: 44px;
    min-width: 44px;
  }
}

/* =====================================================
   PAGE CONTENT RESPONSIVE STYLES
   페이지 콘텐츠 반응형 스타일 (Cards, Diamond, Review, Map Section 등)
   ===================================================== */

/* --------------------- Responsive: 1200px (xl) --------------------- */
@media all and (max-width: 1200px) {
  /* Cards Section */
  section .container .wrapper .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  section .container .wrapper .cards .card {
    width: 100%;
  }

  section .container .wrapper .cards .card .card-img {
    width: 100%;
    height: 280px;
  }

  section .container .wrapper .cards .card .card-txt {
    width: 100%;
    height: auto;
    min-height: 180px;
  }

  /* Diamond Section */
  section.diamond {
    padding: 0 60px;
  }

  section.diamond .diamond-left {
    width: 100%;
    max-width: 700px;
  }

  section.diamond .diamond-item {
    max-width: 100%;
  }

  section.diamond .diamond-item .title {
    min-width: 300px;
    font-size: 28px;
  }

  section.diamond .diamond-item .txt {
    font-size: 22px;
    line-height: 28px;
  }

  section.diamond .diamond-right {
    right: -100px;
  }

  section.diamond .diamond-right img {
    width: 500px;
  }

  /* Map Section */
  section.map-section .map-main-title {
    font-size: 48px;
  }

  section .container .wrapper p.map-txt {
    font-size: 24px;
    line-height: 38px;
  }
}

/* --------------------- Responsive: 992px (lg) - Page Content --------------------- */
@media all and (max-width: 992px) {
  /* Diamond Section - Stack layout */
  section.diamond {
    padding: 60px 20px;
  }

  section.diamond .diamond-content {
    flex-direction: column;
  }

  section.diamond .diamond-left {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  section.diamond .diamond-item {
    flex-direction: column;
    height: auto;
    padding: 25px;
    text-align: center;
    gap: 15px;
  }

  section.diamond .diamond-item .title {
    min-width: auto;
    width: 100%;
    font-size: 24px;
    padding: 12px 20px;
    height: auto;
  }

  section.diamond .diamond-item .txt {
    font-size: 18px;
    line-height: 26px;
  }

  section.diamond .diamond-right {
    position: relative;
    right: auto;
    top: auto;
    margin-top: 40px;
    text-align: center;
  }

  section.diamond .diamond-right img {
    width: 80%;
    max-width: 400px;
    opacity: 0.5;
    margin: 0 auto;
  }

  /* Review Section */
  .before-after-section {
    margin: 40px 0;
  }

  .ba-images {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .ba-image {
    max-width: 300px;
  }

  .review-cards {
    gap: 40px;
    padding: 60px 15px;
  }

  .review-card {
    padding: 25px 30px;
  }

  .review-card.active {
    transform: scale(1.05) !important;
  }

  /* Map Section - Stack layout */
  section.map-section .map-content-wrapper {
    flex-direction: column;
    gap: 40px;
  }

  section.map-section .map-main-title {
    font-size: 38px;
    text-align: center;
  }

  section.map-section .map-left-content {
    text-align: center;
  }

  section .container .wrapper .tags ul.tags-list {
    justify-content: center;
  }

  section .container .wrapper p.map-txt {
    font-size: 20px;
    line-height: 32px;
  }

  section .container .wrapper p.map-txt br {
    display: none;
  }

  section.map-section .map-right-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  section.map-section .map-right-content img {
    width: 100%;
  }

  /* Section Title Adjustments */
  section .container .wrapper h2 .why-title,
  section .container .wrapper h2 .review-title {
    font-size: 38px;
    line-height: 1.3;
  }

  section .container .wrapper h2 .why-sub,
  section .container .wrapper h2 .review-sub {
    font-size: 24px;
    line-height: 1.5;
    padding-bottom: 50px;
  }
}

/* --------------------- Responsive: 768px (md) - Page Content --------------------- */
@media all and (max-width: 768px) {
  /* Cards Section - Single column */
  section .container .wrapper .cards {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  section .container .wrapper .cards .card {
    max-width: 400px;
    margin: 0 auto;
  }

  section .container .wrapper .cards .card .card-img {
    height: 250px;
  }

  section .container .wrapper .cards .card .card-txt {
    padding: 20px;
  }

  section .container .wrapper .cards .card .card-txt h3 {
    font-size: 28px;
    line-height: 1.3;
  }

  section .container .wrapper .cards .card .card-txt p {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Diamond Section */
  section.diamond .diamond-item .title {
    font-size: 20px;
    padding: 10px 16px;
  }

  section.diamond .diamond-item .txt {
    font-size: 16px;
    line-height: 24px;
  }

  /* Review Cards - Vertical layout */
  .review-cards {
    gap: 30px;
    padding: 40px 15px;
  }

  .review-card {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  .review-avatar {
    margin: 0 auto 15px;
  }

  .review-name {
    font-size: 18px;
  }

  .review-text {
    font-size: 16px;
    line-height: 1.6;
    text-align: start;
    display: inline-block;
  }

  /* Map Section */
  section.map-section .container {
    padding: 0 20px;
  }

  section.map-section .map-main-title {
    font-size: 32px;
    margin-bottom: 30px;
  }

  section .container .wrapper .tags ul.tags-list .tag {
    font-size: 16px;
  }

  section .container .wrapper .tags ul.tags-list .tag span {
    padding: 10px 20px;
  }

  section .container .wrapper p.map-txt {
    font-size: 17px;
    line-height: 28px;
  }

  /* Section Containers */
  section .container {
    padding: 60px 15px;
  }

  section .container .wrapper h2 .why-title,
  section .container .wrapper h2 .review-title {
    font-size: 32px;
  }

  section .container .wrapper h2 .why-sub,
  section .container .wrapper h2 .review-sub {
    font-size: 20px;
    padding-bottom: 40px;
  }

  /* ===== DOCTORS PAGE MOBILE ===== */

  /* 헤더 배너 */
  #doctors_header .container .wrapper .main-banner .txt h1 {
    font-size: 28px;
    line-height: 1.4;
  }

  /* 의사 프로필 섹션 */
  #doctors_2 .container .wrapper .content .doctor {
    flex-direction: column;
  }

  #doctors_2 .container .wrapper .content .info {
    width: 100%;
    padding: 40px 20px 30px;
    order: 2;
  }

  #doctors_2 .container .wrapper .content .img {
    width: 100%;
    order: 1;
  }

  #doctors_2 .container .wrapper .content .info .title {
    font-size: 18px;
  }

  #doctors_2 .container .wrapper .content .info .title span {
    font-size: 48px;
  }

  #doctors_2 .container .wrapper .content .info .name {
    padding-top: 20px;
  }

  #doctors_2 .container .wrapper .content .info .doctor_name {
    font-size: 28px;
  }

  #doctors_2 .container .wrapper .content .info .doctor_info {
    font-size: 16px;
    margin-bottom: 20px;
  }

  #doctors_2 .container .wrapper .content .info .exp {
    font-size: 14px;
  }

  #doctors_2 .container .wrapper .content .info .exp .col-6 {
    width: 100%;
  }
}

/* --------------------- Responsive: 576px (sm) - Page Content --------------------- */
@media all and (max-width: 576px) {
  /* Cards Section */
  section .container .wrapper .cards .card {
    max-width: 100%;
  }

  section .container .wrapper .cards .card .card-img {
    height: 220px;
  }

  section .container .wrapper .cards .card .card-txt h5 {
    font-size: 12px;
  }

  section .container .wrapper .cards .card .card-txt h5 span {
    font-size: 16px;
  }

  section .container .wrapper .cards .card .card-txt h3 {
    font-size: 24px;
  }

  section .container .wrapper .cards .card .card-txt p {
    font-size: 14px;
  }

  /* Diamond Section */
  section.diamond {
    padding: 40px 15px;
  }

  section.diamond .diamond-item {
    padding: 20px 15px;
    border-radius: 20px;
  }

  section.diamond .diamond-item .title {
    font-size: 18px;
    border-radius: 25px;
  }

  section.diamond .diamond-item .txt {
    font-size: 14px;
    line-height: 22px;
  }

  section.diamond .diamond-item .txt br {
    display: none;
  }

  /* Review Section */
  .ba-image {
    max-width: 100%;
    padding: 0 15px;
  }

  .ba-label {
    padding: 8px 20px;
    font-size: 14px;
  }

  .ba-note {
    font-size: 12px;
  }

  .review-cards {
    padding: 30px 10px;
    gap: 25px;
  }

  .review-card {
    padding: 20px 15px;
    border-radius: 15px;
  }

  .review-avatar {
    width: 60px;
    height: 60px;
  }

  .review-name {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .review-text {
    font-size: 15px;
    text-align: start;
    display: inline-block;
  }

  /* Map Section */
  section.map-section .map-main-title {
    font-size: 26px;
    margin-bottom: 25px;
  }

  section .container .wrapper .tags ul.tags-list {
    gap: 10px;
  }

  section .container .wrapper .tags ul.tags-list .tag {
    font-size: 14px;
  }

  section .container .wrapper .tags ul.tags-list .tag span {
    padding: 8px 16px;
  }

  section .container .wrapper p.map-txt {
    font-size: 15px;
    line-height: 26px;
  }

  /* Section Containers */
  section .container {
    padding: 50px 15px;
  }

  section .container .wrapper h2 .why-title,
  section .container .wrapper h2 .review-title {
    font-size: 26px;
    line-height: 1.4;
  }

  section .container .wrapper h2 .why-sub,
  section .container .wrapper h2 .review-sub {
    font-size: 17px;
    line-height: 1.6;
    padding-bottom: 30px;
  }

  section .container .wrapper h2 .why-sub br,
  section .container .wrapper h2 .review-sub br {
    display: none;
  }
}

/* --------------------- Dragstage Before/After Responsive --------------------- */
@media all and (max-width: 1500px) {
  #dragstage_area {
    max-width: 50vw;
  }
}

@media all and (max-width: 1024px) {
  #dragstage_area {
    max-width: 550px;
  }
}

@media all and (max-width: 991.9px) {
  #dragstage_area {
    width: auto;
    height: auto;
    max-width: 500px;
    margin: 0 auto 30px;
  }
}
