/* 글로벌 설정 */
:root {
    --primary: #0b192c; /* 네이비 */
    --accent: #e63946; /* 레드 */
    --text-main: #1e293b;
    --text-sub: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Pretendard', sans-serif; }
body { color: var(--text-main); background-color: #fff; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 1. Header & Hero (메인용) */
.hero {
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1538485399081-7191377e8241?q=80&w=2000&auto=format&fit=crop') center/cover;
    height: 550px;
    position: relative;
}

header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 60px; color: #fff;
}

.logo { font-size: 22px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.logo .script { font-family: 'Caveat', cursive; font-size: 32px; }

.nav-menu { display: flex; gap: 40px; font-size: 14px; font-weight: 500; letter-spacing: 0.5px; }
.nav-menu a:hover { opacity: 0.8; }

.hero-text {
    text-align: center; color: #fff; margin-top: 70px;
}
.hero-text h1 { font-size: 46px; font-weight: 700; margin-bottom: 15px; }
.hero-text p { font-size: 18px; font-weight: 400; }

/* [추가] 서브페이지용 흰색 헤더 스타일 */
header.sub-header { background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; border-bottom: 1px solid var(--border); color: var(--text-main); }
.sub-header .logo { color: var(--text-main); }
.sub-header .nav-menu { color: var(--text-main); }

/* 2. Compact Search Bar */
.search-wrap {
    max-width: 1000px;
    margin: -90px auto 60px;
    background: #fff;
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.input-group h4 { font-size: 14px; margin-bottom: 12px; color: var(--text-main); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-btn {
    padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--text-sub); font-size: 13px; cursor: pointer;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }

.rent-inputs { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.rent-inputs select {
    flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 8px; outline: none;
}

.search-action { display: flex; gap: 10px; }
.search-action input[type="text"] { flex: 1; padding: 10px 15px; border: 1px solid var(--border); border-radius: 8px; }
.search-action button { background: var(--primary); color: #fff; border: none; padding: 0 25px; border-radius: 8px; font-weight: 600; cursor: pointer; }

.search-bottom {
    display: flex; justify-content: space-between; align-items: center;
    grid-column: 2; margin-top: 5px; font-size: 13px; color: var(--text-sub);
}

/* 3. Property Cards (공통) */
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 25px; color: var(--primary); display: flex; justify-content: space-between; align-items: flex-end; }
.section-title a { font-size: 13px; font-weight: 500; color: var(--text-sub); }

.card {
    border: 1px solid var(--border);
    background: #fff;
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.card-img { height: 190px; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.badge { position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 600; padding: 4px 8px; color: #fff; }
.badge.green { background: #10b981; }
.badge.red { background: #ef4444; }

.loc-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; font-size: 11px; }

.card-info { padding: 16px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.card-price span { font-size: 11px; color: var(--text-sub); font-weight: 400; }
.card-desc { font-size: 12px; color: var(--text-sub); line-height: 1.5; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-meta { display: flex; gap: 12px; border-top: 1px solid var(--border); padding-top: 12px; font-size: 11px; color: var(--text-sub); }

/* 4. Recommended Section */
.recommended { margin-bottom: 60px; position: relative; }
.slider-wrap { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.slider-wrap::-webkit-scrollbar { display: none; }
.slider-wrap .card { min-width: 320px; flex: 1; }

.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; color: #cbd5e1; cursor: pointer; z-index: 2; }
.nav-arrow.left { left: -40px; }
.nav-arrow.right { right: -40px; }

/* 5. Category Tags */
.category-tags {
    display: flex; justify-content: center; gap: 10px; margin-bottom: 60px; flex-wrap: wrap;
}
.tag {
    padding: 10px 24px; border: 1px solid var(--border); border-radius: 50px; font-size: 14px; font-weight: 500; color: var(--text-main); cursor: pointer; transition: 0.2s;
}
.tag.active, .tag:hover {
    background: #eff6ff; border-color: #3b82f6; color: #2563eb; font-weight: 600;
}

/* 6. New Listings Grid */
.new-listings { margin-bottom: 100px; }
.grid-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 7. Footer */
footer { background: var(--primary); color: #94a3b8; padding: 60px 0; font-size: 13px; line-height: 1.8; }
footer strong { color: #fff; font-size: 15px; display: block; margin-bottom: 15px; }
.footer-info span { display: inline-block; margin-right: 15px; }

/* 반응형 (테블릿/모바일) */
@media (max-width: 1024px) {
    .grid-wrap { grid-template-columns: repeat(2, 1fr); }
    .search-grid { grid-template-columns: 1fr; gap: 20px; }
    .nav-arrow { display: none; }
}
@media (max-width: 768px) {
    .grid-wrap { grid-template-columns: 1fr; }
    header { flex-direction: column; gap: 20px; padding: 20px; }
    .hero-text h1 { font-size: 32px; }
    .search-wrap { margin-top: -40px; padding: 20px; }
}
