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

:root {
    --primary: #1e3a8a; /* Deep Blue */
    --primary-light: #3b82f6;
    --accent: #f97316; /* Orange */
    --accent-hover: #ea580c;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    
    --seat-available: #e2e8f0;
    --seat-booked: #94a3b8;
    --seat-selected: var(--accent);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

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

/* LAYOUT */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* NAVBAR */
.navbar {
    background: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.nav-links a { font-weight: 600; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary-light); }

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.8)), url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    color: var(--white);
    padding: 100px 0 150px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* SEARCH BOX */
.search-wrapper {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: -80px auto 40px;
    position: relative;
    z-index: 10;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.input-group select, 
.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    background-color: var(--bg-light);
    transition: all 0.3s;
}

.input-group select:focus, 
.input-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    height: 47px;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* FEATURES / ADVERTISEMENTS */
.features {
    padding: 60px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* TESTIMONIALS */
.testimonials {
    padding: 60px 0;
}

.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testi-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.testi-stars {
    color: #fbbf24;
    margin-bottom: 15px;
}

.testi-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
}

.testi-user {
    display: flex;
    align-items: center;
    gap: 15px;
}
.testi-user img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.testi-user h4 { font-size: 16px; margin:0; }
.testi-user span { font-size: 12px; color: var(--text-light); }

/* FOOTER */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: center;
    margin-top: 60px;
}


/* ==================== RESULTS PAGE ==================== */
.results-header {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0;
}
.results-info h1 {
    font-size: 28px;
    margin-bottom: 10px;
}
.results-info p { opacity: 0.8; }

.results-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin: 40px 0;
}

/* Filters */
.filters-sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    height: fit-content;
}
.filters-sidebar h3 { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px;}
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; margin-bottom: 8px; font-size: 14px;}

/* Trip Cards */
.trip-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}
.trip-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.trip-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-route {
    display: flex;
    align-items: center;
    gap: 20px;
}

.time-box { text-align: center; }
.time-box h2 { font-size: 24px; color: var(--primary); }
.time-box p { font-size: 14px; color: var(--text-light); }

.route-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
}
.duration {
    font-size: 12px;
    color: var(--text-light);
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 5px;
}
.line-graphic {
    width: 100%;
    height: 2px;
    background: #cbd5e1;
    position: relative;
    margin: 10px 0;
}
.line-graphic::before, .line-graphic::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    top: -3px;
}
.line-graphic::before { left: 0; }
.line-graphic::after { right: 0; }

.price-action {
    text-align: right;
}
.price-action h2 {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 10px;
}

.trip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #cbd5e1;
    padding-top: 15px;
}
.bus-features {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 14px;
}
.bus-features i { color: var(--primary-light); margin-right: 5px; }


/* ==================== BOOKING PAGE ==================== */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin: 40px 0;
}

.booking-main, .booking-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.booking-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: var(--primary);
}

/* Seat Map */
.seat-map-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    padding: 30px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.steering-wheel {
    width: 100%;
    max-width: 300px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-weight: 600;
}

.bus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.bus-grid .seat:nth-child(4n-1) { margin-left: 30px; /* Aisle */ }

.seat {
    width: 45px;
    height: 45px;
    border-radius: 8px 8px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
}

/* Seat back styling */
.seat::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 5px;
    border-radius: 2px;
}

.seat.available {
    background-color: var(--seat-available);
    color: var(--text-dark);
}
.seat.available::before { background-color: #cbd5e1; }
.seat.available:hover { transform: translateY(-3px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.seat.booked {
    background-color: var(--seat-booked);
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}
.seat.booked::before { background-color: #64748b; }

.seat.selected {
    background-color: var(--seat-selected);
    color: white;
    transform: scale(1.05);
}
.seat.selected::before { background-color: #c2410c; }

.seat-legend {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    font-size: 14px;
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-color { width: 20px; height: 20px; border-radius: 4px; }
.lc-av { background: var(--seat-available); }
.lc-bk { background: var(--seat-booked); }
.lc-sl { background: var(--seat-selected); }

/* Receipt Sidebar */
.receipt {
    background: #f1f5f9;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}
.receipt-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #cbd5e1;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.pay-method {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.pay-method.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 450px;
    transform: translateY(20px);
    transition: transform 0.3s;
}
.modal-overlay.active .modal-box {
    transform: translateY(0);
}
.modal-icon {
    font-size: 60px;
    color: var(--success);
    margin-bottom: 20px;
}
.ticket-details-box {
    background: #f8fafc;
    padding: 15px;
    border: 1px dashed #cbd5e1;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
}


/* Responsive */
@media (max-width: 900px) {
    .search-form { grid-template-columns: 1fr; }
    .features-grid, .testi-grid { grid-template-columns: 1fr; }
    .results-layout { grid-template-columns: 1fr; }
    .trip-main { flex-direction: column; gap: 20px; align-items: flex-start; }
    .price-action { text-align: left; width: 100%; display: flex; justify-content: space-between; align-items: center; }
    .booking-layout { grid-template-columns: 1fr; }
}
