/*
 * mobile.css — itamra v15
 * ============================================================
 * 모든 프론트 페이지 공통 모바일 최적화 + 디자인 고도화
 * 모든 페이지에서 variables.css 다음에 로드됨
 * 브레이크포인트:
 *   768px  : 모바일 landscape / 소형 태블릿
 *   480px  : 모바일 portrait 기준
 *   360px  : 소형 스마트폰
 * ============================================================
 */

/* ════════════════════════════════════════════════════════════
   공통 페이지네이션 — 모든 프론트 페이지 공유
════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 8px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dde3ed;
  border-radius: 8px;
  background: #fff;
  color: #444;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1;
}

.page-btn:hover:not(:disabled) {
  background: #f0f4ff;
  border-color: #3b82f6;
  color: #3b82f6;
}

.page-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 700;
  pointer-events: none;
}

.page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.page-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  color: #aaa;
  font-size: 14px;
  user-select: none;
}

/* ════════════════════════════════════════════════════════════
   공통 사이트 푸터 — 모든 프론트 페이지 공유
════════════════════════════════════════════════════════════ */
.it-site-footer {
  background: #1e2330;
  color: rgba(255,255,255,.65);
  padding: 28px 20px 24px;
  margin-top: 48px;
}

.it-site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.it-site-footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.it-site-footer-links a {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  text-decoration: none;
}

.it-site-footer-links a:hover { color: #fff; }

.it-site-footer-info {
  font-size:13px;
  line-height: 1.8;
  margin: 0 0 8px;
}

.it-site-footer-info a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
}

.it-site-footer-copy {
  font-size:13px;
  color: rgba(255,255,255,.4);
  margin: 0;
}


/* ════════════════════════════════════════════════════════════
   0. 전역 기반 — 타이포·간격 정밀화
════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 터치 디바이스 탭 하이라이트 제거 */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* ════════════════════════════════════════════════════════════
   1. 3단 레이아웃 → 모바일 단일 컬럼
════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .left-ad,
  .right-ad {
    display: none !important;
  }

  .layout-container {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  .main-content {
    max-width: 100% !important;
    padding: 0 12px !important;
  }

  .main-layout {
    padding: 0 !important;
  }
}

/* [섹션2 포털헤더 → portal-header.css로 통합] */

