@media screen and (max-width: 992px) {
  .ba_desc {
    white-space: pre-line;
  }
  strong {
    font-weight: 700;
  }
}


/* ############################################################
   메인 슬라이드 섹션
############################################################
*/

.main #sect01 {
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 72px);
}

.main #sect01 .swiper-slide {
  background-size: cover !important;
  background-position: center;
}

.main #sect01 .spinner {
  bottom: 2.6042vw;
  left: 50%;
  transform: translateX(-50%);
  background-image: url("/images/spinLogo.svg");
  background-repeat: no-repeat;
  background-position: center;
}

.main #sect01 .swiper-custom-nav {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 60%;
  max-width: 400px;
  background: rgba(0, 0, 0, 0.22);
  padding: 10px 40px;
  border-radius: 999px;
}
.main #sect01 .swiper-custom-current,
.main #sect01 .swiper-custom-total {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  line-height: 1;
}
.main #sect01 .swiper-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
}
.main #sect01 .swiper-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}
.main #sect01 .swiper-custom-prev,
.main #sect01 .swiper-custom-next {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: opacity 0.2s;
}
.main #sect01 .swiper-custom-prev:hover,
.main #sect01 .swiper-custom-next:hover {
  opacity: 0.6;
}

.swiper-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 100px;
}

.pagi-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.6);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color 0.3s;
}

.pagi-item.is-active {
    color: #2c2c2c;
    font-size: 1.4rem;
}

.pagi-circle {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

@media screen and (max-width: 992px) {
  .main {
    padding-top: var(--header-height);
  }
    .main #sect01 {
    aspect-ratio: 9 / 16;
  }
  #swiper-main .swiper-pagination {
    position: absolute;
    bottom: 0vh;
    left: 50vw;
    transform: translateX(-50%);
    width: auto;
    text-align: left;
    margin-bottom: 40px;
  }
  .pagi-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
box-shadow:
    0px 8px 24px 0px rgba(0, 0, 0, 0.18);
}
  .main #sect01 .swiper-custom-nav {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 80%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.22);
    padding: 10px 40px;
    border-radius: 999px;
  }
  .pagi-item {
    font-size: 1rem;
  }
  .pagi-item.is-active {
    color: #fff;
    font-size: 1.2rem;
}
  .main #sect01 .swiper-custom-current,
  .main #sect01 .swiper-custom-total {
    font-size: 14px;
  }
}


.imgFlow {
  overflow: hidden;
}
.imgFlow .img-slider {
  overflow: hidden;
}
.imgFlow .img-slider-track {
  animation: scroll 20s linear infinite;
}
.imgFlow .img-slider-track img {
  height: 120px;
  flex-shrink: 0;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.main #subject {
  background-color: var(--sub-color2);
}

@media screen and (max-width: 992px) {

  .imgFlow {
    display: none;
  }

  .imgFlow .img-slider-track {
    animation: scroll 5s linear infinite;
  }
  .imgFlow .img-slider-track img {
  height: 90px;
  flex-shrink: 0;
}
}



/* ############################################################
   의사
############################################################
*/

.career-wrap {
    overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.career-wrap.open {
    max-height: 2000px; /* 충분히 큰 값 */
}
 
/* ── 버튼 회전 ── */
.career-toggle img {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.career-toggle.open img {
    transform: rotate(45deg);
}

/* ############################################################
   책 표지
############################################################
*/

#books {
  height: 847px;
  padding-top: 110px;
  background: url('/images/book_bg_pc.png') repeat-x top center / auto;
}

.book-list {
  margin-top: 80px;
  max-width:1620px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
}

/* PC: FHD(1920) 기준 80px → 화면 줄어들수록 margin 증가 (책 이미지 축소 보정) */
@media screen and (min-width: 993px) {
  .book-list {
    margin-top: clamp(
      80px,
      calc(80px + (1920px - 100vw) * 0.055),
      155px
    );
  }
}

@media screen and (max-width: 993px) {
  #books {
    width:100%;
    height:auto;
    aspect-ratio: 390 / 1178;
    background: url('/images/book_bg_mo.png') no-repeat top center / cover;
    padding-top:20vw;
  }
  .book_wrap{
    width: clamp(100px,33vw,216px);
  }
  .book_wrap::after{
    content:none;
  }
  .book-list {
    gap: 5.13cqw;
  }
}

.book_wrap {
  display: inline-block;
  z-index:2;
}

.book_wrap::after{
  content:"";
  position: absolute;
  width: 338px;
  width: 16vw;
  height:154px;
  height:8vw;
  z-index:-1;
  top:50%;
  left:50%;
  transform: translateX(-50%) translateY(25px);
  background: url('/images/book_shadow.svg') no-repeat center center / auto;
  filter: blur(5px);
}

.book-head-txt {
  position:relative;
  z-index:1;
  display:inline-flex;
  text-align:center;
  padding:40px 0;
}
.book-head-txt::before {
  content:"";
  position:absolute;
  z-index:1;
  top:0;
  left:0;
  width:100%;
  height:18px;
  background: url('/images/book_top_pyosik.svg') no-repeat center center / auto;
}

.book-head-txt::after {
  content:"";
  position:absolute;
  z-index:1;
  bottom:0;
  left:0;
  width:100%;
  height:16px;
  background: url('/images/book_bot_pyosik.svg') no-repeat center center / auto;
}


