@charset "utf-8";

/**********************
 * B/A Showcase Styles
 * 비에이의원 Before/After 컨셉
 **********************/

/* 민트 컬러 팔레트 변수 */
:root {
    --ba-primary: #004b4e;
    --ba-secondary: #b8e5e0;
    --ba-accent: #54CFCB;
    --ba-light: #d4fcf7;
    --ba-dark: #222222;
    --ba-white: #ffffff;
    --ba-gradient: linear-gradient(135deg, #b8e5e0 0%, #54CFCB 100%);
}

/* 메인 페이지 헤더 스타일 개선 - 흰색 배경 */
body:has(.ba-hero) #head {
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body:has(.ba-hero) #head .logo a {
    background-image: url(../img/common/logo_point.png) !important;
}

body:has(.ba-hero) #head #gnb>li>a {
    color: #222;
}

body:has(.ba-hero) #head .link .btn_cart {
    background-image: url(../img/common/ico_cart_black.png) !important;
}

/* 모바일 헤더 */
@media screen and (max-width: 1200px) {
    body:has(.ba-hero) #head {
        background: rgba(255, 255, 255, 0.98);
    }

    body:has(.ba-hero) #head .munu .bar {
        background-image: url(../img/common/ico_bar_color.png) !important;
        filter: none;
    }
}

/**********************
 * 히어로 B/A 슬라이더
 **********************/
.ba-hero {
    position: relative;
    width: 100%;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fffe 0%, #e8f7f5 100%);
    overflow: hidden;
    padding: 150px 20px 80px 20px;
    /* 상단 여백 증가 (헤더 높이 고려) */
}

.ba-hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1400px;
    width: 100%;
    flex-wrap: wrap;
    margin: 0 auto;
}

/* 슬라이더 + 의료법 문구 래퍼 */
.ba-slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 슬라이더 컨테이너 */
.ba-slider-container {
    position: relative;
    width: 600px;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 75, 78, 0.2);
}

.ba-slider-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-slider-container .ba-before-img {
    z-index: 1;
    clip-path: inset(0 50% 0 0);
}

.ba-slider-container .ba-after-img {
    z-index: 0;
}

/* 슬라이더 핸들 */
.ba-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--ba-white);
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
}

.ba-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--ba-white);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* 핸들 인터랙션 유도를 위한 펄스 애니메이션 추가 */
    animation: handlePulse 2s infinite;
}

/* 펄스 애니메이션 키프레임 정의 */
@keyframes handlePulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.ba-slider-handle::after {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: var(--ba-primary);
    font-weight: bold;
    letter-spacing: -2px;
    white-space: nowrap;
}

/* Before/After 라벨 */
.ba-label {
    position: absolute;
    bottom: 20px;
    padding: 8px 20px;
    background: rgba(0, 75, 78, 0.9);
    color: var(--ba-white);
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 5;
}

.ba-label.before {
    left: 20px;
}

.ba-label.after {
    right: 20px;
    background: rgba(84, 207, 203, 0.9);
    color: var(--ba-dark);
}

/* 의료법 필수 표기 */
.ba-disclaimer {
    max-width: 600px;
    margin-top: 15px;
    text-align: center;
}

.ba-disclaimer .ba-date {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 75, 78, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: var(--ba-primary);
    margin-bottom: 8px;
}

.ba-disclaimer .ba-notice {
    font-size: 11px;
    color: #888;
    line-height: 1.6;
}

/* 히어로 텍스트 */
.ba-hero-text {
    max-width: 450px;
    text-align: left;
}

