/* v7/locale/css/home.css — 다국어 홈 페이지 모던 디자인 (Iter 30)
 *
 * 사용자 요청: "디자인을 더 예쁘게 + 메인에 부동산 목록"
 * 구성:
 *   - 히어로 섹션 (그라데이션 + 큰 타이포 + 검색창 + 통계)
 *   - 인기 매물 그리드 (6장)
 *   - CTA 카드
 *
 * 필고 테마: Web Awesome Pro 변수, Font Awesome 7, Bootstrap 미사용
 */

/* Iter 37: index.php가 layout-open/close 사용 — 사이드바와 함께 사용됨
   사이드바가 280px 차지하므로 main 영역에 맞춰 패딩만 적용 */
.locale-home-v2 {
    padding-bottom: 1rem;
}

/* ─────── 히어로 섹션 (Iter 7 — 검색 제거 후 더 컴팩트) ─────── */
.locale-hero {
    background: var(--surface-card);
    border-radius: 14px;
    padding: 2.25rem 1.75rem;
    margin-bottom: 1.75rem;
    text-align: center;
    border: 1px solid var(--border);
    background-image:
        radial-gradient(ellipse at top right, rgba(30, 64, 175, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(30, 64, 175, 0.025) 0%, transparent 50%);
}
@media (max-width: 768px) {
    .locale-hero {
        padding: 2rem 1.25rem 1.5rem;
        border-radius: 20px;
        background-image:
            radial-gradient(ellipse at top, rgba(30, 64, 175, 0.1) 0%, transparent 65%),
            linear-gradient(180deg, var(--philgo-red-50) 0%, var(--surface-card) 50%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
}

.locale-hero-content {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.locale-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 1rem;
    background: var(--philgo-red-50, #fdf2f2);
    color: var(--philgo-red-900, #5f1518);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.08);
}
.locale-hero-badge i {
    color: var(--philgo-red-800, #7a1d22);
}

.locale-hero-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 0.75rem;
}
@media (max-width: 768px) {
    .locale-hero-title { font-size: 1.625rem; }
}
@media (max-width: 480px) {
    .locale-hero-title { font-size: 1.5rem; }
    .locale-hero-badge {
        padding: 0.5rem 1.125rem;
        font-size: 0.6875rem;
        letter-spacing: 0.12em;
    }
}

.locale-hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary, #4a4a4a);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* ─────── 검색창 ─────── */
.locale-hero-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.375rem 0.5rem 0.375rem 1.25rem;
    border: 1px solid var(--border, #e5ddd9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    max-width: 560px;
    margin: 0 auto 2rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.locale-hero-search:focus-within {
    border-color: var(--philgo-red-800, #7a1d22);
    box-shadow: 0 4px 24px rgba(30, 64, 175, 0.15);
}
.locale-hero-search > i {
    color: var(--philgo-red-800, #7a1d22);
    font-size: 0.9375rem;
}
.locale-hero-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    padding: 0.625rem 0.5rem;
    color: var(--text-primary, #1a1a1a);
    min-width: 0;  /* flex shrink */
}
.locale-hero-search input::placeholder {
    color: var(--text-muted, #6b6b6b);
}
.locale-hero-search button {
    padding: 0.625rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: var(--philgo-red-800, #7a1d22);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.locale-hero-search button:hover {
    opacity: 0.9;
}
@media (max-width: 480px) {
    .locale-hero-search { padding: 0.25rem 0.25rem 0.25rem 1rem; }
    .locale-hero-search button { padding: 0.5rem 1rem; font-size: 0.8125rem; }
}

/* ─────── 인기 도시 chip ─────── */
.locale-hero-cities {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}
.locale-hero-cities-label {
    color: var(--text-secondary, #4a4a4a);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.locale-hero-cities-label i {
    color: #f59e0b;
}
.locale-hero-city-chip {
    padding: 0.3125rem 0.875rem;
    background: var(--surface-elevated, #fafafa);
    border: 1px solid var(--border, #e5ddd9);
    border-radius: 999px;
    color: var(--text-secondary, #4a4a4a);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.locale-hero-city-chip:hover {
    background: var(--philgo-red-50, #fdf2f2);
    border-color: var(--philgo-red-800, #7a1d22);
    color: var(--philgo-red-800, #7a1d22);
}

/* ─────── 통계 ─────── */
.locale-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.875rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border, #e5ddd9);
}
/* 모바일: 각 통계를 미니 카드처럼 — 시각 분리 + 강조 */
@media (max-width: 640px) {
    .locale-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        border-top: 1px dashed var(--border);
    }
    .locale-hero-stat {
        background: var(--surface-card, #ffffff);
        border: 1px solid var(--border, #e2e8f0);
        border-radius: 14px;
        padding: 1rem 0.5rem;
        gap: 0.375rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    }
    a.locale-hero-stat:active {
        transform: scale(0.97);
        border-color: var(--philgo-red-800);
        box-shadow: 0 4px 12px rgba(var(--philgo-rgb), 0.12);
    }
    .locale-hero-stat-icon {
        font-size: 1.375rem;
    }
    .locale-hero-stat-num {
        font-size: 1.875rem;
    }
    .locale-hero-stat-label {
        font-size: 0.6875rem;
        letter-spacing: 0.04em;
    }
}
.locale-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s;
}
a.locale-hero-stat:hover {
    transform: translateY(-2px);
}
a.locale-hero-stat:hover .locale-hero-stat-num {
    color: var(--philgo-red-800, #7a1d22);
}
.locale-hero-stat-static {
    cursor: default;
}
.locale-hero-stat-icon {
    font-size: 1.25rem;
    color: var(--philgo-red-800, #7a1d22);
    margin-bottom: 0.25rem;
}
.locale-hero-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
    line-height: 1;
    letter-spacing: -0.015em;
}
.locale-hero-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #4a4a4a);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 0.1875rem;
}

/* ─────── 섹션 헤더 ─────── */
.locale-home-section {
    margin-bottom: 3rem;
}
.locale-home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.locale-home-section-head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.015em;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
@media (max-width: 480px) {
    .locale-home-section-head h2 {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    .locale-home-section-head h2 i {
        font-size: 1.125rem;
    }
    .locale-home-section {
        margin-bottom: 2.25rem;
    }
    .locale-home-section-head {
        margin-bottom: 1rem;
    }
    .locale-home-section-more {
        font-size: 0.8125rem;
        padding: 0.3125rem 0.625rem;
    }
}
.locale-home-section-head h2 i {
    color: #f59e0b;
}
.locale-home-section-more {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: var(--philgo-red-800, #7a1d22);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    transition: gap 0.2s, background 0.2s, color 0.2s;
}
.locale-home-section-more:hover {
    gap: 0.625rem;
    background: var(--philgo-red-50, #fdf2f2);
    color: var(--philgo-red-900, #5f1518);
}

/* ─────── 매물 그리드 ─────── */
.locale-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
}
/* 모바일/소형 태블릿: 2열 고정 — 481~768 범위에서도 카드 거대화 방지 (R2 Iter 30) */
@media (max-width: 768px) {
    .locale-home-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.125rem;
    }
}
@media (max-width: 480px) {
    .locale-home-grid {
        gap: 0.875rem;
    }
}

/* ─────── 매물 카드 ─────── */
/* 카드 hover (Iter 92/19 — 보더 + 가벼운 그림자) */
.locale-home-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-card, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border, #e5ddd9);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.locale-home-card:hover {
    border-color: var(--philgo-red-800, #7a1d22);
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12);
    transform: translateY(-2px);
    color: inherit;
}
.locale-home-card:active {
    transform: translateY(0) scale(0.99);
}
.locale-home-card-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-elevated, #fafafa);
    overflow: hidden;
}
@media (max-width: 480px) {
    .locale-home-card-photo {
        aspect-ratio: 5 / 4;
    }
    .locale-home-card {
        border-radius: 14px;
    }
    .locale-home-card-price {
        font-size: 1.375rem;
    }
    .locale-home-card-body {
        padding: 0.875rem 0.875rem 1rem;
        gap: 0.5rem;
    }
    .locale-home-card-meta {
        font-size: 0.875rem;
        gap: 0.625rem;
    }
}
.locale-home-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 시드 PNG에만 zoom 적용 — 진짜 사진(webp/jpg)은 잘리지 않게 (R2 Iter 46) */
.locale-home-card-photo img[src$=".png"] {
    object-position: center top;
    transform: scale(1.35);
    transform-origin: center top;
}
.locale-home-card-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-elevated, #fafafa);
    color: var(--border-strong, #d4c8c0);
    font-size: 2rem;
}
.locale-home-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3125rem 0.75rem;
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.locale-home-card-body {
    padding: 1.125rem 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
/* ─────── 카드 폰트 강화 (R2 redesign — 가독성 우선) ─────── */
.locale-home-card-price {
    font-size: 1.5rem;      /* 24px — 가격 더 강조 */
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.locale-home-card-price-unit {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}
.locale-re-card-price-per-sqm {
    font-size: 0.9375rem;   /* 15px */
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: -0.125rem;
}
.locale-home-card-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    flex-wrap: wrap;
    align-items: center;
    line-height: 1.4;
}
.locale-home-card-meta i {
    color: var(--philgo-red-800);
    margin-right: 0.3125rem;
    font-size: 0.875rem;
}
.locale-home-card-location {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
    padding-top: 0.125rem;
}
.locale-home-card-location i {
    color: var(--philgo-red-800);
    font-size: 0.9375rem;
    flex-shrink: 0;
}

/* ─────── CTA 영역 (Iter 92 — flat 단순화) ─────── */
.locale-home-cta {
    margin-top: 2.5rem;
}
.locale-home-cta-card {
    background: var(--surface-card, #ffffff);
    color: var(--text-primary, #1a1a1a);
    border: 1px solid var(--border, #e5ddd9);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
}
@media (max-width: 768px) {
    .locale-home-cta-card { padding: 1.5rem 1rem; }
}
.locale-home-cta-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--philgo-red-800, #7a1d22);
}
.locale-home-cta-card h3 {
    margin: 0 0 0.375rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.01em;
}
@media (max-width: 768px) {
    .locale-home-cta-card h3 { font-size: 1.125rem; }
}
.locale-home-cta-card p {
    margin: 0 0 1.25rem;
    color: var(--text-secondary, #4a4a4a);
    font-size: 0.9375rem;
}
.locale-home-cta-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─────── 색상 변수 ─────── */
.locale-re-card-badge-s { background: #16a34a; }
.locale-re-card-badge-r { background: #525252; }  /* Rent - 슬레이트 (brand 충돌 회피) */
.locale-re-card-badge-t { background: #ea580c; }
