/* =========================================
   1. 변수 및 기본 설정 (Reset & Variables)
   ========================================= */
:root {
    --primary: #2563EB;       /* 메인 블루 */
    --primary-dark: #1E40AF;  /* 진한 블루 (호버용) */
    --secondary: #64748B;     /* 서브 그레이 */
    --bg-light: #F8FAFC;      /* 배경색 */
    --white: #FFFFFF;         /* 흰색 */
    --text-dark: #1E293B;     /* 본문 텍스트 */
    --text-gray: #64748B;     /* 보조 텍스트 */
    --border: #E2E8F0;        /* 테두리 */
    --accent-red: #DC2626;    /* 강조색 (요금 등) */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* [브랜드 히어로 섹션 스타일] */
.hero-brand {
    /* 기존 스타일 유지 */
    background: linear-gradient(rgba(37, 99, 235, 0.85), rgba(30, 64, 175, 0.9)), 
                url('https://source.unsplash.com/1600x900/?city,traffic,road') no-repeat center/cover;
    color: var(--white);
    padding: 6rem 1rem 8rem;
    text-align: center;
    position: relative;
    margin-bottom: 3rem;

    /* ▼▼▼ 여기부터 추가/수정하세요 (핵심) ▼▼▼ */
    width: 100vw;               /* 화면 전체 너비로 강제 설정 */
    margin-left: calc(-50vw + 50%);  /* 왼쪽으로 화면 끝까지 당김 */
    margin-right: calc(-50vw + 50%); /* 오른쪽으로 화면 끝까지 당김 */
    max-width: none;            /* 부모의 max-width 무시 */
    border-radius: 0;           /* 모서리 둥글게 제거 */
    box-sizing: border-box;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
    letter-spacing: 1px;
}

.hero-brand h1 {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 6px rgba(0,0,0,0.1);
    word-break: keep-all;
}

.hero-brand p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    font-weight: 300;
    word-break: keep-all;
}

/* 버튼 그룹 */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-hero-primary {
    background-color: var(--white);
    color: var(--primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background-color: #f8fafc;
}

.btn-hero-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.6);
    padding: 1rem 2rem;
    border-radius: 3rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.btn-hero-secondary:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* 하단 통계 띠배너 */
.hero-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px); /* 블러 효과 */
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
}

.stat-item {
    text-align: center;
    padding: 0 3rem;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.stat-value small { font-size: 0.9rem; font-weight: 400; opacity: 0.8; margin-left: 2px; }

.stat-divider {
    width: 1px;
    height: 30px;
    background-color: rgba(255,255,255,0.2);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .hero-brand h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
    .hero-stats { display: none; /* 모바일에서는 공간 부족으로 숨김 */ }
    .hero-brand { padding-bottom: 5rem; }
}
/* =========================================
   2. 헤더 (Header)
   ========================================= */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    font-weight: 500;
}

.nav-menu a:hover { color: var(--primary); }

.auth-buttons button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dark);
}

.btn-signup {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: var(--white);
    margin-left: 0.5rem;
}

.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; }


/* =========================================
   3. 히어로 섹션 & 공통 검색창 (Hero & Search)
   ========================================= */
.hero {
    background: linear-gradient(rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.9)), url('https://source.unsplash.com/1600x900/?car,road') no-repeat center/cover;
    color: var(--white);
    padding: 5rem 1rem;
    text-align: center;
}

.hero h1 { font-size: 2.0rem; margin-bottom: 1rem; word-break: keep-all; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

/* 공통 검색창 스타일 */
.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: var(--white);
    border-radius: 3rem;
    padding: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 3rem;
    outline: none;
}

.search-box button {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}


/* =========================================
   4. 레이아웃 & 공통 컴포넌트 (Layout & Components)
   ========================================= */
