/* Bosnia Delivery Optimizer - Main Styles */

/* Navbar gradient style */
.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%) !important;
}

/* Logo styling */
.logo-image {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-image {
    transform: scale(1.1) rotate(5deg);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-mesh {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #82bce2 50%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    animation: gradient-shift 20s ease-in-out infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.navbar-brand {
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

/* Navbar dropdown styling */
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

/* Apply similar gradient to buttons and bg-primary */
.btn-primary,
.bg-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%) !important;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #34495e 0%, #2980b9 100%);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Danger button styling */
.btn-danger {
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Card styling to match the theme */
.card {
    border: none;
    border-radius: 10px;
}

.card-body {
    padding: 2rem;
}

.card.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

/* Table styling */
.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

/* Sortable table headers */
.sortable-table thead th:not(.no-sort) {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sortable-table thead th:not(.no-sort):hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Form styling */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

/* Info alert with primary gradient */
.alert-info {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%) !important;
    color: white !important;
    border: none !important;
}

.alert-info .btn-close {
    filter: brightness(0) invert(1);
}

.alert-info a {
    color: white;
    text-decoration: underline;
    font-weight: 500;
}

.alert-info a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Page header styling */
h2 {
    color: #2c3e50;
    font-weight: 600;
}

/* Stats cards styling */
.card .bi {
    opacity: 0.8;
}

/* Button group styling */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Modal styling */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Leaflet map container */
#map {
    z-index: 1;
    height: 500px;
    border-radius: 8px;
}

/* Column width helpers */
.w-5 {
    width: 5%;
}

.w-10 {
    width: 10%;
}

/* KPI card gradients */
.gradient-card-primary {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(52, 152, 219, 0.18) 100%);
}

.text-primary-custom {
    color: #3498db;
}

/* Icon sizing for stats */
.fs-2 {
    font-size: 2rem;
}

/* Empty state icons */
.empty-state-icon {
    font-size: 3rem;
    color: #ccc;
}

.empty-state-icon-lg {
    font-size: 4rem;
    color: #ccc;
}

/* Stats card icons */
.stats-icon {
    font-size: 2.5rem;
}

/* Progress bar styling */
.progress-bar-animated {
    width: 33%;
}

.progress-bar-animated-66 {
    width: 66%;
}

.progress-sm {
    height: 5px;
}

/* Table responsive wrapper */
.table-responsive-custom {
    max-height: 500px;
    overflow-y: auto;
}

/* Form select in table */
.form-select-sm-custom {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.875rem;
    max-width: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    #map {
        height: 400px !important;
    }
}

/* Brand-specific styles for homepage and contact */
.hero-gradient {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

/* Subtle background for public pages */
.public-page-bg {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.text-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.text-brand-dark {
    color: #2c3e50;
}

.text-brand-primary {
    color: #3498db;
}

.link-brand-dark {
    color: #2c3e50;
    text-decoration: none;
}

.link-brand-primary {
    color: #3498db;
    text-decoration: none;
}

/* Step circles for "How It Works" section */
.step-circle {
    width: 60px;
    height: 60px;
}

/* Contact information responsive styling */
.contact-info-item {
    word-break: break-word;
    overflow-wrap: break-word;
}

.contact-info-item a {
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Ensure contact info doesn't overflow on small screens */
@media (max-width: 576px) {
    .contact-info-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .contact-info-item .text-primary {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
}

.map-container {
  height: 500px;
}

/* ========================================
   VIDEO HERO SECTION STYLES
   ======================================== */

/* Video Hero Container */
.video-hero-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

/* Hero Video Styling */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Dark Overlay for Text Readability */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
}

/* Hero Content */
.video-hero-content {
    position: relative;
    z-index: 3;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Video Hero */
@media (max-width: 768px) {
    .video-hero-container {
        min-height: 400px;
    }
    
    .video-hero-content {
        padding: 3rem 1.5rem;
    }
    
    .video-hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Warehouse/Building Animation */
.warehouse {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 150px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: warehousePulse 3s ease-in-out infinite;
}

.warehouse::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 40px solid #2c3e50;
}

.warehouse::after {
    content: '🏭';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
}

/* Warehouse Door */
.warehouse-door {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: #1a252f;
    border-radius: 3px 3px 0 0;
}

/* Windows on Warehouse */
.warehouse-window {
    position: absolute;
    width: 25px;
    height: 25px;
    background: #f39c12;
    border-radius: 3px;
    animation: windowGlow 2s ease-in-out infinite alternate;
}

.warehouse-window:nth-child(1) {
    top: 40px;
    left: 20px;
}

.warehouse-window:nth-child(2) {
    top: 40px;
    right: 20px;
    animation-delay: 0.5s;
}

.warehouse-window:nth-child(3) {
    top: 80px;
    left: 20px;
    animation-delay: 1s;
}

.warehouse-window:nth-child(4) {
    top: 80px;
    right: 20px;
    animation-delay: 1.5s;
}

@keyframes windowGlow {
    0% {
        background: #f39c12;
        box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    }
    100% {
        background: #f1c40f;
        box-shadow: 0 0 20px rgba(241, 196, 15, 0.8);
    }
}

@keyframes warehousePulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.02);
    }
}

/* Road */
.road {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, #555 0%, #333 100%);
}

.road::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: repeating-linear-gradient(
        to right,
        #fff 0px,
        #fff 30px,
        transparent 30px,
        transparent 50px
    );
    animation: roadMoving 2s linear infinite;
}

