/* 지도 섹션 */
.map-section { padding: 0px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #444; }
.map-header { text-align: center; margin-bottom: 15px; }
.map-title { color: black; font-size: 18px; margin-bottom: 5px; font-weight: 500; }
.map-subtitle { color: #747474; font-size: 14px; }
#map { height: 200px !important; width: 100% !important; border-radius: 4px; border: 1px solid #555; min-height: 200px; background: #333; display: flex; align-items: center; justify-content: center; color: #666; font-size: 16px; }

/* 인근 업체 섹션 */
.nearby-section { background: #2a2a2a; padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #444; }
.nearby-header { text-align: center; margin-bottom: 15px; }
.nearby-title { color: #fff; font-size: 18px; margin-bottom: 5px; font-weight: 500; }
.nearby-places-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
.nearby-place { background: #333; border-radius: 4px; padding: 15px; transition: all 0.2s ease; }
.nearby-place:hover { background: #404040; border-color: #555; }
.nearby-place-name { font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.nearby-place-distance { color: #ec9f19; font-size: 13px; margin-bottom: 3px; }
.nearby-place-comments { color: #aaa; font-size: 12px; margin-bottom: 3px; }
.nearby-place-address { color: #bbb; font-size: 12px; line-height: 1.4; }

/* 리뷰 섹션 */
.reviews-section { background: #121212; padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #444; }
.reviews-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.reviews-title { color: #fff; font-size: 18px; margin: 0; font-weight: 500; }
.reviews-count { color: #bbb; font-size: 14px; }
.sort-controls { display: flex; gap: 10px; }
.sort-button { background: #333; color: #e0e0e0; padding: 6px 12px; border-radius: 4px; font-size: 13px; border: 1px solid #444; cursor: pointer; transition: all 0.2s ease; }
.sort-button:hover, .sort-button.active { background: #404040; color: white; }
.more-button { text-align: center; margin-top: 15px; }

/* 정보 카드 */
.place-info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 30px auto; max-width: 1200px; }
.info-card { background: #2a2a2a; border-radius: 12px; overflow: hidden; border: 1px solid #444; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; position: relative; }
.info-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); border-color: #555; }
.card-header { background: linear-gradient(135deg, #333 0%, #404040 100%); padding: 16px 20px; border-bottom: 1px solid #555; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; }
.card-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #ec9f19, #bd7f14); }
.card-header h3 { margin: 0; color: #fff; font-size: 18px; font-weight: 600; flex: 1; }
.card-content { padding: 20px; color: #e0e0e0; line-height: 1.6; font-size: 15px; min-height: 60px; }
.card-content p { margin: 0 0 5px 0; }
.card-content p:last-child { margin-bottom: 0; }

/* 히어로 섹션 */
.place-hero { background: #2a2a2a; color: white; padding: 30px 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #444; }
.place-hero-content { max-width: 1200px; margin: 0 auto; }
.place-title { font-size: 28px; font-weight: 600; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.place-category { background: #444; padding: 4px 12px; border-radius: 4px; font-size: 12px; border: 1px solid #555; }
.place-address { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: #bbb; font-weight: 400; line-height: 1.4; margin: 8px 0; flex-wrap: wrap; }
.place-tel { font-size: 14px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }

/* 필터 섹션 */
.filter-section { background: #2a2a2a; padding: 20px; border-radius: 10px; margin-bottom: 20px; text-align: center; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.filter-button { padding: 8px 16px; background: #404040; color: #e0e0e0; text-decoration: none; border-radius: 20px; font-size: 13px; transition: all 0.3s ease; border: 1px solid #555; }
.filter-button:hover { background: #555; color: white; transform: translateY(-2px); }
.filter-button.active { background: #667eea; color: white; border-color: #667eea; }

/* 컨트롤 섹션 */
.controls-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; background: #2a2a2a; padding: 20px; border-radius: 10px; }
.region-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.region-button { padding: 6px 12px; background: #404040; color: #e0e0e0; text-decoration: none; border-radius: 15px; font-size: 12px; transition: all 0.3s ease; border: 1px solid #555; }
.region-button:hover { background: #555; color: white; }
.region-button.active { background: #667eea; color: white; border-color: #667eea; }

/* 기본 통계 컴포넌트 */
.place-stats { display: flex; justify-content: space-around; align-items: center; padding: 15px 20px; background: #2a2a2a; border: 1px solid #444; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); border-radius: 8px; margin: 15px 0; flex-wrap: wrap; gap: 15px; }
.stat-item { text-align: center; font-weight: 600; color: #e0e0e0; white-space: nowrap; padding: 8px 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid #555; transition: all 0.2s ease; }
.place-stats .stat-item:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); border-color: #666; }

/* 페이지네이션 */
.pagination { display: flex; justify-content: center; gap: 10px; margin: 40px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 12px 18px; background: #2a2a2a; color: #e0e0e0; text-decoration: none; border-radius: 10px; border: 1px solid #444; transition: all 0.3s ease; font-weight: 500; }
.pagination a:hover { background: #404040; color: white; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.pagination .current { background: #f5576c; color: white; border-color: #f5576c; box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4); }

/* 반응형 레이아웃 - 데스크탑 */
.place-image-section-wrapper { width: 100%; margin-bottom: 20px; }
@media (min-width: 769px) {
    .place-image-section-wrapper { grid-column: 1; margin: 0; display: flex; flex-direction: column; }
    .place-image-section { flex: 1; padding: 20px 15px; background: #f8f9fa; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: flex; flex-direction: column; min-height: 400px; }
    .desktop-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; max-width: 1200px; margin-left: auto; margin-right: auto; align-items: stretch; }
    .place-image-section-wrapper { grid-column: 1; }
    .map-section { grid-column: 2; margin: 0; background: white; display: flex; flex-direction: column; }
    #map { flex: 1; width: 100%; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); min-height: 400px; }
}

/* 업체 이미지 갤러리 */
.place-image-section { margin: 0 auto; max-width: 600px; padding: 20px 15px; background: #f8f9fa; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.place-image-container { position: relative; margin-bottom: 15px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.place-main-image { width: 100%; max-height: 400px; object-fit: cover; display: block; transition: transform 0.3s ease; cursor: pointer; }
.place-main-image:hover { transform: scale(1.02); }
.image-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white; padding: 15px; text-align: center; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.place-image-container:hover .image-overlay { opacity: 1; }
.zoom-icon { font-size: 20px; margin-right: 8px; }
.additional-images-container { border-top: 2px solid #e9ecef; padding-top: 15px; }
.additional-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; max-width: 600px; }
.additional-image-item { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; background: white; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.additional-image-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.additional-image-thumb { width: 100px; height: 100px; object-fit: cover; display: block; transition: opacity 0.2s ease; cursor: pointer; }
.thumb-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); color: white; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; }
.additional-image-item:hover .thumb-overlay { opacity: 1; }
.zoom-icon-small { font-size: 16px; }
.thumb-description { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; padding: 8px 6px 4px; font-size: 10px; line-height: 1.2; text-align: center; transform: translateY(100%); transition: transform 0.2s ease; }
.additional-image-item:hover .thumb-description { transform: translateY(0); }

/* 반응형 스타일 */
@media (max-width: 768px) {
    .nearby-section, .reviews-section { padding: 15px; margin: 0 5px 15px 5px; }
    .map-section { padding: 0px; margin: 0 5px 15px 5px;}
    #map { height: 230px !important; }
    .nearby-places-grid { grid-template-columns: 1fr; gap: 10px; }
    .reviews-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .sort-controls { width: 100%; justify-content: right; }
    .place-title { font-size: 24px; gap: 12px; margin-bottom: 12px; }
    .filter-section { padding: 15px; margin-bottom: 15px; }
    .filter-buttons { gap: 8px; }
    .filter-button { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
    .controls-section { flex-direction: column; align-items: stretch; padding: 15px; gap: 12px; }
    .region-filter { justify-content: center; gap: 6px; }
    .region-button { padding: 5px 10px; font-size: 11px; }
    .pagination { gap: 8px; margin: 30px 0; }
    .pagination a, .pagination span { padding: 10px 14px; font-size: 14px; }
    .place-image-section-wrapper { margin: 15px 0; }
    .place-image-section { align-items: center; margin: 0 5px; max-width: none; padding: 15px; }
    .additional-images-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
    .additional-image-thumb { width: 80px; height: 80px; }
    .place-main-image { max-height: 250px; }
    .thumb-description { font-size: 9px; padding: 6px 4px 3px; }
    .place-stats { flex-direction: column; gap: 10px; padding: 12px 15px; }
    .place-stats .stat-item { font-size: 0.9rem; width: 100%; max-width: 250px; }
    .place-address { font-size: 0.9rem; flex-direction: column; align-items: flex-start; gap: 4px; }
    .business-closed-banner { margin: 10px; padding: 12px 15px; border-radius: 8px; }
    .closed-text { font-size: 1em; }
    .closed-subtext { font-size: 0.85em; }
}

@media (max-width: 500px) {
    .nearby-section, .reviews-section { padding: 12px; margin: 0 3px 12px 3px; }
    .map-section { padding: 0px; margin: 0 3px 12px 3px; }
}

@media (max-width: 480px) {
    .place-title { font-size: 20px; gap: 10px; margin-bottom: 10px; justify-content: center; text-align: center; }
    .filter-section { padding: 12px; border-radius: 8px; }
    .filter-buttons { gap: 6px; padding: 0 5px; }
    .filter-button { padding: 5px 10px; font-size: 11px; border-radius: 15px; }
    .filter-button:hover { transform: none; }
    .controls-section { padding: 12px; border-radius: 8px; gap: 10px; }
    .region-filter { gap: 5px; }
    .region-button { padding: 4px 8px; font-size: 10px; border-radius: 12px; }
    .region-button:hover { transform: none; }
    .pagination { gap: 6px; margin: 25px 0; }
    .pagination a, .pagination span { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
    .pagination a:hover { transform: none; }
    .additional-images-grid { grid-template-columns: repeat(4, 1fr); }
    .additional-image-thumb { width: 70px; height: 70px; }
    .place-stats { gap: 8px; padding: 10px 12px; margin: 10px 5px; }
    .place-stats .stat-item { font-size: 0.85rem; padding: 6px 10px; width: 100%; }
    .place-address { font-size: 0.85rem; flex-direction: column; align-items: flex-start; gap: 3px; margin: 6px 0; }
}

@media (max-width: 320px) {
    .place-title { font-size: 18px; gap: 8px; margin-bottom: 8px; flex-direction: column; text-align: center; }
    .filter-section { padding: 10px; margin-bottom: 12px; }
    .filter-buttons { gap: 4px; }
    .filter-button { padding: 4px 8px; font-size: 10px; min-width: 40px; text-align: center; }
    .controls-section { padding: 10px; }
    .region-filter { gap: 4px; }
    .region-button { padding: 3px 6px; font-size: 9px; min-width: 30px; text-align: center; }
    .pagination { gap: 4px; margin: 20px 0; }
    .pagination a, .pagination span { padding: 6px 10px; font-size: 12px; min-width: 32px; }
}

/* 터치 기기 최적화 */
@media (hover: none) and (pointer: coarse) {
    .filter-button:hover, .region-button:hover { transform: none; background: #404040; }
    .filter-button:active, .region-button:active { background: #555; transform: scale(0.95); }
    .pagination a:hover { transform: none; }
    .pagination a:active { transform: scale(0.95); background: #404040; }
}

/* 반응형 폰트 크기 */
@media (min-width: 1200px) {
    .stat-item { font-size: 1.2rem; }
    .place-stats .stat-item { font-size: 1.1rem; }
    .place-address { font-size: 1rem; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .stat-item { font-size: 1rem; }
    .place-stats .stat-item { font-size: 1rem; }
    .place-address { font-size: 0.95rem; }
}

/* 폐업 알림 배너 */
.business-closed-banner { background: linear-gradient(135deg, #dc2626, #b91c1c); color: white; padding: 15px 20px; margin: 15px auto; max-width: 800px; border-radius: 12px; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); text-align: center; font-weight: 600; border: 2px solid #fecaca; position: relative; overflow: hidden; }
.business-closed-banner::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 3s infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }
.closed-icon { font-size: 1.2em; margin-right: 8px; }
.closed-text { font-size: 1.1em; }
.closed-subtext { font-size: 0.9em; opacity: 0.9; margin-top: 5px; }
.closed-location-marker { filter: grayscale(100%) brightness(0.7); opacity: 0.8; }
.nearby-place-link { text-decoration: none !important; }

/* CSS clamp() 방식 */
.stat-item-clamp { font-size: clamp(0.8rem, 2.5vw, 1.2rem); }
.place-stats.responsive .stat-item { font-size: clamp(0.85rem, 2.2vw, 1.1rem); }
.place-address.responsive { font-size: clamp(0.85rem, 2vw, 1rem); }