/* Main Content - 헤더 높이만큼 마진 추가 */
.main-content {
    margin-top: 80px;
}

/* Overlay mode - no push for all screen sizes */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10px 0 40px 0;
}

/* Large screens - reduce hero section height */
@media (min-width: 1920px) {
    .hero-section {
        min-height: 80vh;
    }
}


.hero-content {
    display: flex;
    width: 100%;
    gap: 50px;
    align-items: center;
    border-top: 2px solid #7a8471;
    border-bottom: 2px solid #7a8471;
    padding: 20px 0;
    justify-content: space-between;
}

.hero-left {
    flex: 1;
    max-width: 500px;
}

/* Hero Right - 이미지 영역 확대 */
.hero-right {
    flex: 2;
    max-width: none;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
}

/* 큰 데스크탑에서는 기존 비율 유지 */
@media (min-width: 1920px) {
    .hero-right {
        flex: 1.3;
        max-width: 900px;
    }
}

/* Hero Left - 텍스트 영역 조정 */
.hero-left {
    flex: 1;
    max-width: 500px;
    position: relative;
    z-index: 3;
    padding: 40px 30px;
    border-radius: 0;
    backdrop-filter: blur(5px);
    margin: 20px 0;
}

.hero-subtitle {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.subtitle-text {
    font-family: 'Chosunilbo', serif;
    font-size: 14px;
    color: #7a8471;
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.subtitle-line {
    flex: 1;
    height: 1px;
    background: #7a8471;
    opacity: 0.3;
}

.hero-title-property-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 30px;
    color: #7a8471;
    display: flex;
    flex-direction: column;
}

.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInFromLeft 0.8s ease forwards;
}

.hero-title-line[data-delay="0"] {
    animation-delay: 0s;
}

.hero-title-line[data-delay="0.3"] {
    animation-delay: 0.3s;
}

.hero-title-line[data-delay="0.6"] {
    animation-delay: 0.6s;
}

.hero-title-line[data-delay="0.9"] {
    animation-delay: 0.9s;
}

.hero-title-line[data-delay="1.2"] {
    animation-delay: 1.2s;
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-description {
    font-family: 'Chosunilbo', serif;
    font-size: 17px;
    line-height: 1.6;
    color: #666;
    max-width: 400px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
    transition-delay: 2s;
}

.hero-description.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Hero Slider Container */
.hero-slider-container {
    width: 100%;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 0;
    /* 기본 페이드 효과에 의존 */
}

.hero-slider-container.animate {
    opacity: 1;
}

/* Hero Slider */
.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Slider Navigation */
.hero-slider-nav {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.slider-btn {
    width: 40px;
    height: 40px;
    background: rgba(122, 132, 113, 0.7);
    color: white;
    border: 2px solid rgba(122, 132, 113, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    margin: 5px;
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background: rgba(122, 132, 113, 0.9);
    border-color: rgba(122, 132, 113, 0.8);
    transform: scale(1.1);
}

.hero-title {
    font-family: 'Chosunilbo', serif;
    font-size: 18px;
    line-height: 1.6;
    color: #666;
    font-weight:bold;
    max-width: 400px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
    transition-delay: 1.5s;
}

.hero-title.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Essence Section */
.essence-section {
    padding: 50px 0;
    text-align: center;
}

.essence-title {
    font-size: 2rem;
    font-weight: bold;
    color: #7a8471;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.essence-title.animate {
    opacity: 1;
    transform: translateY(0);
}

.essence-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    font-family: 'Chosunilbo', serif;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    transition-delay: 0.2s;
}

.essence-description.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Section */
.gallery-section {
    padding: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.gallery-header {
    padding: 25px 0 50px 0;
    text-align: center;
    width: 90%;
    margin: 0 auto;
}

.gallery-title {
    font-size: 2rem;
    font-weight: bold;
    color: #7a8471;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.gallery-title.animate {
    opacity: 1;
    transform: translateY(0);
}

.gallery-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    font-family: 'Chosunilbo', serif;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    transition-delay: 0.2s;
}

.gallery-description.animate {
    opacity: 1;
    transform: translateY(0);
}

.gallery-container {
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.gallery-slider {
    position: relative;
    width: max-content;
    min-height: 80vh;
    padding: 60px 40px 20px 40px;
    box-sizing: border-box;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    /* transition은 JavaScript에서 제어 */
    cursor: grab;
    user-select: none;
}

.gallery-slider:active {
    cursor: grabbing;
}

.gallery-item {
    position: relative;
    overflow: visible;
    background: #f8f6f2;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    padding: 32px 32px 25px 32px; /* 폴라로이드 스타일 - 아래쪽 더 넓게 */
    display: flex;
    flex-direction: column;
    height: fit-content;
    width: auto; /* 각 카드마다 다른 너비 허용 */
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 2가지 사이즈 - odd/even */
.gallery-item:nth-child(odd) {
    width: 350px; /* 세로형 */
}

.gallery-item:nth-child(even) {
    width: 450px; /* 가로형 */
}

.gallery-item:hover {
    transform: translateY(-5px);
}

/* 중앙 세로 테이프 - 카드 위로 튀어나옴 */
.gallery-item::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) rotate(8deg);
    width: 25px;
    height: 60px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 15;
}

/* 짝수 카드들은 반대로 틀어지게 */
.gallery-item:nth-child(even)::before {
    transform: translateX(-50%) rotate(-8deg);
}

.gallery-item-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.15);
}

