/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    --primary: #342186;
    --primary-light: #4a35a8;
    --primary-dark: #261869;
    --accent: #4FAB25;
    --accent-light: #65c23b;
    --accent-dark: #3a8b1c;
    --bg: #f5f6fa;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.2s ease;
}

/* ===== Base ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Navbar ===== */
.navbar-nisikli {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0.6rem 0;
    border-bottom: 2px solid var(--primary);
}
.navbar-nisikli .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-nisikli .navbar-brand i {
    font-size: 1.5rem;
    color: var(--accent);
}
.navbar-nisikli .navbar-brand:hover {
    color: var(--primary-light);
}
.navbar-nisikli .nav-link {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar-nisikli .nav-link:hover,
.navbar-nisikli .nav-link.active {
    color: var(--primary);
    background: rgba(52, 33, 134, 0.06);
}
.navbar-nisikli .lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2.5rem 0 3rem;
    color: var(--white);
    text-align: center;
    margin-bottom: -2rem;
}
.hero-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.hero-section p {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 300;
}

/* ===== Search Card ===== */
.search-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-top: -1rem;
    position: relative;
    z-index: 10;
    border: none;
}
.search-card h5 {
    color: var(--primary);
    font-weight: 700;
}

/* ===== Form Elements ===== */
.form-label {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}
.form-label i {
    margin-right: 8px;
    color: var(--accent);
    font-size: 0.9rem;
}
.form-select,
.form-control {
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: var(--white);
}
.form-select:focus,
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 33, 134, 0.12);
}

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.5rem;
    transition: var(--transition);
    font-size: 0.95rem;
}
.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 171, 37, 0.3);
}
.btn-secondary {
    background-color: var(--gray-200);
    border-color: var(--gray-200);
    color: var(--gray-700);
}
.btn-secondary:hover {
    background-color: var(--gray-300);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

/* ===== Alert ===== */
.alert {
    display: none;
    border-radius: var(--radius);
    font-weight: 500;
}

/* ===== Sefer Listesi ===== */
.sefer-listesi {
    margin-top: 2rem;
}
.sefer-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    padding: 1.5rem 2rem;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}
.sefer-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.sefer-card h5 {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.sefer-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Timeline Route Display */
.route-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin: 0.8rem 0;
}
.route-timeline .route-point {
    text-align: center;
    flex: 0 0 auto;
}
.route-timeline .route-point .time {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
}
.route-timeline .route-point .label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.route-timeline .route-line {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    position: relative;
}
.route-timeline .route-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--gray-300);
    transform: translateY(-50%);
}
.route-timeline .route-line .duration {
    background: var(--white);
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    position: relative;
    z-index: 1;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-weight: 500;
}
.route-timeline .route-line .route-arrow {
    position: absolute;
    right: 0.5rem;
    color: var(--accent);
    font-size: 0.75rem;
    z-index: 1;
    background: var(--white);
    padding-left: 4px;
}

.sefer-card .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-align: right;
}
.sefer-card .btn-satinal {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.6rem 2rem;
}
.sefer-card .btn-satinal:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 171, 37, 0.3);
}
.sefer-card .bus-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.sefer-card .bus-info i {
    color: var(--primary);
}

/* ===== Sefer Detay Card ===== */
.card-seferdetay {
    border: none;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    transition: var(--transition);
}
.card-seferdetay:hover {
    box-shadow: var(--shadow-lg);
}
.card-seferdetay > .card-header {
    font-weight: 600;
    border-bottom: none;
    padding: 1rem 1.5rem;
    background-color: var(--primary) !important;
}
.card-seferdetay > .card-header h5 {
    color: var(--white);
    margin: 0;
    font-size: 1rem;
}
.card-seferdetay > .card-header .btn {
    font-size: 0.8rem;
    border-radius: 8px;
}
.card-seferdetay .card-body {
    padding: 1.5rem;
}

.kalkis-durak {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}
.varis-durak {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
}
.hareket-tarih {
    color: var(--gray-700);
    font-size: 1.2rem;
    font-weight: 700;
}
.sefer-fiyat {
    color: var(--accent);
    font-size: 2rem;
    font-weight: 800;
}