.ba-hero-text .subtitle {
    font-size: 18px;
    color: var(--ba-accent);
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.ba-hero-text .title {
    font-size: 48px;
    color: var(--ba-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.ba-hero-text .title span {
    color: var(--ba-accent);
}

.ba-hero-text .description {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 40px;
}

.ba-hero-text .btn-group {
    display: flex;
    gap: 20px;
}

.ba-hero-text .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: var(--ba-accent);
    color: var(--ba-dark);
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(84, 207, 203, 0.4);
}

.ba-hero-text .btn-primary:hover {
    background: var(--ba-primary);
    color: var(--ba-white);
    transform: translateY(-3px);
}

.ba-hero-text .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: var(--ba-white);
    color: var(--ba-primary);
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid var(--ba-primary);
    transition: all 0.3s ease;
}

.ba-hero-text .btn-secondary:hover {
    background: var(--ba-light);
    transform: translateY(-3px);
}

/**********************
 * B/A 갤러리 섹션
 **********************/
.ba-gallery-section {
    padding: 100px 20px;
    background: var(--ba-white);
}

.ba-gallery-section .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.ba-gallery-section .section-header .subtitle {
    font-size: 16px;
    color: var(--ba-accent);
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.ba-gallery-section .section-header .title {
    font-size: 42px;
    color: var(--ba-primary);
    font-weight: 700;
}

/* 카테고리 필터 */
.ba-category-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.ba-category-filter button {
    padding: 12px 28px;
    background: var(--ba-light);
    color: var(--ba-primary);
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ba-category-filter button:hover,
.ba-category-filter button.active {
    background: var(--ba-accent);
    color: var(--ba-dark);
    box-shadow: 0 5px 20px rgba(84, 207, 203, 0.4);
}

/* 갤러리 그리드 */
.ba-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* B/A 카드 */
.ba-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.4s ease;
}

.ba-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 75, 78, 0.2);
}

.ba-card .card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.ba-card .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.ba-card .card-image .after-img {
    opacity: 0;
}

.ba-card:hover .card-image .before-img {
    opacity: 0;
}

.ba-card:hover .card-image .after-img {
    opacity: 1;
}

/* 카드 오버레이 */
.ba-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 75, 78, 0.9));
    color: var(--ba-white);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.ba-card:hover .card-overlay {
    transform: translateY(0);
}

.ba-card .card-overlay .card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ba-card .card-overlay .card-category {
    font-size: 13px;
    opacity: 0.8;
}

/* B/A 표시 배지 */
.ba-card .ba-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    background: var(--ba-accent);
    color: var(--ba-dark);
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    z-index: 5;
    transition: all 0.3s ease;
}

.ba-card:hover .ba-badge {
    background: var(--ba-primary);
    color: var(--ba-white);
}

.ba-card:hover .ba-badge::after {
    content: ' AFTER';
}

.ba-card .ba-badge::after {
    content: ' BEFORE';
}

/* 더보기 버튼 */
.ba-gallery-more {
    text-align: center;
    margin-top: 50px;
}

.ba-gallery-more a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 50px;
    background: var(--ba-primary);
    color: var(--ba-white);
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ba-gallery-more a:hover {
    background: var(--ba-accent);
    color: var(--ba-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(84, 207, 203, 0.4);
}

.ba-gallery-more a::after {
    content: '→';
    font-size: 20px;
}

/**********************
 * 반응형 디자인
 **********************/
@media screen and (max-width: 1200px) {
    .ba-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ba-hero-text .title {
        font-size: 38px;
    }
}

@media screen and (max-width: 992px) {
    .ba-hero {
        min-height: auto;
        padding: 120px 20px 60px 20px;
        /* 모바일 헤더 높이만큼 상단 여백 */
    }

    .ba-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .ba-slider-container {
        width: 100%;
        max-width: 500px;
        height: 350px;
    }

    .ba-hero-text {
        text-align: center;
        max-width: 100%;
    }

    .ba-hero-text .btn-group {
        justify-content: center;
    }

    .ba-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media screen and (max-width: 600px) {
    .ba-hero-text .title {
        font-size: 28px;
    }

    .ba-hero-text .btn-group {
        flex-direction: column;
        gap: 15px;
    }

    .ba-hero-text .btn-primary,
    .ba-hero-text .btn-secondary {
        width: 100%;
    }

    .ba-gallery-grid {
        grid-template-columns: 1fr;
    }

    .ba-card .card-image {
        height: 220px;
    }

    .ba-category-filter button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .ba-gallery-section .section-header .title {
        font-size: 28px;
    }
}