/* Pretendard 웹폰트 불러오기 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* === [추가] 수평 스크롤 애니메이션 === */
@keyframes horizontalScroll {
    from {
        transform: translateX(0);
    }
    /* 트랙의 절반(-50%)만큼 왼쪽으로 이동 */
    to {
        transform: translateX(-50%);
    }
}

/* === [추가] 카드 개별 바운스 애니메이션 (이전과 동일) === */
@keyframes bounceCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

[x-cloak] {
    display: none !important;
}

/*Global Styles & Variables*/
:root {
    --primary-color: #1362FB;
    --secondary-color: #2C80FF;
    --highlight-color: #FBE227;
    --text-color: #333;
    --text-light: #ffffff;
    --background-grey-dark: #F1F1F1;
    --border-color: #EAEAEA;
    --danger-color: #E74C3C;
}

body {
    /* 모든 글꼴을 Pretendard로 변경 */
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
    word-break: keep-all;
    background-color: var(--text-light);
    overflow-x: hidden;
}

.uk-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 20px;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0 2rem 0;
    line-height: 1.4;
}

/* Hero Section */
.hero-section {
    background-color: var(--secondary-color);
    padding: 60px 20px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.hero-section h1 .highlight-yellow {
    color: var(--highlight-color);
}

.hero-section h3 {
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 2rem;
}

.hero-section img {
    max-width: 300px;
    width: 80%;
    height: auto;
}

/* Problem Section */
.problem-section {
    padding-bottom: 40px;
}

.problem-section h2 {
    color: var(--primary-color);
    font-weight: 900;
}

.problem-card-container {
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.problem-card {
    background-color: var(--background-grey-dark);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    border: none;
}

.problem-card::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-top-color: var(--background-grey-dark);
    border-bottom: 0;
    border-left-width: 10px;
    border-right-width: 10px;
}

.problem-section img {
    max-width: 150px;
}

/* Features Section */
.features-section {
    padding-top: 40px;
}

.features-section h2 {
    font-weight: 900;
}

.features-list {
    list-style: none;
    padding: 10px;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    background-color: #E0E0E0;
    border-radius: 10px;
}

.features-list li {
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.features-list img {
    margin-right: 15px;
    width: 24px;
    height: 24px;
}

.merit-section .page-switch-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.merit-section .page-switch {
    position: relative;
    display: inline-flex;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    padding: 0;
}

.merit-section .switch-slider {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 50px;
    transition: all 0.3s ease-in-out;
    z-index: 1;
}

.merit-section .switch-link {
    padding: 0 25px;
    line-height: 40px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    transition: color 0.3s ease-in-out;
}

.merit-section .switch-link.active {
    color: var(--text-light);
}

.merit-section .main-headline {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* === [수정] 카드 크기에 맞춰 컨테이너 높이 확대 === */
.merit-section .merit-carousel-container {
    width: 100%;
    height: 290px;
    overflow: hidden;
    position: relative;
}

/* 마스크 효과 (양옆을 흐리게 만듦) */
.merit-section .merit-carousel-container::before,
.merit-section .merit-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.merit-section .merit-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, white, rgba(255, 255, 255, 0));
}

.merit-section .merit-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, white, rgba(255, 255, 255, 0));
}

/* 카드들을 담고 실제로 움직이는 '트랙' */
.merit-section .merit-carousel-track {
    display: flex;
    position: absolute;
    left: 0;
    top: 30px; /* 기존 20px -> 30px (바운스 공간 확보) */
    animation: horizontalScroll 30s linear infinite;
}

/* === [수정] 모바일 기본 카드 스타일 (약간 작은 크기) === */
.merit-section .merit-card {
    width: 210px;
    height: 250px;
    margin: 0 15px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: bounceCard 4s ease-in-out infinite;
}

/* 각 카드마다 바운스 시작 시간을 다르게 함 */
.merit-section .merit-card:nth-child(2n) {
    animation-delay: -1s;
}

.merit-section .merit-card:nth-child(3n) {
    animation-delay: -2s;
}

.merit-section .merit-card:nth-child(4n) {
    animation-delay: -0.5s;
}