/* 2가지 이미지 높이 - odd/even */
.gallery-item:nth-child(odd) .gallery-item-image {
    height: 370px; /* 세로형 - 더 길게 */
}

.gallery-item:nth-child(even) .gallery-item-image {
    height: 250px; /* 가로형 */
}

.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-content {
    padding: 0;
    text-align: center;
    background: transparent;
    position: relative;
    flex: 1;
}

.gallery-item-title {
    font-family: 'Chosunilbo', serif;
    font-size: 1rem;
    font-weight: bold;
    color: #7a8471;
    margin: 10px 0 15px 0;
    position: relative;
    text-align: center;
}

.gallery-item-title::before,
.gallery-item-title::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    background-color: #7a8471;
    width: calc(50% - 70px);
}

.gallery-item-title::before {
    left: 0;
}

.gallery-item-title::after {
    right: 0;
}

/* Signature Section */
.signature-section {
    padding: 25px 0 100px 0;
}

.signature-container {
    margin: 0 auto;
    padding: 40px;
    background-color: #d4d9cf;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
    position: relative;
    overflow: hidden;
    box-shadow: -8px 8px 5px rgba(0, 0, 0, 0.2);
}

/* Signature container paper fold effect */
.signature-container::before {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    border-style: solid;
    border-width: 0 0 0 0;
    border-color: #e5e5e5 #e8ebe6;
    z-index: 200;
    transition: border-width 0.6s ease;
}

.signature-container.fold-animate::before {
    border-width: 0 60px 60px 0;
}

/* Signature container paper fold shadow layer */
.signature-container::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    border-style: solid;
    border-width: 0 0 0 0;
    border-color: transparent;
    border-right-color: rgba(0, 0, 0, 0.1);
    border-bottom-color: rgba(0, 0, 0, 0.05);
    z-index: 199;
    transition: border-width 0.6s ease;
}

.signature-container.fold-animate::after {
    border-width: 0 58px 58px 0;
}

.signature-container.animate {
    opacity: 1;
    transform: translateY(0);
}

.signature-content {
    display: flex;
    gap: 60px;
    align-items: flex-end;
}

.signature-left {
    flex: 1;
    max-width: 600px;
}

.signature-main-image {
    width: 100%;
    height: 600px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
    transition-delay: 0.3s;
}

.signature-main-image.animate {
    opacity: 1;
    transform: translateX(0);
}

.signature-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.signature-right {
    flex: 1;
    max-width: 500px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.signature-text-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.signature-title {
    font-family: 'Chosunilbo', serif;
    font-size: 32px;
    font-weight: 600;
    color: #7a8471;
    margin-bottom: 15px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s ease;
}

.signature-title.animate {
    opacity: 1;
    transform: scale(1);
}

.signature-description {
    font-family: 'Chosunilbo', serif;
    font-size: 17px;
    line-height: 1.8;
    color: #666;
    max-width: 430px;
    margin: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
    transition-delay: 0.3s;
}

.signature-description.animate {
    opacity: 1;
    transform: translateX(0);
}

.signature-thumbnails {
    display: flex;
    gap: 15px;
}

.signature-thumb {
    width: 100px;
    height: 100px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.signature-thumb:hover {
    opacity: 1;
}

.signature-thumb.active {
    opacity: 1;
    border: 2px solid #7a8471;
    padding: 3px;
}

.signature-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Closing Section */
.closing-section {
    position: relative;
    width: 100vw;
    height: 80vh;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 80px;
    left: 50%;
    right: 50%;
    overflow: hidden;
}

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

.closing-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.closing-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    z-index: 2;
}

.closing-border-top,
.closing-border-bottom {
    width: 100%;
    height: 2px;
    background: white;
}

.closing-text-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
    padding: 20px 0 0 0;
}

