/* ===============================
   📁 sections/section_price.css (v7 - Season Fare Update)
================================ */

/* ✅ 전체 섹션: Full-width 레이아웃을 위해 좌우 패딩을 0으로 설정 */
#price {
    background-color: #f8f9fa;
    padding-left: 0;
    padding-right: 0;
}

/* --- Section Header --- */
/* ✅ Full-width 레이아웃에 맞춰 헤더에도 좌우 패딩을 적용 */
#price .section-header {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    /* 헤더 텍스트가 화면 가장자리에 붙지 않도록 패딩 추가 */
}

#price .section-overline {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #5b7282;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

#price .section-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
}

/* --- Mobile Styles for Header --- */
@media (max-width: 768px) {
    #price .section-header {
        margin-bottom: 2rem;
    }

    #price .section-overline {
        font-size: 0.7rem;
    }

    #price .section-title {
        font-size: 1.6rem;
    }
}

/* ====== 그리드 레이아웃 ====== */
.price-layout-container {
    display: grid;
    grid-template-columns: 1fr;
    /* 모바일: 1열 */
    gap: 20px;
    /* ✅ max-width 제거 및 margin 0으로 변경하여 Full-width 구현 */
    max-width: none;
    margin: 0;
    padding: 0 20px;
    /* ✅ 뷰포트 좌우에 여백을 주기 위해 패딩 추가 */
    box-sizing: border-box;
    /* 패딩을 너비에 포함 */
}

/* 태블릿: 2열 그리드 레이아웃 (768px 이상) */
@media (min-width: 768px) {
    .price-layout-container {
        grid-template-columns: repeat(2, 1fr);
        align-items: stretch;
        /* ✅ 카드의 높이를 가장 긴 카드에 맞게 통일 */
    }
}


/* 데스크탑: 4열 그리드 레이아웃 (1200px 이상) */
@media (min-width: 1200px) {
    .price-layout-container {
        grid-template-columns: repeat(4, 1fr);
        align-items: stretch;
        /* ✅ 카드의 높이를 가장 긴 카드에 맞게 통일 */
    }

    .price-layout-container.three-items-layout {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* NEW: Flexbox fallback for centering three items */
.price-layout-container.three-items-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.price-layout-container.three-items-layout .price-card {
    flex-basis: calc(33.333% - 14px);
    /* (100% / 3) - (gap * 2 / 3) */
    min-width: 300px;
    /* Prevent cards from getting too small */
}


/* ====== 카드 공통 스타일 ====== */
.price-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
    /* 카드 내용을 세로로 정렬 */
}

.price-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #343a40;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f5;
}

/* ====== 카드 1: 이용요금 (NEW 3-COLUMN TABLE) ====== */
.fare-table-wrapper {
    flex-grow: 1;
}

.fare-table {
    width: 100%;
    border-collapse: collapse;
}

.fare-table th,
.fare-table td {
    padding: 8px 4px;
    vertical-align: middle;
}

.fare-table thead th {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 16px;
    text-align: center;
}

.fare-table thead th:first-child {
    width: 25%;
    text-align: left;
}

.fare-header-content .category-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
}

.fare-header-content .category-note {
    font-size: .8rem;
    color: #868e96;
    text-transform: uppercase;
}

/* Row for "왕복" / "편도" */
.fare-type-header td {
    padding-top: 20px;
    font-size: .95rem;
    font-weight: 600;
    color: #495057;
    text-align: left;
    border-top: 1px dashed #e9ecef;
}

.fare-table tbody tr:first-child .fare-type-header td {
    border-top: none;
}

/* Cell for label like "상시", "성수기" */
.fare-price-label-cell {
    text-align: left;
    white-space: nowrap;
}

.fare-price-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #868e96;
    background-color: #f1f3f5;
    padding: 3px 8px;
    border-radius: 4px;
}

.fare-price-label.season {
    background-color: #fff9db;
    color: #e67700;
}

.fare-price-label.custom {
    background-color: #e6fcf5;
    color: #087f5b;
}

/* Cell for price */
.fare-price-cell {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0056b3;
    text-align: center;
}

.fare-bottom-note {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f5;
    font-size: 0.85rem;
    color: #666;
    text-align: left;
}

.fare-bottom-note p {
    margin: 0;
    line-height: 1.4;
}

.fare-bottom-note p+p {
    margin-top: 4px;
}


/* ====== 카드 2: 할인안내 ====== */
.discount-table-wrapper {
    overflow-x: auto;
    flex-grow: 1;
}