/* 호버 시 모든 애니메이션 일시 정지 */
.merit-section .merit-carousel-container:hover .merit-carousel-track,
.merit-section .merit-carousel-container:hover .merit-card {
    animation-play-state: paused;
}

.merit-section .card-title-wrapper {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

/* === [수정] 카드 내부 요소 크기 조정 === */
.merit-section .merit-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    margin: 0; /* 불필요한 마진 제거 */
}

.merit-section .merit-card .highlight-blue {
    color: var(--primary-color);
    font-weight: 900;
}

.merit-section .merit-card img {
    max-width: 110px; /* 기존 100px -> 130px */
    height: auto;
}

/* 화면 너비가 768px 이상일 때 아래 스타일을 적용합니다. */
@media (min-width: 768px) {
    .merit-section .merit-carousel-container {
        height: 320px; /* 데스크톱에선 컨테이너 높이 확대 */
    }

    .merit-section .merit-card {
        width: 240px; /* 데스크톱에선 카드 너비 확대 */
        height: 280px; /* 데스크톱에선 카드 높이 확대 */
        margin: 0 20px;
    }

    .merit-section .card-title-wrapper {
        height: 70px; /* 데스크톱에선 제목 영역 높이 확대 */
    }

    .merit-section .merit-card h3 {
        font-size: 1.4rem; /* 데스크톱에선 폰트 크기 확대 */
    }

    .merit-section .merit-card img {
        max-width: 130px; /* 데스크톱에선 이미지 크기 확대 */
    }
}

/* Benefits Section */
.benefits-section {
    padding: 40px 20px;
    text-align: center;
}

.benefits-section .benefits-container {
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: background-color 0.4s ease-in-out;
}