/* ════════════════════════════════════════════════════════════
   3. 필터바 — 모바일 스크롤 방식
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 가로 스크롤 필터 (공통) */
  .filter-bar,
  .filter-section,
  .job-filter-bar,
  .re-filter-bar,
  .car-filter-bar {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px;
    gap: 6px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap !important;
  }

  .filter-bar::-webkit-scrollbar,
  .filter-section::-webkit-scrollbar { display: none; }

  /* 필터 그리드 → 2컬럼 */
  .filter-grid,
  .filter-grid-4,
  .filter-grid-5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .filter-select,
  select.filter-select {
    font-size: 13px;
    padding: 8px 10px;
    height: auto;
    min-height: 40px;
    border-radius: 8px;
  }

  /* 검색 인풋 */
  .search-input-wrap input,
  .filter-search input,
  input[type="search"] {
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .filter-grid,
  .filter-grid-4,
  .filter-grid-5 {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════════════
   4. 구인구직(jobs) 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 그리드 → 단일 컬럼 */
  .jobs-grid,
  .job-cards-grid,
  #regularJobsGrid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* 리스트 아이템 */
  .job-list-item {
    padding: 14px 14px !important;
    border-radius: 12px !important;
    border: 1px solid #eef0f5 !important;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    margin-bottom: 0;
  }

  .job-list-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-bottom: 6px !important;
  }

  .job-list-description {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .job-list-footer {
    margin-top: 10px !important;
    gap: 8px !important;
  }

  .job-list-specs {
    gap: 8px !important;
    flex-wrap: wrap;
  }

  .job-spec {
    font-size:13px !important;
  }

  .job-spec-label {
    font-size:13px !important;
    padding: 2px 5px !important;
  }

  /* 카드형 (큐레이션) */
  .job-card {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .job-card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .job-company {
    font-size:13px !important;
  }

  /* 통계 그리드 */
  .stats-section-header h2 {
    font-size: 17px !important;
  }

  .stats-grid-inner {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .stat-card {
    width: auto !important;
    height: auto !important;
    min-height: 80px !important;
    padding: 10px 6px !important;
    border-radius: 10px !important;
  }

  .stat-name {
    font-size:13px !important;
  }

  .stat-count {
    font-size: 18px !important;
  }

  /* 섹션 타이틀 */
  .section-title,
  .section-header h2 {
    font-size: 17px !important;
    font-weight: 700 !important;
  }

  /* 더보기 버튼 */
  #moreBtn,
  .more-btn {
    width: 100% !important;
    padding: 13px 20px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 480px) {
  .job-list-item {
    padding: 12px !important;
  }

  .stats-grid-inner {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ════════════════════════════════════════════════════════════
   5. 부동산(real-estate) 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .properties-grid-3,
  .properties-grid-2,
  .property-list-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* 카드형 */
  .property-card {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  }

  .property-card-img {
    height: 180px !important;
    object-fit: cover;
  }

  .property-card-body {
    padding: 12px 14px !important;
  }

  .property-card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  .property-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
  }

  /* 리스트형 */
  .property-list-item {
    border-radius: 12px !important;
    padding: 12px !important;
  }

  .property-list-content {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .property-list-img {
    width: 100% !important;
    height: 180px !important;
    border-radius: 8px !important;
    object-fit: cover;
  }

  .property-list-title {
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  .property-list-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
  }

  /* 필터 */
  .property-types-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .property-type-btn {
    padding: 8px 6px !important;
    font-size:13px !important;
    border-radius: 8px !important;
  }
}

@media (max-width: 480px) {
  .property-types-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .property-card-img { height: 160px !important; }
}

/* ════════════════════════════════════════════════════════════
   6. 중고차(used-cars) 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .cars-grid-3,
  .cars-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .car-card {
    border-radius: 14px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  }

  .car-card-img,
  .car-thumb {
    height: 200px !important;
    object-fit: cover;
  }

  .car-card-body {
    padding: 12px 14px !important;
  }

  .car-card-title,
  .car-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4;
  }

  .car-price,
  .car-list-price-value {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
  }

  .car-specs,
  .car-meta {
    gap: 6px !important;
    flex-wrap: wrap;
  }

  .car-spec-item,
  .car-meta-item {
    font-size:13px !important;
  }

  .filter-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .filter-grid-detail {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .car-card-img, .car-thumb { height: 170px !important; }
  .car-card-title, .car-name { font-size: 14px !important; }
}

/* ════════════════════════════════════════════════════════════
   7. 생활정보(life-info) 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .life-grid,
  .lifeinfo-grid,
  .life-info-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .life-card,
  .lifeinfo-card {
    border-radius: 12px !important;
    padding: 14px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.05) !important;
  }

  .life-card-title,
  .lifeinfo-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  .life-card-desc,
  .lifeinfo-desc {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
}

/* ════════════════════════════════════════════════════════════
   8. 보험/금융/상조 공통 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .insurance-grid,
  .finance-grid,
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .product-card,
  .insurance-card {
    border-radius: 12px !important;
    padding: 14px !important;
  }

  .product-name,
  .insurance-name {
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  .product-price-value {
    font-size: 16px !important;
    font-weight: 700 !important;
  }

  .tab-btn {
    padding: 10px 10px !important;
    font-size: 13px !important;
  }

  .tab-label { display: inline !important; }
}

@media (max-width: 480px) {
  .tab-btn { padding: 10px 8px !important; font-size:13px !important; }
  .tab-label { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   9. 상세 페이지 공통 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 상세 이미지 갤러리 */
  .detail-gallery,
  .detail-img-wrap {
    border-radius: 12px !important;
    overflow: hidden;
  }

  .detail-main-img {
    width: 100% !important;
    max-height: 260px !important;
    object-fit: cover !important;
  }

  /* 상세 본문 영역 */
  .detail-content-wrap,
  .detail-body {
    padding: 14px !important;
    gap: 16px !important;
  }

  .detail-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  .detail-price,
  .detail-price-main {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
  }

  /* 정보 테이블 */
  .detail-info-table {
    font-size: 13px !important;
  }

  .detail-info-table th,
  .detail-info-table td {
    padding: 10px 10px !important;
    font-size: 13px !important;
  }

  /* CTA 버튼 */
  .detail-cta-wrap {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    padding: 12px 16px env(safe-area-inset-bottom, 12px) !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,.1) !important;
    z-index: 100 !important;
    display: flex !important;
    gap: 8px !important;
  }

  .detail-cta-btn,
  .btn-contact,
  .btn-apply {
    flex: 1 !important;
    padding: 13px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    min-height: 48px !important;
  }

  /* 관련 매물 */
  .related-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .detail-title { font-size: 16px !important; }
  .detail-price { font-size: 20px !important; }
  .related-grid { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════════════
   10. 홈 페이지 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .home-hero,
  .hero-section {
    padding: 24px 16px !important;
    min-height: auto !important;
  }

  .home-hero-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
  }

  .home-hero-subtitle {
    font-size: 14px !important;
    margin-top: 8px !important;
  }

  .home-section-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 0 16px !important;
    margin-bottom: 12px !important;
  }

  .home-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 0 12px !important;
  }

  .home-cat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 0 12px !important;
  }
}

