/* ============================================
   UGANDA SMART TRANSPORT BOOKING SYSTEM (USTBS)
   Main Stylesheet
   ============================================ */

/* ===== VARIABLES ===== */
:root {
    --primary-color: #2c3e50; /* Soft charcoal */
    --secondary-color: #ffffff;
    --accent-color: #4aa3b9; /* Subtle teal */
    --accent-light: #e3f2f9;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #95a5a6;
    --bg-light: #f8f9fa;
    --bg-dark: #1a252f;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.brand-text {
    margin-left: 0.5rem;
    vertical-align: middle;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0.5rem;
    position: relative;
    padding: 0.5rem 0 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.btn {
    padding: 0.5rem 1.5rem !important;
    border-radius: 50px;
}

.nav-link.btn::after {
    display: none;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--secondary-color) 100%);
    overflow: hidden;
    padding: 120px 0 30px;
}

.map-container {
    height: 600px;
    border-radius: px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* ===== BOOKING CARD ===== */
.booking-card {
    background: var(--secondary-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.booking-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.booking-card h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.fare-display {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.fare-display .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.fare-display .currency {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    background: var(--secondary-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--accent-color);
    color: white;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    background: var(--secondary-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 1.5rem;
}

.service-content h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.service-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    background: var(--secondary-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stars {
    color: #f1c40f;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
}

.testimonial-author strong {
    color: var(--primary-color);
    display: block;
}

/* ===== SAFETY SECTION ===== */
.safety-features {
    padding: 1rem 0;
}

.safety-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: var(--secondary-color);
    border-radius: 10px;
    transition: var(--transition);
}

.safety-item:hover {
    background: var(--accent-light);
    transform: translateX(10px);
}

.safety-item i {
    font-size: 1.25rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding-top: 4rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.app-buttons .btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    margin-right: 0.5rem;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-color);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 163, 185, 0.2);
}

.btn-outline-primary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 163, 185, 0.2);
}

/* ===== FORM ELEMENTS ===== */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 163, 185, 0.1);
    outline: none;
}

.input-group-text {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 10px 0 0 10px;
    color: var(--text-secondary);
}

/* ===== UTILITY CLASSES ===== */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.min-vh-100 {
    min-height: 100vh;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-light {
    background: var(--bg-light) !important;
}

.border-accent {
    border-color: var(--accent-color) !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 1s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 1s ease;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
    .hero-section {
        padding: 60px 0 0;
    }
    
    .map-container {
        height: 400px;
        margin-top: 2rem;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 10px;
        box-shadow: var(--shadow-md);
    }
    
    .nav-link::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .py-6 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .booking-card {
        padding: 1.5rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 575px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar, .footer, .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .map-container {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOOLTIPS ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 5px;
    margin-bottom: 5px;
    z-index: 1000;
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideInDown 0.5s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== MODALS ===== */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

/* ===== PROGRESS BARS ===== */
.progress {
    height: 10px;
    border-radius: 5px;
    background: var(--bg-light);
    overflow: hidden;
}

.progress-bar {
    background: var(--accent-color);
    transition: width 0.3s ease;
}

/* ===== CARDS & CONTAINERS ===== */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

/* ===== BADGES ===== */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-primary {
    background: var(--accent-light);
    color: var(--accent-color);
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--bg-light);
    padding: 1rem;
    font-weight: 600;
    text-align: left;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tr:hover {
    background: var(--bg-light);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.page-item {
    margin: 0 0.25rem;
}

.page-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition);
}

.page-link:hover,
.page-item.active .page-link {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-sidebar {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.dashboard-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-menu li {
    margin-bottom: 0.5rem;
}

.dashboard-menu a {
    display: block;
    padding: 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dashboard-menu a:hover,
.dashboard-menu a.active {
    background: var(--accent-light);
    color: var(--accent-color);
}

.dashboard-menu i {
    width: 24px;
    margin-right: 0.75rem;
}

/* ===== STATS CARDS ===== */
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
}

/* ===== RIDE TRACKING ===== */
.tracking-container {
    position: relative;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.driver-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.driver-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.driver-details h4 {
    margin: 0;
    font-size: 1.125rem;
}

.driver-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.vehicle-info {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== ANIMATED MARKERS ===== */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.marker-pulse {
    animation: pulse 1s infinite;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, #e0e0e0 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toast-close {
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--danger);
}

/* ===== RESPONSIVE FIXES FOR DASHBOARD ===== */
@media (max-width: 991px) {
    .dashboard-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .tracking-container {
        height: 400px;
    }
}

@media (max-width: 767px) {
    .driver-info {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .vehicle-info {
        justify-content: center;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 40px);
    }
    .navbar-brand img{
        height: 60px;
        margin-left: px;
    }
    .navbar-brand span .brand-text{
        font-size: 11px;
    }
    .hero-section h1{
        font-size: 45px;
        padding-top: 40px;
    }
}