@charset "UTF-8";

/* 전체 스타일 */
:root {
    --main-color: #a39042; /* 금토끼 로고 배경색 기준 */
    --light-main-color: #c7b978; /* 연한 버전 */
    --very-light-main-color: #f0e8c9; /* 매우 연한 버전 */
    --dark-main-color: #7d6d32; /* 진한 버전 */
    --accent-color: #e38000; /* 강조색 */
    --dark-accent-color: #b36000; /* 진한 강조색 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px; /* 하단 네비게이션 공간 확보 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 버튼 공통 스타일 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--main-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--dark-main-color);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: var(--dark-accent-color);
}

/* 섹션 공통 스타일 */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 16px;
    color: #666;
}

/* 폼 요소 공통 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* 헤더 스타일 - 네비게이션 제거 */
header {
    background-color: var(--main-color);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: center; /* 중앙 정렬로 변경 */
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.logo-sub {
    font-size: 14px;
    color: #f1f1f1;
}

/* 기존 nav 스타일 제거 */
/* nav ul { display: none; } */

/* 하단 네비게이션 바 스타일 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px 0 5px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 5px 8px;
    transition: color 0.3s, transform 0.2s;
    border-radius: 8px;
    min-width: 50px;
    flex: 1;
    max-width: 80px;
}

.nav-item:hover {
    color: var(--main-color);
    transform: translateY(-2px);
}

.nav-item.active {
    color: var(--main-color);
    background-color: var(--very-light-main-color);
}

.nav-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* 환영 섹션 */
#welcome {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/images/building_image.png') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 60px 0;
}

#welcome h2 {
    font-size: 36px;
    margin-bottom: 20px;
    word-break: keep-all;
    white-space: normal;
    text-wrap: balance;
}

#welcome p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* 카드 기반 디자인 공통 스타일 */
.card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.card-padding {
    padding: 20px;
}

/* 그리드 레이아웃 공통 스타일 */
.grid-layout {
    display: grid;
    gap: 20px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* 기존 그리드 클래스 유지 (JavaScript 호환성) */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* 인사말 섹션 */
#greeting {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.greeting-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}

.profile-image {
    flex: 1;
    min-width: 200px;
    max-width: 300px; /* 사진 최대 폭 제한 */
}

.profile-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-info {
    flex: 2;
    min-width: 300px;
}

.profile-info h3 {
    font-size: 26px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

.highlight {
    color: var(--accent-color);
    font-weight: bold;
}

.career-item {
    margin-bottom: 25px;
}

.career-item h4 {
    font-size: 20px;
    color: #444;
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
}

.career-item h4:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

/* 경력 관련 내용 들여쓰기 */
.career-item p,
.career-item .list-bullet,
.career-item > div {
    margin-left: 20px;
}

.list-bullet {
    list-style: none;
    padding: 0;
}

.list-bullet li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    font-size: 16px;
    line-height: 1.5;
}

.list-bullet li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.year {
    font-weight: bold;
    color: #555;
    margin-right: 5px;
}

.indented-text {
    font-size: 16px;
    line-height: 1.5;
    margin-left: 20px; /* 들여쓰기 추가 */
}

/* 블로그 섹션 */
.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    white-space: normal;
}

.blog-summary {
    background: #fff;
    border: 1px solid #ffffff;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.blog-summary h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.blog-thumb {
    width: 100%;
    height: 150px;
    margin-bottom: 10px;
    border-radius: 8px;
    object-fit: cover;
}

