* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

/* 메인 콘텐츠 섹션 */
.content-section {
    padding: 80px 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-header {
    text-align: center;
    margin: 80px 0 100px 0;
}

.content-title {
    font-size: 54px;
    font-weight: bold;
    color: #A6756A;
    margin-bottom: 20px;
}

.content-subtitle {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
}

/* 리프팅 섹션 */
.lifting-section {
    margin-bottom: 100px;
}

.lifting-title {
    font-size: 30px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.portfolio-section-label {
    display: inline-block;
    margin-right: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #faf3f2;
    color: #A6756A;
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}

.lifting-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.lifting-tab-container {
    background: #A6756A;
    border-radius: 25px;
    padding: 5px;
    display: flex;
}

.lifting-tab {
    padding: 10px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
}

.lifting-tab.active {
    background: white;
    color: #A6756A;
    font-weight: 600;
}

.lifting-tab:hover:not(.active) {
    color: white;
}

/* Before/After 이미지 섹션 */
.before-after-container {
    position: relative;
    border-radius: 0 100px 0 100px;
    overflow: hidden;
    height: 540px;
    background: linear-gradient(135deg, #f0f4f3, #e8f0ed);
}

.ba-tab {
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.ba-tab.before {
    position: absolute;
    background: #D8A89E;
    color: #ffffff;
    top: 20px;
    right: 20px;
    left: auto;
    transform: none;
    z-index: 100;
}

.ba-tab.after {
    background: #A6756A;
    color: white;
    position: absolute;
    top: 20px;
    left: 20px;
    right: auto;
    transform: none;
    /* after-image 가 transform/will-change 로 자체 쌓임 맥락(0)을 만들어 DOM 순서상 버튼을 덮어버리므로 z-index 로 올림 */
    z-index: 100;
}

.image-content {
    display: flex;
    height: 100%;
}

.before-side {
    width: 50%;
    flex: 0 0 50%;
    position: relative;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.before-login {
    width: 100%;
    height: 100%;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000000c1;
    backdrop-filter: blur(10px);
}

.actual-before-image {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    z-index: 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.actual-before-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-message {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.4;
}

.login-description {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.login-btn {
    background: rgb(255, 225, 0);
    color: #333;
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.login-btn img {
    width: 18px;
    height: 18px;
    justify-content: center;
}

.login-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.after-side {
    flex: 0 0 50%;
    width: 50%;
    position: relative;
}

/* 실제 이미지를 위한 스타일 */
.actual-after-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
}

.actual-after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ============================================
   로그인 기능 CSS
   ============================================ */

/* 이미지 전환 애니메이션 */
.before-image,
.after-image {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.before-image.fade-out,
.after-image.fade-out {
    opacity: 0;
}

/* 로그인 상태별 Before 오버레이 표시/숨김 */
.before-login[data-login-status="true"] {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.before-login[data-login-status="false"] {
    display: flex;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.3s ease;
}

/* 로그인 상태별 Before 이미지 블러 처리 */
.before-side[data-logged-in="false"] .actual-before-image img {
    filter: blur(15px);
    transition: filter 0.5s ease;
}

.before-side[data-logged-in="true"] .actual-before-image img {
    filter: none;
    transition: filter 0.5s ease;
}

/* 로그인 오버레이 페이드 애니메이션 */
.before-login {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.before-login.hiding {
    opacity: 0;
    visibility: hidden;
}

/* 리프팅 섹션 숨김 처리 (더보기 기능) */
.lifting-section:nth-child(n+4) {
    display: none;
}

.lifting-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.no-data {
    padding: 80px 20px;
    text-align: center;
    color: #666;
    font-size: 18px;
    background: #fff;
    border: 1px solid #e7ede9;
}

/* 더보기 버튼 */
.load-more-container {
    text-align: center;
    margin: 50px 0 80px 0;
}

.load-more-btn {
    background: #A6756A;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #85594F;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(81, 111, 95, 0.3);
}

.load-more-btn svg {
    transition: transform 0.3s ease;
}

.load-more-btn.loading svg {
    animation: bounce 0.6s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

.load-more-btn.hidden {
    display: none;
}

/* 페이드인 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 - 태블릿 */
@media (max-width: 1200px) {

    .load-more-container {
        margin: 30px 0 60px 0;
    }
    
    .load-more-btn {
        padding: 12px 40px;
        font-size: 15px;
    }
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {

    /* 콘텐츠 섹션 */
    .content-section {
        padding: 60px 15px 40px;
    }
    
    .content-header {
        margin: 50px 0 60px 0;
    }
    
    .content-title {
        font-size: 28px;
    }
    
    .content-subtitle {
        font-size: 16px;
    }
    
    /* 리프팅 섹션 */
    .lifting-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .lifting-tabs {
        margin-bottom: 30px;
        overflow-x: auto;
        padding: 0 15px;
        justify-content: center;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .lifting-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .lifting-tab-container {
        min-width: fit-content;
    }
    
    .lifting-tab {
        min-width: 60px;
        padding: 8px 15px;
        font-size: 12px;
    }
    
    /* Before/After 컨테이너 - 모바일에서 세로 배치 */
    .before-after-container {
        height: 480px;
        border-radius: 0 50px 0 50px;
        margin: 0 10px;
    }
    
    .image-content {
        flex-direction: column;
    }
    
    .before-side,
    .after-side {
        width: 100%;
        height: 50%;
        flex: 0 0 50%;
    }
    
    /* 모바일에서 버튼들 모두 왼쪽에 배치 */
    .ba-tab.before {
        top: 10px;
        left: 15px;
        right: auto;
        padding: 8px 20px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .ba-tab.after {
        top: 10px;
        left: 15px;
        padding: 8px 20px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .login-message {
        font-size: 16px;
    }
    
    .login-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    
    .content-title {
        font-size: 24px;
    }
    
    .lifting-title {
        font-size: 18px;
    }
    
    .before-after-container {
        margin: 0 5px;
        height: 400px;
    }
    
    .login-message {
        font-size: 14px;
    }

    .before-side,
    .after-side {
        height: 250px;
    }
    

    .load-more-btn {
        padding: 10px 35px;
        font-size: 14px;
    }
}