.discount-table {
    width: 100%;
    border-collapse: collapse;
}

.discount-table th,
.discount-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f3f5;
    text-align: left;
    vertical-align: middle;
    font-size: .9rem;
    white-space: nowrap;
    /* 데스크탑에서는 줄바꿈 방지 */
}

.discount-table thead th {
    font-weight: 600;
    background: #f8f9fa;
    text-align: center;
}

.discount-table td:first-child {
    font-weight: 500;
}

.discount-table td:nth-child(2) {
    text-align: center;
}

.discount-table .discount-rate {
    display: inline-block;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    padding: 4px 12px;
    border-radius: 8px;
    color: #fff;
    min-width: 60px;
}

.discount-rate.rate-50 {
    background: #e67700;
}

.discount-rate.rate-40 {
    background: #f08c00;
}

.discount-rate.rate-20 {
    background: #1971c2;
}

.discount-rate.rate-15 {
    background: #2b8a3e;
}

.discount-rate.rate-free {
    background: #2f9e44;
}

.discount-notes {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f5;
}

.discount-notes p {
    font-size: .85rem;
    color: #6c757d;
    line-height: 1.3;
    margin: 0;
    text-align: left;
    /* 요청사항: 좌측 정렬 */
}

.discount-notes p+p {
    margin-top: 3px;
}


/* ====== 카드 3: 운영 및 이용 안내 ====== */
.info-guide-card .guide-section:not(:last-child) {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f3f5;
    /* 섹션 간 구분선 */
}

.guide-section .price-card-title {
    font-size: 1.1rem;
    /* 제목 크기 조정 */
}

.operation-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 아이템 간 간격 */
}

.operation-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.operation-icon {
    flex-shrink: 0;
    color: #007bff;
    margin-top: 2px;
}

.operation-content h5 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
}

.operation-content p {
    margin: 2px 0;
    font-size: .9rem;
    color: #495057;
    line-height: 1.4;
    text-align: left;
    /* 요청사항: 좌측 정렬 */
}

.operation-content span {
    display: block;
    margin-top: 4px;
    font-size: .8rem;
    color: #868e96;
    line-height: 1.3;
    text-align: left;
    /* 요청사항: 좌측 정렬 */
}

.notice-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.notice-list li {
    padding-left: 18px;
    position: relative;
    font-size: .9rem;
    color: #495057;
    margin-bottom: 5px;
    line-height: 1.4;
    text-align: left;
    /* 요청사항: 좌측 정렬 */
}

.notice-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.notice-list li.important-notice {
    font-weight: 600;
    color: #c92a2a;
}

.notice-list li.important-notice::before {
    color: #c92a2a;
}

/* ====== 모바일 반응형 ====== */
@media (max-width: 991px) {

    /* 할인 테이블 내용이 길어지면 줄바꿈되도록 하여 가로 스크롤 방지 */
    .discount-table th,
    .discount-table td {
        white-space: normal;
    }
}

@media (max-width: 480px) {

    /* 테이블이 너무 좁아지면 스크롤 처리 */
    .fare-table-wrapper,
    .discount-table-wrapper {
        overflow-x: auto;
    }
}

/* ====== 카드 4: 기타 안내 (Custom Info Card) ====== */
.custom-info-card .guide-section {
    flex-grow: 1;
    /* Ensure section fills card height */
}

/* Group for each item (e.g., "반려견 동반 탑승 관련") */
.custom-info-group {
    margin-bottom: 1.5rem;
    /* Space between groups */
}

.custom-info-group:last-child {
    margin-bottom: 0;
}

.custom-info-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: #343a40;
    margin: 0 0 0.8rem 0;
}

/* Style for sub-headings within the custom info list (e.g., "이용규정") */
.custom-info-card .notice-list .custom-info-list-subtitle {
    font-weight: 600;
    color: #495057;
    padding-left: 0;
    margin-top: 1em;
    margin-bottom: 0.5em;
    list-style-type: none;
    /* remove bullet from li */
}

.custom-info-card .notice-list .custom-info-list-subtitle::before {
    content: none;
    /* No bullet point */
}

/* Inherit important notice styles */
.custom-info-card .notice-list .important-notice {
    font-weight: 600;
    color: #c92a2a;
}

.custom-info-card .notice-list .important-notice::before {
    color: #c92a2a;
}

/* NEW: Style for important notices in footnotes */
.fare-bottom-note p.important-notice,
.discount-notes p.important-notice {
    font-weight: 600;
    color: #c92a2a;
}