.blog-summary p {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-summary a {
    margin-top: 10px;
    background-color: #e6b06a;
    color: white;
    padding: 4px 6px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    display: block;
}

.blog-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

/* 더보기 버튼 공통 스타일 */
.btn-load-more {
    display: block;
    width: 100%;
    margin: 10px auto 0;
    padding: 12px 30px;
    background-color: var(--main-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

.btn-load-more:hover {
    background-color: var(--dark-main-color);
}

/* 매물 섹션 */
#properties {
    background-color: var(--very-light-main-color);
}

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

.property-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-image {
    height: 200px;
    background-color: #e9e9e9;
    background-size: cover;
    background-position: center;
}

.property-info {
    padding: 20px;
}

.property-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.property-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 10px;
}

.property-address {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 13px;
}

.feature {
    font-size: 13px;
    color: #777;
}

/* ===== 카테고리 시스템 스타일 ===== */

/* 카테고리 그리드 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-content {
    padding: 25px;
    text-align: center;
}

.category-content h3 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.category-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.category-button {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.category-card:hover .category-button {
    background-color: var(--dark-accent-color);
}

/* 카테고리 모달 */
.category-modal {
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.category-modal .modal-header {
    text-align: center;
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #eee;
}

.category-modal .modal-title {
    font-size: 24px;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.category-modal .modal-description {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.category-modal .modal-close {
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-modal .modal-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
}

.modal-image-container {
    padding: 20px;
    text-align: center;
}

.modal-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #f5f5f5;
    background-image: url('/images/default-thumb.jpg');
}

.modal-image .image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-image:hover .image-overlay {
    opacity: 1;
}

.modal-property-info {
    padding: 0 20px 20px 20px;
}

.property-details {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: #555;
    flex: 0 0 120px;
}

.detail-value {
    color: #333;
    text-align: right;
    flex: 1;
    word-break: break-all;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-buttons .btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-contact { 
    background-color: #009688; 
}

.btn-contact:hover { 
    background-color: #00796b; 
}

.btn-detail { 
    background-color: #2962FF; 
}

.btn-detail:hover { 
    background-color: #1e4ed8; 
}

.btn-recomm { 
    background-color: #4CAF50; 
}

.btn-recomm:hover { 
    background-color: #388e3c; 
}

/* 이미지 로딩 실패 시 스타일 */
.modal-image.error {
    background-image: url('/images/default-thumb.jpg');
    background-color: #f0f0f0;
}

.modal-image.error::after {
    content: '이미지를 불러올 수 없습니다';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* 모달 스타일 */
.modal-background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: inherit !important;  /* ← 부모의 z-index 상속 */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    width: 70%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 8px;
    overflow: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;                                    /* ← 변경: white → #666 */
    background-color: rgba(255, 255, 255, 0.9);   /* ← 변경: 검은색 → 흰색 */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    z-index: 999;                                  /* ← 변경: 10000 → 999 (상대적) */
}

.modal-header {
    padding: 0;
}

.modal-image {
    height: 300px;
    background-size: cover;
    background-position: center;
}

.modal-body {
    padding: 30px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* 상담 모달 스타일 */
#consultModal .modal-content {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    overflow-y: auto;
    max-height: 90vh;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

/* 지도 섹션 */
.map-container {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    width: 100%;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.map-control-btn {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: white;
    border: none;
    border-radius: 4px;
    padding: 0 12px;
    height: 36px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.map-control-btn:hover {
    opacity: 1;
    background-color: #f8f8f8;
}

.map-control-btn .expand-icon,
.map-control-btn .collapse-icon {
    margin-right: 6px;
    font-size: 18px;
}

.map-control-btn .btn-text {
    font-weight: 500;
}

/* 전체화면 지도 - 낮은 우선순위로 변경 */
.map-container.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 5000 !important;  /* ← 기존 10000에서 5000으로 낮춤 */
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: white !important;
}

.map-container.fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    z-index: 1 !important;  /* 매우 낮게 설정 */
}

.map-control-btn {
    z-index: 5100 !important;  /* 전체화면 지도보다 약간 높게 */
}

/* 스크롤 방지 */
body.map-fullscreen {
    overflow: hidden !important;
}

body.modal-open {
    overflow: hidden !important;
}

/* AI 매물 검색 섹션 스타일 */
#ai-search {
    background-color: var(--very-light-main-color);
    padding: 60px 0;
}

.ai-search-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.ai-search-form, .ai-search-results {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.ai-search-results h3 {
    color: var(--main-color);
    margin-bottom: 20px;
    font-size: 22px;
}

.ai-loading {
    text-align: center;
    padding: 30px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.recommendation-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.recommendation-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.recommendation-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 10px;
}

.recommendation-price {
    font-weight: 700;
    margin-bottom: 10px;
}

.recommendation-reason {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.view-property-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--light-main-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.view-property-btn:hover {
    background-color: var(--main-color);
}

/* 검색 폼 공통 스타일 */
.search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.search-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.search-item input,
.search-item select {
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
}

.search-item input:focus,
.search-item select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.search-button, .reset-button {
    min-width: 150px;
    flex: 0 1 auto;
}

/* 검색 결과 지도 스타일 */
.search-map-container {
    width: 100% !important;
    position: relative !important;
    overflow: visible !important;
}

#searchResults {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-message {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #888;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* 로딩 애니메이션 */
.loading-message:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
    display: inline-block;
    width: 20px;
    text-align: left;
}

@keyframes dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}

.no-properties {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #888;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* 상담 섹션 */
#contact {
    background-color: #f9f9f9;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--main-color);
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-main-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

/* 위치 섹션 */
.office-details {
    display: flex;
    margin-bottom: 30px;
}

.office-image {
    width: 50%;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 30px;
}

.office-image img {
    width: 100%;
    height: auto;
    display: block;
}

.office-info {
    width: 50%;
}

.office-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--main-color);
}

.address-detail {
    margin-bottom: 20px;
}

.address-detail p {
    margin-bottom: 5px;
}

/* 부동산 관련 사이트 섹션 */
#real-estate-links {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.link-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    padding: 25px;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.link-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(227, 128, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.link-icon i {
    font-size: 28px;
    color: var(--accent-color);
}

.link-content {
    flex-grow: 1;
}

.link-content h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 5px 0;
}

.link-content p {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
}

.link-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.link-button:hover {
    background-color: var(--dark-accent-color);
}

/* 푸터 스타일 - 중앙정렬로 수정 */
footer {
    background-color: #333;
    color: white;
    padding: 50px 0 20px;
    text-align: center; /* 전체 푸터 중앙정렬 추가 */
}

.footer-content {
    display: flex;
    flex-direction: column; /* 세로 배치로 변경 */
    align-items: center; /* 중앙정렬 */
    gap: 30px;
    margin-bottom: 30px;
}

.footer-about {
    display: flex;
    flex-direction: column;
    align-items: center; /* 중앙정렬 */
    text-align: center; /* 텍스트 중앙정렬 */
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center; /* 로고 중앙정렬 */
}

.footer-logo img {
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

.footer-description {
    margin-bottom: 20px;
    color: #ccc;
    font-size: 14px;
    text-align: center; /* 설명 텍스트 중앙정렬 */
}

.social-icons {
    display: flex;
    justify-content: center; /* 소셜 아이콘 중앙정렬 */
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: #555;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px; /* 좌우 마진 조정 */
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: var(--light-main-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--light-main-color);
}

.footer-contact p {
    margin-bottom: 10px;
    color: #ccc;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* 기존 모바일 네비게이션 스타일 제거 */
.mobile-nav {
    display: none;
}

/* 반응형 스타일 */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    /* 헤더 조정 */
    .header-content {
        flex-direction: column;
    }
    
    /* 하단 네비게이션 조정 */
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 10px;
    }
    
    /* 인사말 섹션 - 프로필 이미지 크기 조정 */
    .greeting-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .profile-image {
        flex: none;
        width: 50%; /* 모바일 화면 폭의 절반 */
        max-width: 50vw; /* 뷰포트 폭의 50% */
        min-width: unset;
    }
    
    .profile-info {
        flex: none;
        width: 100%;
        min-width: unset;
    }
    
    .profile-info h3 {
        font-size: 22px;
        text-align: center;
    }

    /* 기타 모바일 스타일들 */
    .contact-container,
    .ai-search-container {
        grid-template-columns: 1fr;
    }
    
    .office-details {
        flex-direction: column;
    }
    
    .office-image, .office-info {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .footer-content {
        gap: 20px;
    }

    .footer-about {
        width: 100%;
    }
    
    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .search-buttons {
        flex-direction: column;
    }
    
    .search-button, .reset-button {
        width: 100%;
    }
    
    .map-container {
        height: 350px;
    }
    
    .search-map-container {
        height: 400px !important;
        min-height: 350px !important;
    }
    
    .search-map-container > div {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
    }
    
    .search-map-container iframe {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    /* 모바일에서 글씨 크기 증가 */
    .career-list li, 
    .tool-list li,
    .profile-info p {
        font-size: 18px;
    }
    
    .career-item h4 {
        font-size: 22px;
    }
    
    .link-card {
        padding: 20px;
    }
    
    .link-icon {
        width: 60px;
        height: 60px;
    }
    
    .link-icon i {
        font-size: 24px;
    }
    
    .link-content h3 {
        font-size: 20px;
    }
    
    .link-content p {
        font-size: 16px;
    }
    
    .link-button {
        font-size: 16px;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }

    /* 카테고리 시스템 모바일 스타일 */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        margin: 0 10px;
    }
    
    .category-modal {
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-image {
        height: 200px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .detail-label {
        flex: none;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .modal-image .image-overlay {
        opacity: 1;
    }
    
    .category-content h3 {
        font-size: 18px;
    }
    
    .category-content p {
        font-size: 16px;
    }
}

/* ===== 수정된 z-index 계층 구조 ===== */

/* 개인정보 동의 모달 - 최상위 */
#privacyModal {
    z-index: 60000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0,0,0,0.8) !important;
}

#privacyModal .modal-content {
    z-index: 60001 !important;
    position: relative !important;
}

/* 완료 모달 - 최상위 */
#completionModal {
    z-index: 60000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0,0,0,0.8) !important;
}