.closing-description {
    font-family: 'Chosunilbo', serif;
    font-size: 18px;
    line-height: 1.6;
    color: white;
    align-self: flex-start;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease;
}

.closing-description.animate {
    opacity: 1;
    transform: translateX(0);
}

.closing-title {
    font-family: 'Continuous', serif;
    font-size: 4rem;
    font-weight: bold;
    color: white;
    font-style: italic;
    align-self: flex-end;
    letter-spacing: 5px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease;
    transition-delay: 0.3s;
}

.closing-title.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Large screens - adjust gallery header width and signature-right */
@media (min-width: 1920px) {
    .gallery-header {
        width: 80%;
    }

    .signature-right {
        max-width: 700px;
    }

    .hero-right {
        flex: 2.5;
        max-width: 1200px;
    }

    .signature-left {
        max-width: 800px;
    }

    .signature-main-image {
        height: 700px;
    }
}

/* Extra large screens - further expand image area */
@media (min-width: 2560px) {
    .hero-right {
        flex: 3;
        max-width: 1600px;
    }

    .signature-left {
        max-width: 1000px;
    }

    .signature-main-image {
        height: 800px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrap {
        width: 100%;
        padding: 0 20px;
    }
    .main-content {
        margin-left: 0;
    }

    .side-header.expanded ~ .main-content {
        margin-left: 0;
    }

    .hero-section {
        /* padding: 0 20px 20px 20px; */
        min-height: auto;
    }

    .hero-content {
        flex-direction: column;
        gap: 25px;
        padding: 20px 0 40px 0;
    }

    .hero-left {
        order: 2;
        padding: 0;
        width: 95%;
        max-width: 95%;
    }

    .hero-right {
        order: 1;
        display: block;
        width: 100%;
    }

    /* 모바일에서 hero-slider 높이 증가 */
    .hero-slider-container {
        height: 60vh; /* 기존 비율을 무시하고 높이를 60vh로 설정 */
    }

    .hero-subtitle {
        gap: 15px;
        margin-bottom: 30px;
    }

    .subtitle-text {
        font-size: 12px;
    }

    .hero-description {
        font-size: 14px;
    }

    .essence-description {
        font-size: 14px;
    }

    .gallery-description {
        font-size: 14px;
    }

    .signature-description {
        font-size: 14px;
    }

    .hero-image {
        height: 60vh;
    }

    .gallery-section {
        padding: 40px 20px;
    }

    .gallery-slider {
        gap: 18px;
        min-height: auto;
        padding: 20px;
    }

    .gallery-item {
        padding: 16px 16px 20px 16px;
    }

    .gallery-item:nth-child(odd),
    .gallery-item:nth-child(even) {
        width: 300px; /* 모바일에서 더 큰 크기로 */
    }

    .gallery-item:nth-child(odd) .gallery-item-image,
    .gallery-item:nth-child(even) .gallery-item-image {
        height: 200px; /* 모바일에서 이미지 높이 줄임 */
    }

    .gallery-item-image {
        height: 300px;
    }

    .gallery-item-content {
        padding: 20px;
    }

    .gallery-item-title {
        font-size: 18px;
    }

    /* Signature Section Mobile */
    .signature-section {
        padding: 40px 0;
    }

    .signature-container {
        padding: 20px;
    }

    /* Mobile signature container fold effect */
    .signature-container::before {
        border-width: 0 0 0 0;
    }

    .signature-container.fold-animate::before {
        border-width: 0 30px 30px 0;
    }

    .signature-container::after {
        border-width: 0 0 0 0;
    }

    .signature-container.fold-animate::after {
        border-width: 0 28px 28px 0;
    }

    .signature-content {
        flex-direction: column;
        gap: 40px;
    }

    .signature-left {
        max-width: 100%;
    }

    .signature-right {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        padding: 0 20px;
    }

    .signature-main-image {
        height: 300px;
    }

    .signature-title {
        font-size: 27px;
        text-align: center;
    }

    .signature-description {
        text-align: center;
        margin: 0 auto 30px auto;
    }

    .signature-thumbnails {
        justify-content: center;
        gap: 10px;
    }

    .signature-thumb {
        width: 60px;
        height: 60px;
    }

    /* Closing Section Mobile */
    .closing-content {
        padding: 20px;
    }

    .closing-text-content {
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0;
    }

    .closing-description {
        margin-top: 15px;
        font-size: 16px;
    }

    .closing-title {
        font-size: 32px;
        align-self: flex-end;
    }
}