/* General Body and Font Styles */
body {
    font-family: 'Poppins', sans-serif; /* A modern, clean font */
    background-color: #f8f9fa; /* Light background for the whole site */
    color: #343a40;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #212529; /* Darker headings */
}

a {
    color: #007bff; /* Primary link color */
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Navbar Enhancements */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    font-size: 1.8rem;
    color: #007bff; /* Primary color for logo icon */
}

.nav-link {
    font-weight: 500;
    margin-right: 15px; /* Spacing between nav items */
    transition: all 0.3s ease;
}

.nav-link.active {
    color: #007bff !important; /* Highlight active link */
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    background-color: #e9ecef;
    color: #007bff;
}

/* Jumbotron/Hero Section */
.jumbotron {
    background: linear-gradient(135deg, #007bff, #0056b3); /* Gradient background */
    color: white;
    padding: 80px 30px;
    border-radius: 15px;
    margin-bottom: 5rem !important;
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

.jumbotron h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.jumbotron .lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.jumbotron .btn-primary {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #007bff;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.jumbotron .btn-primary:hover {
    background-color: #e2e6ea;
    border-color: #e2e6ea;
    color: #0056b3;
    transform: translateY(-2px);
}

/* Tracking Section */
#tracking-section .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

#tracking-section .form-control-lg {
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
    padding: 0.75rem 1.5rem;
    border-color: #ced4da;
}

#tracking-section .btn-lg {
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    background-color: #007bff;
    border-color: #007bff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

#tracking-section .btn-lg:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

/* Features Section */
.features h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #212529;
}

.feature-box {
    background-color: white;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 30px !important;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.feature-box i {
    color: #007bff; /* Consistent icon color */
    margin-bottom: 1rem;
}

.feature-box h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #212529;
}

/* Tracking Detail Page */
#map {
    border-radius: 8px;
    height: 400px; /* Standard height for the map */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tracking-history .list-group-item {
    border-left: 3px solid #007bff;
    margin-bottom: 15px;
    padding-left: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tracking-history .list-group-item:last-child {
    margin-bottom: 0;
}

.tracking-history .fw-bold {
    color: #343a40;
}

.tracking-history small {
    color: #6c757d;
}

/* Admin Dashboard Cards */
.admin-card-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #007bff;
}

.admin-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #343a40;
}

.admin-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #007bff;
}

.card {
    border: none; /* Remove default card border */
    border-radius: 12px; /* Rounded corners for all cards */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Consistent shadow */
}

.card-header {
    background-color: #007bff; /* Primary color for card headers */
    color: white;
    font-weight: 600;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 1rem 1.25rem;
}

/* Forms Styling */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

.btn-success { background-color: #28a745; border-color: #28a745; }
.btn-success:hover { background-color: #218838; border-color: #1e7e34; }

.btn-info { background-color: #17a2b8; border-color: #17a2b8; }
.btn-info:hover { background-color: #138496; border-color: #117a8b; }

.btn-warning { background-color: #ffc107; border-color: #ffc107; color: #343a40 !important; }
.btn-warning:hover { background-color: #e0a800; border-color: #d39e00; }

.btn-danger { background-color: #dc3545; border-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; border-color: #bd212f; }

.btn-secondary { background-color: #6c757d; border-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; border-color: #545b62; }


/* Footer Styling */
.footer {
    background-color: #212529 !important; /* Darker footer */
    color: #adb5bd !important;
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.footer h5 {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer .text-muted {
    color: #adb5bd !important;
}

.footer a {
    color: #adb5bd !important;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #007bff !important;
    text-decoration: none;
}

.footer .social-icons a {
    font-size: 1.5rem;
    margin-right: 15px;
}

.footer .social-icons a:hover {
    color: #007bff !important;
}

.footer .list-unstyled li {
    margin-bottom: 8px;
}

/* Alert Messages */
.alert {
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Specific Adjustments */
.text-primary {
    color: #007bff !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.badge {
    padding: 0.5em 0.8em;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 0.35rem;
}

.form-label {
    font-weight: 500;
    color: #343a40;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jumbotron h1 {
        font-size: 2.5rem;
    }
    .jumbotron .lead {
        font-size: 1.2rem;
    }
    .feature-box {
        margin-bottom: 1.5rem;
    }
    .navbar-brand {
        font-size: 1.3rem;
    }
    .navbar-brand i {
        font-size: 1.5rem;
    }
}

/* Tawk.to visibility fixes: ensure the chat bubble is above other elements and visible on mobile */
/* Targets common Tawk container ids/classes and the injected iframe by src */
iframe[src*="tawk.to"],
#tawk-minified-widget,
#tawkchat-minified,
.tawk-minified,
.tawk-embed,
.tawk-chat,
.tawk-box {
    z-index: 2147483000 !important; /* very high to be above site elements */
    pointer-events: auto !important;
}

/* Give a safe bottom offset on mobile (accounts for home indicator / sticky footers) */
@media (max-width: 600px) {
    iframe[src*="tawk.to"],
    #tawk-minified-widget,
    #tawkchat-minified,
    .tawk-minified,
    .tawk-embed,
    .tawk-chat,
    .tawk-box {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        right: 16px !important;
    }
}