@media (max-width: 480px) {
  .home-cards-grid { grid-template-columns: 1fr !important; }
  .home-cat-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ════════════════════════════════════════════════════════════
   11. 마이페이지 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 기업 마이페이지 레이아웃 */
  .mypage-layout,
  .corp-layout {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .mypage-sidebar,
  .corp-sidebar {
    width: 100% !important;
    position: static !important;
    border-right: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }

  /* 탭 네비 */
  .mypage-tabs,
  .tab-nav {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
    gap: 0 !important;
    border-bottom: 2px solid #f0f0f0 !important;
    padding: 0 8px !important;
  }

  .mypage-tabs::-webkit-scrollbar,
  .tab-nav::-webkit-scrollbar { display: none; }

  .tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .mypage-content,
  .corp-content {
    padding: 16px 12px !important;
  }

  /* 컨텐츠 카드 */
  .content-card {
    padding: 16px !important;
    border-radius: 12px !important;
  }

  .content-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
  }
}

/* ════════════════════════════════════════════════════════════
   12. 로그인/회원가입 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .login-wrap,
  .signup-wrap,
  .auth-card {
    padding: 28px 20px !important;
    border-radius: 16px !important;
    margin: 16px !important;
  }

  .auth-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
  }

  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"] {
    font-size: 15px !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    min-height: 48px !important;
  }

  .btn-primary,
  .btn-submit {
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 14px 20px !important;
    border-radius: 10px !important;
    min-height: 50px !important;
    width: 100% !important;
  }
}

/* ════════════════════════════════════════════════════════════
   13. 공통 컴포넌트 모바일 정밀화
════════════════════════════════════════════════════════════ */

/* 배지/태그 */
@media (max-width: 768px) {
  .badge,
  .tag,
  .chip {
    font-size:13px !important;
    padding: 3px 7px !important;
    border-radius: 5px !important;
  }

  /* 페이지네이션 */
  .pagination,
  .pager {
    gap: 4px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .pagination a,
  .pagination button,
  .page-btn {
    min-width: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }

  /* 빈 상태 메시지 */
  .empty-state {
    padding: 32px 16px !important;
    font-size: 14px !important;
  }

  /* 하단 여백 (고정 CTA 버튼 공간) */
  .bottom-spacing {
    height: 80px !important;
  }
}

/* ════════════════════════════════════════════════════════════
   14. 드롭다운 메뉴 모바일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .user-dropdown,
  .it-user-dropdown {
    right: 0 !important;
    left: auto !important;
    width: 88vw !important;
    max-width: 320px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.15) !important;
  }

  .filter-menu,
  .dropdown-menu {
    min-width: 160px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
  }

  .filter-option,
  .dropdown-item {
    padding: 11px 14px !important;
    font-size: 14px !important;
  }
}

/* ════════════════════════════════════════════════════════════
   15. 타이포그래피 모바일 스케일
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 섹션 제목 */
  h1, .h1 { font-size: clamp(20px, 5vw, 28px) !important; }
  h2, .h2 { font-size: clamp(17px, 4.5vw, 22px) !important; }
  h3, .h3 { font-size: clamp(15px, 4vw, 18px) !important; }

  /* 본문 */
  p, .body-text { font-size: 14px !important; line-height: 1.65 !important; }

  /* 작은 텍스트 */
  .text-sm, .small, small { font-size:13px !important; }
  .text-xs { font-size:13px !important; }
}