@keyframes roadMoving {
    0% {
        transform: translateY(-50%) translateX(0);
    }
    100% {
        transform: translateY(-50%) translateX(-50px);
    }
}

/* Truck Animation */
.truck {
    position: absolute;
    bottom: 60px;
    left: -150px;
    width: 120px;
    height: 80px;
    animation: truckDrive 8s ease-in-out infinite;
}

.truck-body {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 80px;
    height: 50px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.truck-cabin {
    position: absolute;
    bottom: 20px;
    left: 80px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 5px 5px 5px 0;
}

.truck-cabin::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 30px;
    height: 20px;
    background: rgba(135, 206, 250, 0.5);
    border-radius: 3px;
}

.truck-wheel {
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 20px;
    background: #2c3e50;
    border-radius: 50%;
    border: 3px solid #555;
    animation: wheelRotate 1s linear infinite;
}

.truck-wheel:nth-child(1) {
    left: 10px;
}

.truck-wheel:nth-child(2) {
    left: 50px;
}

.truck-wheel:nth-child(3) {
    left: 90px;
}

@keyframes wheelRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes truckDrive {
    0% {
        left: -150px;
        transform: translateY(0);
    }
    45% {
        left: calc(50% - 200px);
        transform: translateY(0);
    }
    50% {
        left: calc(50% - 200px);
        transform: translateY(-5px);
    }
    55% {
        left: calc(50% - 200px);
        transform: translateY(0);
    }
    100% {
        left: 110%;
        transform: translateY(0);
    }
}

/* Clouds Animation */
.cloud {
    position: absolute;
    top: 20px;
    width: 80px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    animation: cloudFloat 20s linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.cloud::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 10px;
}

.cloud::after {
    width: 50px;
    height: 50px;
    top: -25px;
    right: 10px;
}

.cloud:nth-child(1) {
    top: 30px;
    animation-duration: 25s;
}

.cloud:nth-child(2) {
    top: 60px;
    animation-duration: 30s;
    animation-delay: -10s;
}

@keyframes cloudFloat {
    from {
        left: -100px;
    }
    to {
        left: 110%;
    }
}

/* Route Line Animation */
.route-line {
    position: absolute;
    bottom: 90px;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
}

.route-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e74c3c;
    animation: routeDraw 8s ease-in-out infinite;
}

@keyframes routeDraw {
    0% {
        width: 0;
        left: 0;
    }
    45% {
        width: 50%;
        left: 0;
    }
    100% {
        width: 0;
        left: 100%;
    }
}

/* Delivery Packages */
.package {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: packageBounce 2s ease-in-out infinite;
}

.package::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #d35400;
    transform: translateY(-50%);
}

.package::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #d35400;
    transform: translateX(-50%);
}

.package:nth-child(1) {
    bottom: 120px;
    left: 15%;
    animation-delay: 0s;
}

.package:nth-child(2) {
    bottom: 130px;
    left: 25%;
    animation-delay: 0.3s;
}

.package:nth-child(3) {
    bottom: 125px;
    right: 20%;
    animation-delay: 0.6s;
}

@keyframes packageBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Location Pins */
.location-pin {
    position: absolute;
    width: 40px;
    height: 40px;
    animation: pinPulse 2s ease-in-out infinite;
}

.location-pin::before {
    content: '📍';
    position: absolute;
    top: 0;
    left: 0;
    font-size: 40px;
}

.location-pin:nth-child(1) {
    top: 100px;
    left: 10%;
    animation-delay: 0s;
}

.location-pin:nth-child(2) {
    top: 80px;
    right: 15%;
    animation-delay: 0.5s;
}

.location-pin:nth-child(3) {
    top: 120px;
    left: 25%;
    animation-delay: 1s;
}

@keyframes pinPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Stats Counter Animation */
.stat-number {
    display: inline-block;
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Feature Cards Hover Animation */
.feature-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    transition: all 0.3s ease;
}

/* Dashboard Stats Animation for Logged In Users */
.dashboard-stat-card {
    transition: all 0.2s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.15) !important;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation for Async Operations */
.loading-truck {
    display: inline-block;
    width: 60px;
    height: 40px;
    position: relative;
    animation: truckBounce 1s ease-in-out infinite;
}

@keyframes truckBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Adjustments for Animations */
@media (max-width: 768px) {
    .hero-animation-scene {
        height: 300px;
    }
    
    .warehouse {
        width: 150px;
        height: 100px;
        bottom: 40px;
    }
    
    .warehouse::before {
        border-left: 75px solid transparent;
        border-right: 75px solid transparent;
        border-bottom: 30px solid #2c3e50;
    }
    
    .warehouse::after {
        font-size: 2rem;
    }
    
    .truck {
        width: 80px;
        height: 60px;
    }
    
    .truck-body {
        width: 50px;
        height: 35px;
    }
    
    .truck-cabin {
        width: 30px;
        height: 30px;
        left: 50px;
    }
    
    .truck-wheel {
        width: 15px;
        height: 15px;
    }
}