/* bus.vkdma.kr 스타일시트 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Malgun Gothic', sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 헤더 */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 24px 0;
    margin-bottom: 24px;
}

.site-header .container {
    text-align: center;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
    font-size: 28px;
    font-weight: 800;
}

.logo-icon {
    font-size: 36px;
}

.site-tagline {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
}

/* 노선 선택 */
.route-selector {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.route-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.route-inputs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.route-input-group {
    flex: 1;
}

.route-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.route-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.route-select:focus {
    outline: none;
    border-color: var(--primary);
}

.swap-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    background: var(--white);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.swap-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.search-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* 페이지 제목 */
.page-title-section {
    text-align: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.departure-badge,
.arrival-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 16px;
}

.arrow {
    color: var(--gray-400);
    font-size: 20px;
}

.bus-type-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--success);
    color: var(--white);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.page-subtitle {
    margin-top: 12px;
    color: var(--gray-600);
    font-size: 15px;
}

/* 운행 개요 카드 */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.overview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.overview-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.overview-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.overview-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    margin-top: 4px;
}

/* 예매 안내 */
.booking-notice {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.booking-notice h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.booking-notice p {
    color: var(--gray-600);
    margin-bottom: 12px;
}

.kobus-link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s;
}

.kobus-link:hover {
    background: var(--primary-dark);
}

/* 관련 노선 바 */
.related-routes-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.route-tag {
    display: inline-block;
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.route-tag:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.route-tag.reverse {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* 섹션 공통 */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

/* 시간표 */
.schedule-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.table-wrapper {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.schedule-table th {
    background: var(--gray-100);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.schedule-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    white-space: nowrap;
}

.schedule-table tbody tr:hover {
    background: var(--gray-50);
}

.time-cell {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-dark);
}

.price-cell {
    font-weight: 600;
    color: var(--gray-800);
}

.grade-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.grade-general {
    background: var(--gray-100);
    color: var(--gray-600);
}

.grade-premium {
    background: #dbeafe;
    color: #1e40af;
}

.grade-ultra_premium {
    background: #fef3c7;
    color: #92400e;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* 요금 안내 */
.fare-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.fare-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fare-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    min-width: 120px;
}

.fare-grade {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.fare-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
}

.fare-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
}

/* 꿀팁 */
.tips-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.tips-content {
    line-height: 1.8;
}

.tip-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 16px 0 8px;
}

.tip-item {
    font-size: 14px;
    color: var(--gray-600);
    margin: 4px 0;
    padding-left: 12px;
}

/* 이용 팁 */
.travel-tips {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.tips-list p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

/* 명절·성수기 안내 */
.peak-season-notice {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notice-item {
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.notice-item h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.notice-item p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 4px 0;
}

.notice-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.notice-item a:hover {
    text-decoration: underline;
}

/* FAQ */
.faq-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-item[open] {
    border-color: var(--primary);
}

.faq-question {
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    background: var(--gray-50);
    transition: background 0.2s;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::before {
    content: '▶';
    display: inline-block;
    margin-right: 10px;
    font-size: 12px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::before {
    transform: rotate(90deg);
}

.faq-question:hover {
    background: var(--gray-100);
}

.faq-answer {
    padding: 16px;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
    border-top: 1px solid var(--gray-200);
}

/* 관련 링크 */
.related-links {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s;
}

.link-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.link-icon {
    font-size: 20px;
}

.link-text {
    font-size: 14px;
    font-weight: 500;
}

/* 광고 */
.ad-section {
    margin-bottom: 24px;
    min-height: 100px;
}

/* 하단 안내 */
.bottom-notice {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.8;
}

.bottom-notice p {
    margin: 8px 0;
}

.data-updated {
    margin-top: 16px !important;
    font-size: 13px;
    color: var(--gray-400);
    text-align: right;
}

/* 노선 선택 안내 */
.no-route-selected {
    padding: 60px 20px;
}

.empty-state {
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-size: 22px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
}

/* 푸터 */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-400);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
}

.footer-note {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.7;
}

/* 모바일 반응형 */
@media (max-width: 640px) {
    .route-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .swap-btn {
        align-self: center;
        transform: rotate(90deg);
    }
    
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .departure-badge,
    .arrival-badge {
        font-size: 14px;
        padding: 4px 10px;
    }
    
    .schedule-table {
        font-size: 13px;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 10px 8px;
    }
    
    .time-cell {
        font-size: 15px;
    }
    
    .fare-cards {
        justify-content: center;
    }
    
    .link-cards {
        grid-template-columns: 1fr;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
        --white: #111827;
        --primary-light: #1e3a5f;
    }
    
    .site-header {
        background: linear-gradient(135deg, #1e40af, #1e3a8a);
    }
    
    .notice-item {
        background: var(--gray-100);
    }
    
    .faq-question {
        background: var(--gray-100);
    }
    
    .faq-question:hover {
        background: var(--gray-200);
    }
    
    .tips-list p {
        background: var(--gray-100);
    }
    
    .link-card {
        background: var(--gray-100);
    }
}

/* 애니메이션 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