/* ===== Otobus / Koltuk Secim ===== */
.otobus {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 50px 10px 10px 50px;
    padding: 24px;
    color: var(--gray-700);
    position: relative;
}
.otobus > .direksiyon {
    position: absolute;
    bottom: 20px;
    left: 20px;
}
.otobus > .yerlesim {
    position: relative;
    display: inline-block;
    padding: 0 0 0 80px;
}
.otobus > .yerlesim > ul.koltuklar {
    float: left;
    list-style: none;
    padding: 0;
    margin: 0;
}
.otobus > .yerlesim > ul.koltuklar > li {
    height: 44px;
    width: 44px;
    text-align: center;
    line-height: 44px;
    cursor: pointer;
    font-weight: 700;
    color: var(--white);
    border-radius: 6px;
    transition: transform 0.15s ease;
    font-size: 0.85rem;
}
.otobus > .yerlesim > ul.koltuklar > li:hover {
    transform: scale(1.08);
}
.otobus > .yerlesim > ul.koltuklar > li.boskoltuk {
    color: var(--gray-700);
    background: url('koltuk.png') center center no-repeat;
}
.otobus > .yerlesim > ul.koltuklar > li.secilikoltuk {
    color: var(--white);
    background: url('koltuk-secili.png') center center no-repeat;
}
.otobus > .yerlesim > ul.koltuklar > li.erkekyolcu {
    background: url('koltuk-erkek.png') center center no-repeat;
}
.otobus > .yerlesim > ul.koltuklar > li.kadinyolcu {
    background: url('koltuk-kadin.png') center center no-repeat;
}
.otobus > .yerlesim > ul.koltuklar > li.koridor {
    margin: 0;
    cursor: default;
}
.otobus > .yerlesim > ul.koltuklar > li.koridor:hover {
    transform: none;
}
.otobus > .yerlesim > ul.koltuklar > li.koridorkoyu {
    background: var(--gray-200);
    margin: 10px 0;
    height: 32px;
    cursor: default;
    border-radius: 4px;
}
.otobus > .yerlesim > ul.koltuklar > li.koridorkoyu:hover {
    transform: none;
}

/* Seat Legend */
.seat-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}
.seat-list > li {
    font-size: 0.8rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.seat-icon {
    width: 24px;
    height: 24px;
}

/* ===== Gender Options (Modal) ===== */
.gender-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.gender-options button {
    border: 2px solid var(--gray-200);
    background: var(--white);
    text-align: center;
    cursor: pointer;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.gender-options button:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(52, 33, 134, 0.15);
    transform: translateY(-2px);
}
.gender-options img {
    width: 80px;
    height: 80px;
}
.gender-options p {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--gray-800);
    font-weight: 700;
    margin-bottom: 0;
}

/* ===== Modal Styling ===== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}
.modal-header {
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem 1.5rem;
}
.modal-header .modal-title {
    font-weight: 700;
    font-size: 1rem;
}
.modal-header .btn-close {
    filter: brightness(0) invert(1);
}
.modal-body {
    padding: 1.5rem;
}
.modal-body label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.3rem;
}

/* ===== Bilet Al Button ===== */
#satinal .btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.9rem;
    border-radius: var(--radius);
    letter-spacing: 0.5px;
}
#satinal .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79, 171, 37, 0.35);
    transform: translateY(-2px);
}

/* ===== Error / Result containers ===== */
.error-container {
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.error-icon {
    color: #dc3545;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.error-message {
    color: #dc3545;
    font-size: 1.3rem;
    font-weight: 700;
}
.error-details {
    font-size: 1rem;
    margin-top: 1rem;
    color: var(--gray-600);
}

.result-container {
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.check-icon {
    color: var(--accent);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.thank-you {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}
.order-details {
    font-size: 1rem;
    margin-top: 1rem;
    color: var(--gray-600);
}

/* ===== Footer ===== */
.footer-nisikli {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 1.2rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
}
.footer-nisikli a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem 0 2.5rem;
    }
    .hero-section h1 {
        font-size: 1.3rem;
    }
    .hero-section p {
        font-size: 0.9rem;
    }
    .search-card {
        padding: 1.2rem;
        margin-top: -0.5rem;
        border-radius: var(--radius-lg);
    }
    .search-card .row {
        display: flex;
        align-items: center;
    }
    .search-card .row .mt-3 {
        margin-top: 0 !important;
    }
    .sefer-card {
        padding: 1rem 1.2rem;
    }
    .route-timeline .route-point .time {
        font-size: 1.1rem;
    }

    /* Otobus Mobile Layout */
    .otobus {
        display: block !important;
        border-radius: 50px 50px 10px 10px !important;
        padding: 20px !important;
        position: relative !important;
    }
    .otobus > .direksiyon {
        position: absolute !important;
        top: 20px !important;
        left: 20% !important;
        transform: translateX(-50%) !important;
    }
    .otobus > .yerlesim {
        padding: 80px 0 0 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .otobus .yerlesim ul.koltuklar {
        display: flex !important;
        justify-content: center !important;
    }
    .otobus > .yerlesim > ul.koltuklar > li.koridorkoyu {
        margin: 0 !important;
        height: 44px !important;
    }
    .otobus > .yerlesim > ul.koltuklar > li {
        transform: rotate(90deg) !important;
        transform-origin: center !important;
    }

    .gender-options {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .gender-options button {
        width: 100%;
        max-width: 200px;
        padding: 1rem 1.5rem;
    }
    .gender-options img {
        width: 60px;
        height: 60px;
    }
    .kalkis-durak,
    .varis-durak,
    .hareket-tarih {
        font-size: 1rem;
    }
    .sefer-fiyat {
        font-size: 1.5rem;
    }
    .seat-list {
        gap: 0.5rem;
    }
    .seat-list > li {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
    .card-seferdetay .card-body {
        padding: 1rem;
    }
    .route-timeline {
        padding: 0.8rem 0;
    }
}