.benefits-section .benefits-header {
    font-size: 1.7rem;
    font-weight: bold;
    padding: 14px 28px;
    border-radius: 14px;
    display: inline-block;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.benefits-section .benefits-main-image {
    max-width: 200px;
    margin-bottom: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.benefits-section .benefit-list {
    text-align: left;
    margin-bottom: 30px;
}

.benefits-section .benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.benefits-section .benefit-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.benefits-section .benefit-icon-wrapper img {
    width: 35px;
}

.benefits-section .benefit-text {
    flex: 1;
    min-width: 0;
}

.benefits-section .benefit-text h3 {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 4px 0;
}

.benefits-section .benefit-text p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.benefits-section .benefits-cta-button {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
    border: none;
}

.benefits-section .benefits-cta-button:hover {
    transform: scale(1.05);
}

/* Comparison Table Section */
.comparison-table-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.comparison-table-wrapper {
    max-width: 500px;
    margin: 2rem auto 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.comparison-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table-wrapper th, .comparison-table-wrapper td {
    border: 1px solid var(--border-color);
    padding: 15px 10px;
    font-size: 1rem;
    text-align: center;
}

.comparison-table-wrapper thead th {
    background-color: #f0f3f5;
    font-weight: bold;
}

.comparison-table-wrapper tbody tr td:first-child {
    font-weight: 500;
    text-align: left;
    padding-left: 20px;
}

.comparison-table-wrapper .check-o {
    color: var(--danger-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.comparison-table-wrapper .check-x {
    color: #ccc;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Featured Property Section */
.featured-property-section .recommend-section-wrapper {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

/* 지역 선택 필터 영역 */
.recommend-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 지역 선택 버튼 */
.city-selector {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.city-selector:hover .recommend-city {
    color: #1362FB;
}

.recommend-city {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
    transition: all 0.2s;
}

.arrow-down-city {
    width: 6px;
    height: 6px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(-45deg);
    transition: all 0.2s;
    margin-bottom: 2px;
}

.recommend-label {
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
}

/* 매물 그리드 레이아웃 - 세로 배치 */
.property-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* 매물 카드 스타일 - 가로형 */
.featured-property-section .recommend-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 12px;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: all 0.2s;
    position: relative;
}

.featured-property-section .recommend-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 매물 썸네일 */
.featured-property-section .recommend-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    align-self: center;
}

/* 매물 정보 영역 */
.featured-property-section .recommend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.featured-property-section .recommend-price {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #333;
}

.featured-property-section .recommend-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.3;
    margin-bottom: 2px;
}

.featured-property-section .recommend-dt {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.3;
    margin-bottom: 4px;
}

.featured-property-section .recommend-type {
    font-weight: 500;
    color: #666;
}

.featured-property-section .recommend-sub {
    font-size: 0.8rem;
    color: #999;
    margin-top: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* 매물이 없을 때 표시 */
.no-properties {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 16px;
}

/* === 지역 선택 모달 스타일 === */

/* 모달 오버레이 */
.region-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모달 컨테이너 */
.region-modal {
    background: white;
    border-radius: 12px;
    max-width: 480px;
    max-height: 70vh;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* 모달 헤더 */
.region-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
}

.region-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* 모달 컨텐츠 */
.region-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 시/도 버튼 그리드 */
.district-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* 시/도 선택 버튼 */
.district-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 60px;
}

.district-btn:hover:not(.disabled) {
    border-color: #1362FB;
    background: #f8f9ff;
}

.district-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f8f8;
    border-color: #e0e0e0;
}

.district-btn span {
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 2px;
}

.district-btn small {
    font-size: 0.75rem;
    color: #666;
    font-weight: 400;
}

.district-btn.disabled small {
    color: #999;
}

/* 모달 하단 버튼 영역 */
.region-modal-footer {
    display: flex;
    padding: 16px 20px;
    gap: 10px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.modal-action-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
}

.modal-action-btn:hover {
    background: #f8f8f8;
}

.modal-action-btn.primary {
    background: #1362FB;
    color: white;
    border: none;
}

.modal-action-btn.primary:hover {
    background: #0d4fd6;
}

/* 모바일 반응형 */
@media (max-width: 640px) {
    .region-modal {
        width: 95%;
        max-height: 70vh;
    }

    .region-modal-content {
        padding: 16px;
    }

    .district-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .district-btn {
        padding: 14px 6px;
        min-height: 30px;
    }

    .district-btn span {
        font-size: 0.9rem;
    }

    .recommend-city {
        font-size: 1.2rem;
    }

    .recommend-label {
        font-size: 1.2rem;
    }

    .featured-property-section .recommend-card {
        padding: 10px;
        gap: 10px;
    }

    .featured-property-section .recommend-thumbnail {
        width: 70px;
        height: 70px;
    }
}

.district-btn.selected {
    border-color: #1362FB !important;
    color: white;
}

/* FAQ & Contact Section */
.faq-section {
    padding-bottom: 80px;
}

.faq-section .info-container {
    max-width: 450px;
    margin: 0 auto;
}

.faq-section .faq-list-wrapper {
    transition: opacity 0.3s ease-in-out;
}

.faq-section .info-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: left;
}

.faq-section .faq-item-wrapper {
    border-bottom: 1px solid #e0e0e0;
}

.faq-section .faq-item {
    padding: 15px 0;
}

.faq-section .faq-question {
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.faq-section .faq-question::-webkit-details-marker {
    display: none;
}

.faq-section .faq-question::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid #888;
    border-right: 2px solid #888;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-section .faq-item[open] .faq-question::after {
    transform: rotate(-135deg);
}

.faq-section .faq-answer {
    padding: 15px 5px 5px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    text-align: left;
}

.faq-section .customer-center-section {
    margin-top: 100px;
}

.faq-section .customer-center-section .phone-number {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 15px 0;
    letter-spacing: 0.5px;
    text-align: left;
}

.faq-section .customer-center-section .work-hours {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.7;
    text-align: left;
}

/* Media Queries (Responsive) */
@media (min-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section img {
        max-width: 450px;
    }
}

/* === [추가] 동적 콘텐츠 페이드 효과를 위한 헬퍼 클래스 === */
.content-fade-out {
    opacity: 0;
}

/* Float CTA 호버 효과 */
.float-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 모바일에서 CTA 크기 줄이기 */
@media (max-width: 640px) {
    .float-cta {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}