/* 기본 설정 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #1273E4;
}

/* 헤더 */
header {
    background-color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative; 
    z-index: 20; 
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    color: #1273E4;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-right: 25px;
}

nav ul li a {
    color: #555;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #1273E4;
}

.auth-buttons {
    display: flex;
    align-items: center;
}

.user-welcome {
    margin-right: 15px;
    color: #555;
    font-weight: 500;
}

.btn-login {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background-color: #d0d0d0;
}

.btn-signup {
    background-color: #1273E4;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-signup:hover {
    background-color: #0d5bb5;
}

.btn-logout {
    background-color: #dc3545;
}

.btn-logout:hover {
    background-color: #c82333;
}


/* 히어로 섹션 (이미지 부드러운 전환을 위한 구조 및 최종 오류 수정) */
.hero {
    height: 450px;
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative; 
    /* [CRITICAL FIX] 검색창 잘림 방지를 위해 visible로 변경 */
    overflow: visible; 
    margin-bottom: 60px; 
    transition: all 0.5s ease; 
}

/* JS가 생성할 배경 이미지 요소를 위한 스타일 */
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out; 
    z-index: 1; 
}

/* 이미지 위에 어두운 오버레이 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35); /* 오버레이 */
    z-index: 2; 
}

.hero h1, .hero p, .search-container { 
    z-index: 3; 
}

.hero h1 { 
    font-size: 48px; 
    margin-bottom: 10px; 
    text-shadow: 0 0 12px rgba(0,0,0,0.9); 
}

.hero p { 
    font-size: 20px; 
    opacity: 0.95; 
    text-shadow: 0 0 10px rgba(0,0,0,0.8); 
}

/* 검색창 */
.search-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 25px 30px;
    display: flex;
    gap: 15px;
    align-items: center;
    position: absolute; 
    bottom: -60px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 10;
}

.search-group {
    display: flex;
    flex-direction: column;
}

.search-group label {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
    font-weight: 600;
}

.search-group input {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    width: 160px; 
}

.search-btn {
    background-color: #1273E4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background-color: #0d5bb5;
}

/* 추천 카라반 섹션 */
.recommendation {
    max-width: 1200px;
    margin: 80px auto 40px auto; 
    padding: 20px;
}

.recommendation h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.caravan-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.caravan-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.caravan-card img {
    width: 100%;
    height: 200px;
    /* [수정 완료] 이미지가 잘리지 않고 카드를 꽉 채우도록 설정 */
    object-fit: cover; 
    display: block;
}

.card-info {
    padding: 18px;
}

.card-info h3 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
}

.card-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.card-info .price {
    font-size: 18px;
    font-weight: bold;
    color: #1273E4;
}

/* 상세 페이지 */
.detail-container {
    max-width: 900px;
    margin: 50px auto;
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.detail-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.detail-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 5px;
}

.detail-header p {
    font-size: 18px;
    color: #666;
}

.detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}

.booking-form {
    background-color: #f2f7fc;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.booking-form h3 {
    text-align: center;
    color: #1273E4;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="date"] {
    width: calc(100% - 24px); 
    padding: 12px;
    border: 1px solid #b0d8f9;
    border-radius: 8px;
    font-size: 16px;
}

.btn-book {
    width: 100%;
    padding: 15px;
    background-color: #1273E4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-book:hover {
    background-color: #0d5bb5;
}

/* 로그인/회원가입 */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-container h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
}

.auth-form .form-group {
    text-align: left;
}

.auth-form .form-group input {
    width: calc(100% - 24px);
    margin-bottom: 10px;
}

.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background-color: #1273E4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.btn-auth-submit:hover {
    background-color: #0d5bb5;
}

.social-login-separator {
    margin: 30px 0;
    font-size: 14px;
    color: #888;
    position: relative;
}

.social-login-separator::before,
.social-login-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #e0e0e0;
}

.social-login-separator::before {
    left: 0;
}