#completionModal .modal-content {
    z-index: 60001 !important;
    position: relative !important;
}

/* 상담 모달 */
#consultModal {
    z-index: 20000 !important;
}
#consultModal .modal-background {
    z-index: 20000 !important;
}
#consultModal .modal-content {
    z-index: 20001 !important;
    position: relative !important;
}
#consultModal .modal-close {
    z-index: 20002 !important;
}
/* 매물 상세 모달 - 동적으로 조정됨 */
#propertyDetailModal {
    z-index: 15000 !important;  /* 기본값 */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0,0,0,0.8) !important;
}

#propertyDetailModal .modal-content {
    z-index: inherit !important;  /* 부모로부터 상속 */
    position: relative !important;
}

#propertyDetailModal .modal-close {
    z-index: inherit !important;  /* 부모로부터 상속 */
}

/* 카테고리 모달 */
#categoryModal {
    z-index: 25000 !important;
}
#categoryModal .modal-background {
    z-index: 25000 !important;
}
#categoryModal .modal-content {
    z-index: 25001 !important;
    position: relative !important;
}
#categoryModal .modal-close {
    z-index: 25002 !important;
}

/* iframe z-index 명시적 설정 */
#map-iframe {
    z-index: 1 !important;  /* 매우 낮게 설정 */
}