/* ════════════════════════════════════════════════════════════
   16. Safe Area Inset (iPhone 노치/홈바 대응)
════════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .detail-cta-wrap,
  .mobile-fixed-bottom {
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
}

/* ════════════════════════════════════════════════════════════
   17. 모바일 스크롤 성능 최적화
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .it-portal-cat-bar,
  .filter-bar,
  .tab-nav,
  .mypage-tabs {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  /* 이미지 레이지로딩 블러 효과 */
  img[loading="lazy"] {
    transition: opacity .3s;
  }
}

/* ════════════════════════════════════════════════════════════
   18. sticky 헤더 보호 — overflow 충돌 방지 (v15)
════════════════════════════════════════════════════════════ */
/*
 * html 또는 portal-wrap에 overflow:hidden이 있으면
 * position:sticky가 작동하지 않음 (CSS 명세)
 * customs.css / life-info.css의 중복 선언을 무효화
 */
html {
  overflow-x: clip; /* hidden 대신 clip — sticky를 깨지 않음 */
}

.portal-wrap,
.site-wrap {
  overflow-x: clip;
  /* overflow-x:hidden 대신 clip — sticky context 유지 */
}

/* 가로 스크롤 발생 원인이 되는 요소 제한 */
.main-layout,
.layout-container,
.main-content {
  max-width: 100%;
  overflow-x: clip;
}

/* ════════════════════════════════════════════════════════════
   19. [FIX] 생활정보 상세 — 카카오 문의 버튼 모바일 스타일
       테스트 결과: "카카오 문의 스타일 깨짐" (모바일 갤럭시 점프)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* CTA 공통 버튼 — 생활정보 상세 페이지 */
  .cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    min-height: 46px !important;
    flex: 1 1 auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 카카오 버튼 */
  .cta-btn.cta-kakao,
  .cta-kakao {
    background: #FEE500 !important;
    color: #3C1E1E !important;
    border: none !important;
  }

  /* 전화 문의 */
  .cta-btn.cta-outline {
    background: #fff !important;
    color: var(--color-primary, #0027A6) !important;
    border: 1.5px solid var(--color-primary, #0027A6) !important;
  }

  /* 기본(파랑) */
  .cta-btn.cta-primary {
    background: var(--color-primary, #0027A6) !important;
    color: #fff !important;
  }

  /* CTA 행 — 버튼들이 가로로 흘러넘치지 않게 */
  .cta-row,
  .detail-cta-wrap,
  [class*="cta-row"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  /* 초소형 화면: 버튼 세로 쌓기 */
  .cta-row,
  .detail-cta-wrap {
    flex-direction: column !important;
  }

  .cta-btn {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ════════════════════════════════════════════════════════════
   20. [FIX] 부동산 상세 — 주변시설·카카오맵·도로명 주소 스타일
       테스트 결과: "주변시설, 카카오맵, 도로명 주소 스타일 깨짐" (모바일 갤럭시 점프)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 지도 컨테이너 */
  .map-container,
  #dp-map-container,
  [id*="map-container"] {
    height: 220px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  /* 지도 플레이스홀더 텍스트 */
  #dp-map-address,
  .map-address,
  [id*="map-address"] {
    font-size: 13px !important;
    line-height: 1.5 !important;
    word-break: keep-all !important;
    padding: 10px 14px !important;
  }

  #dp-map-summary,
  .map-summary,
  [id*="map-summary"] {
    font-size:13px !important;
    color: var(--color-gray-500, #666) !important;
    padding: 4px 14px 10px !important;
    word-break: keep-all !important;
  }

  /* 도로명 주소 행 */
  .road-address-row,
  [class*="road-address"] {
    font-size: 13px !important;
    word-break: keep-all !important;
    line-height: 1.6 !important;
  }

  /* 주변시설 컨테이너 */
  #dp-facilities,
  .facilities-grid,
  [id*="facilities"] {
    display: block !important;
    width: 100% !important;
  }

  /* 주변시설 카드 내 안내 메시지 */
  .re-empty-card {
    padding: 14px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    background: var(--color-gray-50, #fafafa) !important;
    color: var(--color-gray-500, #666) !important;
    text-align: center !important;
    word-break: keep-all !important;
  }

  /* 시설 그리드 — 4열 → 2열 */
  .facilities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .facility-item {
    padding: 10px 8px !important;
    font-size:13px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 480px) {
  .map-container,
  #dp-map-container {
    height: 180px !important;
  }

  .facilities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