.social-login-separator::after {
    right: 0;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.btn-social:hover {
    opacity: 0.9;
}

.btn-google {
    background-color: #DB4437;
    color: white;
}

.btn-kakao {
    background-color: #FEE500;
    color: #3C1E1E;
}

.btn-naver {
    background-color: #03C75A;
    color: white;
}

.btn-social i {
    margin-right: 10px;
    font-size: 18px;
}

.auth-footer-text {
    margin-top: 25px;
    font-size: 15px;
    color: #666;
}

/* 예약 완료 페이지 */
.success-container {
    max-width: 600px;
    margin: 80px auto;
    background-color: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.success-container i {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 25px;
}

.success-container h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.success-container p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.btn-go-bookings {
    background-color: #1273E4;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-go-bookings:hover {
    background-color: #0d5bb5;
}

/* 내 예약 목록 */
.bookings-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
}

.bookings-container h2 {
    font-size: 30px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.booking-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.booking-card-image {
    width: 150px;
    height: 120px; /* 최종 수정된 높이 */
    object-fit: cover;
    border-radius: 8px;
}

.booking-details {
    flex-grow: 1;
}

.booking-details h3 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
}

.booking-details p {
    font-size: 15px;
    color: #666;
    margin-bottom: 5px;
}

.booking-actions .btn-cancel {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.booking-actions .btn-cancel:hover {
    background-color: #c82333;
}

/* 고객센터 */
.inquiry-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.inquiry-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.btn-new-inquiry {
    background-color: #1273E4;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-new-inquiry:hover {
    background-color: #0d5bb5;
}

.inquiry-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.inquiry-list-table th,
.inquiry-list-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.inquiry-list-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

.inquiry-list-table tr:hover {
    background-color: #f2f7fc;
}

.inquiry-list-table td a {
    color: #1273E4;
    text-decoration: none;
    font-weight: 500;
}

.status-pending { color: orange; font-weight: bold; }
.status-replied { color: green; font-weight: bold; }

/* 문의 상세/작성 폼 */
.inquiry-detail-content,
.inquiry-form-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.inquiry-detail-content h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.inquiry-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}

.inquiry-body {
    font-size: 16px;
    color: #444;
    margin-bottom: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.inquiry-reply {
    background-color: #f2f7fc;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #1273E4;
    margin-top: 25px;
}

.inquiry-reply h4 {
    color: #1273E4;
    margin-top: 0;
    margin-bottom: 10px;
}

.inquiry-form .form-group textarea {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    min-height: 120px;
    resize: vertical;
}

.btn-back-to-list {
    display: inline-block;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

/* 호스트 대시보드 */
.host-container { 
    max-width: 1000px; 
    margin: 40px auto; 
    padding: 20px; 
}
.host-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
}
.btn-new-caravan { 
    background-color: #28a745; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: bold; 
}

.caravan-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); 
    margin-top: 20px;
}
.caravan-table th, .caravan-table td { 
    padding: 15px; 
    text-align: left; 
    border-bottom: 1px solid #eee; 
}
.caravan-table th { 
    background-color: #f8f9fa; 
    font-weight: bold; 
    color: #555; 
}

.btn-edit { 
    background: #ffc107; 
    color: #333; 
    padding: 5px 10px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 13px; 
    margin-right: 5px; 
}
.btn-delete { 
    background: #dc3545; 
    color: white; 
    padding: 5px 10px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 13px; 
}

/* 카라반 폼 */
.form-container { 
    max-width: 600px; 
    margin: 40px auto; 
    padding: 40px; 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
}
.form-container h2 { 
    text-align: center; 
    margin-bottom: 30px; 
    color: #333; 
}
.form-group { 
    margin-bottom: 20px; 
}
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: bold; 
    color: #555; 
}
.form-group input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 16px; 
}

.price-people { 
    display: flex; 
    gap: 20px; 
}
.price-people .form-group { 
    flex: 1; 
}

.btn-submit { 
    width: 100%; 
    padding: 15px; 
    background-color: #1273E4; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-size: 18px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 10px; 
}
.btn-back { 
    display: block; 
    text-align: center; 
    margin-top: 20px; 
    color: #666; 
    text-decoration: none; 
}

/* 푸터 */
footer {
    text-align: center;
    padding: 40px;
    background: #333;
    color: white;
    margin-top: 50px;
}