/* 메인 페이지용 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 서브 페이지(리스트/상세)용 컨테이너 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 80vh;
}

/* 섹션 타이틀 */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title::before {
    content: '';
    display: block;
    width: 5px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 2px;
}
/* 상세페이지 내부 섹션 소제목용 스타일 (약간 작게) */
.detail-section .section-title {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    padding-left: 0.8rem;
    border-left: 4px solid var(--primary);
}
.detail-section .section-title::before { display: none; } /* 기존 before 제거 */

/* 배지 (Badges) */
.badge-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px; /* 통일감을 위해 4px로 조정 */
    font-weight: 600;
}
.badge-blue { background: #EFF6FF; color: var(--primary); }
.badge-gray { background: #F1F5F9; color: var(--text-gray); }

/* 버튼 (상세페이지 등에서 사용) */
.btn-search { /* 길찾기 등의 버튼용 클래스 */
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-search:hover { background-color: var(--primary-dark); }


/* =========================================
   5. 메인 페이지 전용 (Landing Page)
   ========================================= */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.service-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.icon-box {
    width: 50px;
    height: 50px;
    background-color: #EFF6FF;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 1.5rem; flex: 1; word-break: keep-all; }

/* 커뮤니티 섹션 */
.community-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.post-list, .side-widget {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.side-widget { height: fit-content; }

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-title { font-weight: 500; cursor: pointer; }
.post-title:hover { text-decoration: underline; }
.post-meta { font-size: 0.85rem; color: var(--text-gray); display: flex; gap: 1rem; }

.rank-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.rank-num {
    background-color: var(--primary);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}


/* =========================================
   6. 리스트 페이지 전용 (List Page)
   ========================================= */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.parking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.parking-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.parking-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.card-badges { margin-bottom: 0.8rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-dark); }
.card-addr { font-size: 0.9rem; color: var(--text-gray); margin-bottom: 1rem; display: flex; align-items: flex-start; gap: 0.4rem; }

.card-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem; 
    border-top: 1px solid #F1F5F9;
    padding-top: 0.8rem;
    margin-top: auto;
}
.price-highlight { font-weight: 700; color: var(--text-dark); }


/* =========================================
   7. 상세 페이지 전용 (Detail Page)
   ========================================= */
.detail-header {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.detail-title h1 { font-size: 1.8rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.detail-meta { color: var(--text-gray); font-size: 0.95rem; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.detail-section { background: var(--white); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }

/* 정보 테이블 */
.info-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.info-table th { width: 30%; text-align: left; padding: 0.8rem; background: #F8FAFC; color: var(--text-gray); font-weight: 500; border-bottom: 1px solid var(--border); }
.info-table td { padding: 0.8rem; border-bottom: 1px solid var(--border); color: var(--text-dark); }
.fee-emphasis { color: var(--accent-red); font-weight: 700; font-size: 1.1rem; }

/* 지도 및 사이드 정보 */
.map-box { 
    width: 100%; 
    height: 250px; 
    background: #E2E8F0; 
    border-radius: 0.5rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 1rem; 
}
.side-info-item { margin-bottom: 1rem; font-size: 0.95rem; }
.side-label { display: block; color: var(--text-gray); font-size: 0.85rem; margin-bottom: 0.2rem; }


/* =========================================
   8. 푸터 (Footer)
   ========================================= */
footer {
    background-color: #1E293B;
    color: #94A3B8;
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-logo { color: var(--white); font-size: 1.2rem; font-weight: bold; margin-bottom: 1rem; display: block; }
.footer-links h4 { color: var(--white); margin-bottom: 1rem; }
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links ul li a:hover { color: var(--white); }

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    font-size: 0.85rem;
}


/* =========================================
   9. 반응형 설정 (Responsive)
   ========================================= */
@media (max-width: 768px) {
    /* 헤더 */
    .nav-menu, .auth-buttons { display: none; }
    .mobile-menu-btn { display: block; }
    
    /* 히어로 */
    .hero h1 { font-size: 1.8rem; }
    
    /* 레이아웃 */
    .community-section { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-header { flex-direction: column; }
}