.map-container.fullscreen #map-iframe {
    z-index: 1 !important;  /* 전체화면에서도 낮게 */
}

/* 추천매물 모달 배경 */
#modalBackground {
    z-index: 9900 !important;
}

/* 전체화면 상태에서 매물 모달이 보이도록 하는 특별 클래스 */
.map-container.fullscreen ~ #propertyDetailModal {
    z-index: 50000 !important;  /* 전체화면 상태에서 더 높게 */
}

/* PWA 환경 특별 처리 */
@media (display-mode: standalone) {
    #privacyModal,
    #completionModal {
        z-index: 2147483647 !important; /* 32비트 정수 최댓값 */
        isolation: isolate !important;
    }
    
    #privacyModal .modal-content,
    #completionModal .modal-content {
        z-index: 2147483647 !important;
        isolation: isolate !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
    }
}

/* PWA 환경 특별 처리 */
@media (display-mode: standalone) {
    #privacyModal,
    #completionModal {
        z-index: 2147483647 !important; /* 32비트 정수 최댓값 */
        isolation: isolate !important;
    }
    
    #privacyModal .modal-content,
    #completionModal .modal-content {
        z-index: 2147483647 !important;
        isolation: isolate !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
    }
    
    /* PWA에서 매물 상세 모달도 적절한 높이로 */
    #propertyDetailModal {
        z-index: 15000 !important;
    }
}

