/* ===================================================================
   regions-styles.css - 지역 검색 페이지 전용 스타일
   =================================================================== */

/* 페이지 기본 여백 (네비게이션 바 높이만큼) */
body {
    padding-top: 80px;
}

/* ===================================================================
   검색 바 섹션 (큰 사이즈)
   =================================================================== */

.regions-search-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 2px solid #e5e5e5;
}

.search-container-large {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.search-field-large {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-field-large label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #404040;
}

.search-field-large .input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #d4d4d4;
    border-radius: 0.75rem;
    background: white;
    transition: all 0.3s ease;
}

.search-field-large .input-wrapper:focus-within {
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

.search-field-large input,
.search-field-large select {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-field-large select {
    cursor: pointer;
}

/* ===================================================================
   지역 탭
   =================================================================== */

.region-tabs {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 80px;
    z-index: 100;
    padding: 1.5rem 0;
}

.tabs-wrapper {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.tabs-wrapper::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 2px;
}

.tab-btn {
    padding: 0.875rem 2rem;
    background: #f5f5f5;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #525252;
}

.tab-btn:hover {
    background: #e5e5e5;
}

.tab-btn.active {
    background: #0a0a0a;
    color: white;
}

/* ===================================================================
   지역 필터
   =================================================================== */

.region-filters {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.filter-content {
    display: none;
}

.filter-content.active {
    display: block;
}

.filter-chips {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #d4d4d4;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chip:hover {
    border-color: #0a0a0a;
    background: #fafafa;
}

.chip.active {
    background: #0a0a0a;
    color: white;
    border-color: #0a0a0a;
}

/* ===================================================================
   카테고리 (테마별)
   =================================================================== */

.categories {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid #e5e5e5;
}

.section-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #0a0a0a;
}

.category-filters {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    white-space: nowrap;
    background: #f5f5f5;
    color: #525252;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover {
    background: #e5e5e5;
}

.category-btn.active {
    background: #0a0a0a;
    color: white;
}

/* ===================================================================
   검색 결과 헤더
   =================================================================== */

.results-header {
    padding: 2rem 0;
    background: #fafafa;
}

.results-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-info h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.results-info p {
    font-size: 0.95rem;
    color: #737373;
}

.sort-options select {
    padding: 0.75rem 1.25rem;
    border: 1.5px solid #d4d4d4;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.sort-options select:focus {
    border-color: #0a0a0a;
}

/* ===================================================================
   숙소 목록
   =================================================================== */

.properties {
    padding: 3rem 0;
    background: #fafafa;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* 카드 스타일은 기존 styles.css 활용 */

/* ===================================================================
   반응형 디자인
   =================================================================== */

@media (max-width: 1024px) {
    .search-container-large {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .region-tabs {
        top: 70px;
    }

    /* 네비게이션 컨테이너 조정 */
    .nav-container {
        padding: 1rem 1.5rem;
    }

    /* 데스크톱 네비게이션 숨김 */
    .nav-links {
        display: none !important;
    }

    /* 데스크톱 로그인 버튼 숨김 */
    .login-btn {
        display: none !important;
    }

    /* 사용자 정보 영역도 모바일에서는 숨김 */
    .user-info {
        display: none !important;
    }

    /* 모바일 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: flex !important;
    }

    .search-container-large {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tabs-wrapper {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .chip {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .results-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 모바일 메뉴 버튼 스타일 (추가) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: #0a0a0a;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===================================================================
   로딩 상태
   =================================================================== */

.loading {
    text-align: center;
    padding: 3rem;
    color: #737373;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0a0a0a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================================================
   빈 결과 메시지
   =================================================================== */

.empty-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: #737373;
}

.empty-results svg {
    margin: 0 auto 1.5rem;
}

.empty-results h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #0a0a0a;
}

.empty-results p {
    font-size: 1rem;
}

/* ===================================================================
   모바일 메뉴 스타일
   =================================================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu-header .mobile-logo {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: #0a0a0a;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #525252;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: #0a0a0a;
}

.mobile-menu-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #0a0a0a;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.mobile-nav-link:hover {
    background: #f5f5f5;
}

.mobile-nav-link svg {
    color: #525252;
}

.mobile-menu-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.mobile-login-btn {
    width: 100%;
    padding: 1rem;
    background: #0a0a0a;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-login-btn:hover {
    background: #262626;
}
