/* Travel Track Services - Main Stylesheet */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --sidebar-width-desktop: 280px;
    --sidebar-width-mobile: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.service-card i {
    transition: transform 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.1);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
}

.whatsapp-link {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    transition: 0.3s;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 10px;
}

/* Button Styles */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, #0d6efd, #0dcaf0);
    border: none;
}

.btn-success {
    background: linear-gradient(45deg, #198754, #20c997);
    border: none;
}

/* Card Styles */
.card {
    border-radius: 15px;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Sidebar Specific Styles */
.sidebar {
    min-height: 100vh;
    background: #212529; /* Darker background for better contrast */
    color: #f8f9fa; /* Lighter text color */
    padding-top: 20px;
    padding-bottom: 20px; /* Space for bottom items */
    position: fixed; /* Changed from sticky to fixed for true independence */
    top: 56px; /* Height of navbar */
    bottom: 0;
    left: 0;
    z-index: 1000; /* Increased z-index */
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width-desktop);
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

/* Sidebar Links High Contrast */
.sidebar a {
    color: #ced4da; /* Light gray for inactive links */
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    border-left: 4px solid transparent;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar a:hover {
    background: #343a40;
    color: #fff;
    border-left-color: rgba(255,255,255,0.5);
}

.sidebar a.active {
    background: #2c3034;
    color: #fff;
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Enhanced Contrast for Sidebar Headers */
.sidebar-heading {
    font-size: 0.85rem;
    letter-spacing: 1.2px;
    color: #ffffff !important; /* Force Bright White */
    margin-top: 25px;
    margin-bottom: 10px;
    padding-left: 20px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8); /* Stronger shadow */
    opacity: 1;
}

/* Push logout to bottom if flex is used */
.sidebar .mt-auto {
    margin-top: auto !important;
}

/* Sidebar Toggle Button */
.sidebar-toggler {
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    transition: color 0.2s;
    z-index: 1030; /* Ensure clickable */
}
.sidebar-toggler:hover {
    color: #fff;
}

@media (max-width: 767.98px) {
    .sidebar {
        width: var(--sidebar-width-mobile);
        transform: translateX(-100%);
    }
    .sidebar.mobile-active {
        transform: translateX(0);
    }
    body.mobile-sidebar-open {
        overflow: hidden;
    }
    #sidebarOverlay {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        display: none;
        z-index: 999;
        opacity: 0;
        transition: opacity 0.2s ease-in-out;
    }
    body.overlay-active #sidebarOverlay {
        display: block;
        opacity: 1;
    }
}

/* Desktop collapse: slide sidebar off-screen and free content */
@media (min-width: 768px) {
    .sidebar.collapsed {
        transform: translateX(-100%);
        pointer-events: none;
    }
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
        pointer-events: none;
    }
}

main, footer, .col-md-9, .col-lg-10 {
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}


main.expanded, footer.expanded {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
.col-md-9.expanded, .col-lg-10.expanded {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Footer Alignment Fix */
footer {
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

/* Ensure footer respects sidebar on large screens ONLY when sidebar is present */
@media (min-width: 768px) {
    body:not(.sidebar-collapsed) .sidebar ~ main,
    body:not(.sidebar-collapsed) .sidebar ~ .col-md-9,
    body:not(.sidebar-collapsed) .sidebar ~ .col-lg-10 {
        margin-left: var(--sidebar-width-desktop) !important;
        width: calc(100% - var(--sidebar-width-desktop)) !important;
        max-width: calc(100% - var(--sidebar-width-desktop)) !important;
    }
    body.sidebar-collapsed .sidebar ~ main,
    body.sidebar-collapsed .sidebar ~ .col-md-9,
    body.sidebar-collapsed .sidebar ~ .col-lg-10 {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    body.has-sidebar:not(.sidebar-collapsed) footer {
        margin-left: var(--sidebar-width-desktop) !important;
        width: calc(100% - var(--sidebar-width-desktop)) !important;
        max-width: calc(100% - var(--sidebar-width-desktop)) !important;
    }
    body.has-sidebar.sidebar-collapsed footer {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Footer visual polish */
.site-footer {
    background-color: #212529; /* ensure consistent dark bg */
    overflow: hidden; /* avoid stray background edges */
}
.site-footer hr {
    border-color: rgba(255,255,255,0.12);
}
.site-footer .footer-col h5 {
    margin-bottom: 0.75rem;
    letter-spacing: 0.08em;
}
.site-footer .footer-col p {
    margin-bottom: 0;
}
.site-footer .footer-links ul,
.site-footer .footer-contact ul {
    padding-left: 0;
    margin: 0;
}
.site-footer .footer-links li,
.site-footer .footer-contact li {
    margin-bottom: 0.5rem;
}
.site-footer .footer-links a {
    display: inline-block;
    padding: 2px 0;
}
.site-footer .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 768px) {
    .site-footer .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Footer Link Hover Effect */
.hover-white:hover {
    color: #fff !important;
}
