/* before_after.css - 전후사진 페이지 */

/* ============================================
   Before & After Page Styles
   ============================================ */

.before-after-page {
    padding-top: 90px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Before & After Banner */
.before-after-banner {
    width: 100%;
    margin-bottom: 60px;
    position: relative;
}

.before-after-banner .banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.before-after-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.before-after-banner .banner-content {
    text-align: center;
    color: #333;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.before-after-banner .banner-subtitle {
    font-size: var(--text-sm);
    font-weight: var(--font-light);
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #333;
}

.before-after-banner .banner-title-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
}

.before-after-banner .banner-title-box {
    display: inline-block;
    padding: 15px 40px;
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: #333;
}

.before-after-banner .banner-title-text {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: #333;
    margin-left: 10px;
}

.before-after-page .container {
    max-width: 1580px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
}

.before-after-page .wrapper {
    width: 100%;
}

/* Navigation Tabs */
.before-after-nav {
    margin-bottom: 50px;
    border-bottom: 2px solid #e0e0e0;
}

.before-after-nav .nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.before-after-nav .nav-tab {
    margin: 0;
}

.before-after-nav .nav-tab a {
    display: block;
    padding: 20px 40px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.before-after-nav .nav-tab a:hover {
    color: #333;
}

.before-after-nav .nav-tab.active a {
    color: #00d9b6;
    border-bottom-color: #00d9b6;
}

/* Before & After Grid */
.before-after-section {
    width: 100%;
    display: none;
}

.before-after-section.active {
    display: block;
}

.before-after-page .ba-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.before-after-page .ba-item {
    width: 100%;
}

.before-after-page .ba-comparison {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.before-after-page .ba-image-wrapper {
    width: 100%;
    position: relative;
}

.before-after-page .ba-image-wrapper.ba-compact {
    margin-bottom: 10px;
}

.before-after-page .ba-image-wrapper.ba-compact:last-child {
    margin-bottom: 0;
}

.before-after-page .ba-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.before-after-page .ba-placeholder {
    padding: 60px 20px;
    text-align: center;
    font-size: var(--text-sm);
    color: #999;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive Design for Before & After Page */
@media screen and (max-width: 1024px) {
    .before-after-page .container {
        padding: 50px 20px;
    }

    .before-after-nav .nav-tab a {
        padding: 15px 30px;
        font-size: var(--text-sm);
    }

    .before-after-page .ba-grid {
        gap: 20px;
    }
}

@media screen and (max-width: 1024px) {
    .before-after-banner .banner-subtitle {
        font-size: var(--text-sm);
    }

    .before-after-banner .banner-title-text {
        font-size: var(--text-lg);
    }
}

@media screen and (max-width: 768px) {
    .before-after-banner {
        margin-bottom: 40px;
    }

    .before-after-banner .banner-subtitle {
        font-size: var(--text-sm);
        margin-bottom: 15px;
    }

    .before-after-banner .banner-title-text {
        font-size: var(--text-md);
    }

    .before-after-page .container {
        padding: 40px 15px;
    }

    .before-after-nav {
        margin-bottom: 40px;
    }

    .before-after-nav .nav-tabs {
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .before-after-nav .nav-tab a {
        padding: 12px 20px;
        font-size: var(--text-xs);
        white-space: nowrap;
    }

    .before-after-page .ba-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .before-after-page .ba-image-wrapper.ba-compact {
        margin-bottom: 8px;
    }
}

@media screen and (max-width: 480px) {
    .before-after-banner .banner-subtitle {
        font-size: var(--text-xs);
        letter-spacing: 1px;
    }

    .before-after-banner .banner-title-group {
        flex-direction: column;
        gap: 10px;
    }

    .before-after-banner .banner-title-text {
        font-size: var(--text-md);
        margin-left: 0;
    }

    .before-after-nav .nav-tab a {
        padding: 10px 15px;
        font-size: var(--text-xs);
    }

    .before-after-page .ba-placeholder {
        padding: 40px 15px;
        font-size: var(--text-sm);
    }
}


/* --------------------- Dragstage Before/After Feature */
#dragstage_area {
  position: relative;
  width: 100%;
  max-width: 620px; /* 이미지 영역을 소폭 축소해 좌측 공간 확보 */
  height: auto;
  aspect-ratio: 700 / 830;
}

.dragstage {
}

.dragstage img {
  width: 100%;
  height: auto;
}

.dragstage .stageimage {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.dragstage .stageimage img {
  opacity: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dragstage .coverimage {
  overflow: visible !important;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  max-width: none;
}

.dragstage .coverimage img {
  position: absolute;
  height: 100%;
  width: 100%;
  max-width: none;
  clip: rect(0px, 328px, auto, 0px);
}

.dragstage .coverimage:hover {
  cursor: e-resize;
}

.dragstage .active .handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  bottom: 0;
  z-index: 100;
  transition: opacity 0.4s;
  -webkit-transition: opacity 0.4s;
}

.dragstage .active .handle:before {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: #ffffff;
  content: "";
}

.dragstage .active .handle:after {
  position: absolute;
  bottom: 108px;
  left: 0px;
  width: 41px;
  height: 41px;
  margin-left: -12px;
  background: url("../../git_www_clinic_zeah/assets/images/sub/icon_mouse.png")
    no-repeat;
  background-size: contain;
  content: "";
  transition: opacity 0.4s;
  -webkit-transition: opacity 0.4s;
}

.dragstage .active .handle.on {
  opacity: 1;
}

.dragstage .active .handle > span {
  display: block;
  font-size: var(--text-xs);
  color: #fff;
  margin-top: 90px;
  text-align: center;
}

.dragstage .active .handle.drag_start:after {
  opacity: 1;
}

.dragstage .atxt {
  margin-top: 15px;
  text-align: center;
  font-size: var(--text-xs);
  color: #999;
  line-height: 1.5;
}

/* Responsive: Large screens (up to 1500px) */
@media all and (max-width: 1500px) {
  #dragstage_area {
    max-width: 50vw;
  }
}

/* Responsive: Mobile (up to 991.9px) */
@media all and (max-width: 991.9px) {
  #dragstage_area {
    width: auto;
    height: auto;
    max-width: 500px;
    margin: 0 auto 30px;
  }
}