/* 강제 오버레이 스타일 */
.modal-overlay-force {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 399999 !important;
    background: rgba(0,0,0,0.5) !important;
    pointer-events: all !important;
    display: block !important;
}

/* 업데이트 알림 - 최상위 */
#update-notification {
    z-index: 70000 !important;
}

/* 오늘의 뉴스 섹션 */
#today-news {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* 데스크톱에서 5개가 잘 보이도록 조정 */
@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
    
    .news-card {
        max-width: 260px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: #e9ecef;
    display: block;
}

.news-thumbnail.clickable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.news-thumbnail.clickable:hover {
    transform: scale(1.05);
}

.news-thumbnail.placeholder {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
}

.news-thumbnail.placeholder.clickable:hover {
    background: linear-gradient(135deg, #d6d6d6 0%, #e9ecef 100%);
    color: #495057;
}

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    /* 표준 속성 추가 */
    line-clamp: 2;
}

.news-title:hover {
    color: #e38000;
}

.news-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.news-time {
    font-size: 12px;
    color: #999;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.news-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #e38000;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.news-link:hover {
    background-color: #cc7300;
    color: white;
    text-decoration: none;
}

#news-update-time {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    grid-column: 1 / -1;
}

.news-more {
    margin-top: 30px;
    text-align: center;
}

.news-more .btn-load-more {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--main-color);  /* #2962FF → var(--main-color) */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.news-more .btn-load-more:hover {
    background-color: var(--dark-main-color);  /* #1e4ba8 → var(--dark-main-color) */
    color: white;
    text-decoration: none;
}

/* 뉴스 카드 애니메이션 */
.news-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 뉴스 섹션 모바일 반응형 수정 */
@media (max-width: 768px) {
    #today-news {
        padding: 40px 0;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
        /* 모바일에서 좌우 여백 제거 */
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    .news-card {
        /* 모바일에서 카드 여백 조정 */
        margin: 0 5px;
        max-width: none;
        width: auto;
    }
    
    .news-thumbnail {
        /* 모바일에서 썸네일 높이 조정 */
        height: 140px;
        width: 100%;
        object-fit: cover;
    }
    
    .news-thumbnail.placeholder {
        height: 140px;
        width: 100%;
        font-size: 12px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-title {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .news-summary {
        font-size: 13px;
        line-height: 1.4;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 12px;
    }
    
    .news-meta {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .news-time {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .news-link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px 16px;
        font-size: 14px;
        box-sizing: border-box;
        /* 버튼이 카드 너비를 벗어나지 않도록 */
        max-width: 100%;
        margin: 0;
    }
    
    /* 컨테이너 패딩 조정 */
    #today-news .container {
        padding: 0 15px;
    }
    
    /* 뉴스 그리드 애니메이션 조정 */
    .news-card:nth-child(4) { 
        animation-delay: 0.4s; 
    }
    .news-card:nth-child(5) { 
        animation-delay: 0.5s; 
    }
}

/* 더 작은 모바일 화면 (360px 이하) */
@media (max-width: 360px) {
    .news-card {
        margin: 0 2px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-title {
        font-size: 14px;
    }
    
    .news-summary {
        font-size: 12px;
    }
    
    .news-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 가로 모드 최적화 */
@media (max-width: 768px) and (orientation: landscape) {
    .news-thumbnail,
    .news-thumbnail.placeholder {
        height: 120px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-summary {
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
}

/* 에러 상태 스타일 */
.news-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
    grid-column: 1 / -1;
}

.news-error h3 {
    margin-bottom: 10px;
    color: #721c24;
}

.news-error p {
    margin: 0;
    font-size: 14px;
}

/* 로딩 스켈레톤 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skeleton-thumbnail {
    width: 100%;
    height: 160px;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 10px;
}

.skeleton-summary {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-summary:last-child {
    width: 60%;
}