.book-title-txt {
  position:relative;
}
.book-title-txt::after {
  content:"";
  position:absolute;
  width:100%;
  height:12px;
  background: url('/images/book_name_pyosik.svg') no-repeat left center / auto;
}

.book-reflection-wrap {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: clamp(56px, 12vw, 108px);
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    transparent 100%
  );
}

.book-reflection {
  display: block;
  width: 100%;
  transform: scaleY(-1);
  filter: blur(3px);
  opacity: 0.4;
  pointer-events: none;
}

.book-img {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
}


/* ############################################################
   블로그
############################################################
*/

.masonry-grid {
  columns: 4;
}
.masonry-item {
    break-inside: avoid;
}
.masonry-item img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.masonry-item a:hover img {
    transform: scale(1.02);
    opacity: 0.85;
}
.masonry-item.is-hidden {
    display: none;
}
#masonryBtn {
    transition: background 0.2s;
    letter-spacing: 0.05em;
}
#masonryBtn:hover {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 992px) { .masonry-grid { columns: 2; } }
@media (max-width: 576px) { .masonry-grid { columns: 1; } }


/* ############################################################
   약속
############################################################
*/

#promise .boxWrap .box:nth-child(odd) {
   transform: translateY(calc(0px + var(--sp-52)));
}
#promise .boxWrap .box:nth-child(even) {
    transform: translateY(calc(0px - var(--sp-52)));
}

#promise .box {
  background-color: var(--light);;
  width: 35%;
  max-width: calc(35% - var(--sp-40));
  max-height: 610px;
  aspect-ratio: 601 / 611;
  transition: all 0.5s;
}
#promise .box span {
  color: var(--sub-color);
}
#promise .box h3 {
  color: var(--dark);
}
#promise .box p {
  color: var(--gray-700);
}

#promise .box:hover {
  background-color: var(--main-color);
}
#promise .box:hover span {
  color: var(--point);
}
#promise .box:hover h3 {
   color: var(--white);

}
#promise .box:hover  p {
  color: var(--gray-100);
  z-index: 2;
}
#promise .box:hover img {
  filter: brightness(1000);
  z-index: 1;
  transform: scale(0.5);
  transition: all 1s;

}

#promise .box.nofilter:hover {
 background-color: var(--light);;
}

#promise .box.nofilter:hover img {
  filter: none!important;
    transform: none!important;
  transition: all 1s;
} 


/* #promise .box:last-child:hover {
 background-color: var(--light);;
}

#promise .box:last-child:hover img {
  filter: none!important
} */

@media screen and (max-width: 992px) {
  #promise .boxWrap .box:nth-child(odd) {
   transform: translateY(0);
}
#promise .boxWrap .box:nth-child(even) {
    transform: translateY(0);
}

#promise .box {
  width: 100%!important;
   max-width: 100%!important;
}
.w-25-sm {
  width: 25%!important;
}
}

/* ############################################################
  리뷰
############################################################
*/


@keyframes rv-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes rv-rtl { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.rv-track--ltr { animation: rv-ltr 20s linear infinite; }
.rv-track--rtl { animation: rv-rtl 20s linear infinite; }

@media (max-width: 992px) {
    .rv-track--ltr { animation: rv-ltr 20s linear infinite -10s; }
    .rv-track--rtl { animation: rv-rtl 20s linear infinite -10s; }
}
/* ############################################################
  임상 증례
############################################################
*/

main .content article {
  width: 100%;
  max-width: calc(50% - 30px);
}

  .ba-lbl {
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 2px;
            z-index: 15;
            color: var(--point);
            border: 1.5px solid var(--point);
            padding: 2px 8px;
        }

        .ba-card.dm-logged .ba-overlay {
            display: none !important;
        }

        .ba-slider {
            max-height: 460px;
        }

        <?php if ($ba_is_logged_in): ?>.ba-overlay {
            display: none !important;
        }

        <?php endif; ?>#baJoinModal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .6);
            z-index: 99999;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        #baJoinModal.active {
            display: flex;
        }

        @keyframes baModalIn {
            from {
                transform: translateY(-16px);
                opacity: 0;
            }

            to {
                transform: none;
                opacity: 1;
            }
        }

        .ba-modal-box {
            animation: baModalIn .25s ease;
        }

@media screen and (max-width: 992px) {
  #imsang .box {
      max-width: calc(50% - 14px);
  }
main .content article {
  width: 100%;
  max-width: calc(50% - 15px);
}

}



/* ############################################################
 지도
############################################################
*/

#daumRoughmapContainer1780535837766 {
  width: 100%!important;
  height: 100%!important;
}
.wrap_map {
  height: 100%!important;
}
@media screen and (max-width: 992px) {
  .wrap_map {
    height: 360px !important;
  }
}
.cont {
  display: none;
}
.wrap_controllers {
  display: none;
}
/* ############################################################
 임상케이스 오버레이 모달a
############################################################
*/

.ba-overlay {
  padding: var(--sp-24)!important;
  cursor: pointer!important;
  border-radius: var(--sp-20)!important;
}
.position-relative.flex-1.w-100.overflow-hidden {
  cursor: pointer!important;
  border-radius: var(--sp-20)!important;
}

    #baJoinModal {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 99999;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    #baJoinModal.active {
        display: flex;
    }
    /* 로그인 후 오버레이/블러 제거 */
    .dm-logged .ba-overlay { display: none !important; }
    .dm-logged .ba-after   { filter: none !important; transform: none !important; }