/**
 * Main Stylesheet
 * Car Rental Booking System
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/hero-pattern.png') repeat;
    opacity: 0.1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Search Box */
.search-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: -50px;
}

.search-box .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

/* Car Cards */
.car-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.car-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background: #f1f1f1;
}

.car-card .card-body {
    padding: 20px;
}

.car-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.car-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 15px;
}

.car-card .price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #7f8c8d;
}

.car-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.car-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.car-feature i {
    color: #3498db;
    width: 20px;
}

/* Car Detail Page */
.car-detail-images {
    position: relative;
}

.car-detail-images .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.car-detail-images .thumbnail-images {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.car-detail-images .thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.car-detail-images .thumbnail:hover,
.car-detail-images .thumbnail.active {
    border-color: #3498db;
}

.car-specs {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.car-specs h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-item .spec-label {
    color: #7f8c8d;
    font-weight: 500;
}

.spec-item .spec-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Booking Form */
.booking-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.booking-form h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.price-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.price-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    border-top: 2px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
}

.price-row .pre-booking-fee {
    color: #e74c3c;
    font-weight: 600;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.filter-sidebar h5 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 20px;
}

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

/* Admin Dashboard */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: #2c3e50;
    padding: 20px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link i {
    width: 25px;
}

.admin-content {
    padding: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    margin-bottom: 15px;
}

.stat-card .stat-icon.primary {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.stat-card .stat-icon.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.stat-card .stat-icon.warning {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.stat-card .stat-icon.danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-card .stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Tables */
.data-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.data-table thead {
    background: #2c3e50;
    color: white;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Badges */
.badge-booking-pending {
    background: #f1c40f;
    color: white;
}

.badge-booking-confirmed {
    background: #3498db;
    color: white;
}

.badge-booking-active {
    background: #27ae60;
    color: white;
}

.badge-booking-completed {
    background: #95a5a6;
    color: white;
}

.badge-booking-cancelled {
    background: #e74c3c;
    color: white;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.btn-success {
    background: #27ae60;
    border-color: #27ae60;
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
}

.btn-danger {
    background: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .search-box {
        margin-top: 20px;
    }

    .car-detail-images .main-image {
        height: 250px;
    }

    .admin-sidebar {
        min-height: auto;
    }
}

/* Fix dropdown z-index */
.navbar {
    z-index: 1030 !important;
}

.navbar .dropdown-menu {
    z-index: 1031 !important;
}

/* Clickable Stat Cards */
.stat-card.clickable {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-card.clickable .stat-icon {
    transition: transform 0.2s;
}

.stat-card.clickable:hover .stat-icon {
    transform: scale(1.1);
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Form Validation */
.was-validated .form-control:valid {
    border-color: #27ae60;
}

.was-validated .form-control:invalid {
    border-color: #e74c3c;
}

/* Datepicker Custom */
.datepicker {
    z-index: 9999 !important;
}

/* Print Styles */
@media print {
    .navbar, footer, .whatsapp-float, .no-print {
        display: none !important;
    }
}
