/* LEAFLINK SUPPLY CHAIN LIMITED - Main Stylesheet */
/* Refined Menu and Topbar Styles - Bootstrap 3 Compatible */

/* ----------------------------------------------------------------
   1. Global Resets & Colors
-----------------------------------------------------------------*/
:root {
    --brand-green: #73b21a;
    --text-dark: #333;
    --text-light: #666;
    --white: #fff;
}

/* Ensure no conflict with Bootstrap grid */
.row:before, .row:after, .clearfix:before, .clearfix:after {
    display: table;
    content: " ";
    clear: both;
}

/* ----------------------------------------------------------------
   2. Topbar Layout (Fixing the "Mess")
-----------------------------------------------------------------*/
.topbar {
    background-color: #f8f8f8;
    color: #666;
    font-size: 13px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
    width: 100%;
    min-height: 40px;
}

/* Specific resets for Topbar lists to prevent stacking */
.topbar ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block;
}

.topbar ul li {
    display: inline-block !important;
    margin-right: 15px;
    list-style: none !important;
    vertical-align: middle;
}

.topbar-left {
    float: left;
    text-align: left;
}

.topbar-right {
    float: right;
    text-align: right;
}

/* Fix for specific widgets */
.topbar-office li, .list-social li {
    display: inline-block;
}

.topbar a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.topbar a:hover {
    color: #73b21a;
}

/* ----------------------------------------------------------------
   3. Header Layout (Bootstrap 3 Compatible)
-----------------------------------------------------------------*/
.site-header {
    background: #fff;
    padding: 15px 0;
    position: relative;
    z-index: 1000;
    width: 100%;
}

/* REMOVED FLEXBOX to fix grid conflict */
.header-main .row {
    /* Let Bootstrap handle .row */
}

/* Logo Alignment */
.site-logo {
    /* Bootstrap handles width (col-md-3) */
    padding-top: 5px;
}

.site-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

/* ----------------------------------------------------------------
   4. Main Navigation Alignment
-----------------------------------------------------------------*/
/* Pull menu to the right within col-md-9 */
.site-menu {
    text-align: right; /* Aligns inline-block menu items */
}

.main-nav {
    display: inline-block; /* Allows text-align to work */
    width: 100%;
}

.main-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    float: right; /* Force right alignment */
}

.main-nav .menu > li {
    display: inline-block; /* Horizontal flow */
    position: relative;
    margin-left: 30px;
    padding: 0;
    float: left; /* Ensures correct horizontal stacking */
}

.main-nav .menu > li > a {
    color: #333;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    padding: 25px 0; /* Increase padding for vertical center */
    display: block;
    position: relative;
    text-decoration: none;
    line-height: 20px;
}

/* Hover Line Effect */
.main-nav .menu > li > a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 20px;
    left: 0;
    background-color: #73b21a;
    transition: width 0.3s ease;
}

.main-nav .menu > li:hover > a,
.main-nav .menu > li.current-menu-item > a {
    color: #73b21a;
}

.main-nav .menu > li:hover > a:after,
.main-nav .menu > li.current-menu-item > a:after {
    width: 100%;
}

/* ----------------------------------------------------------------
   5. Dropdown Sub-menu (Fixing Visibility)
-----------------------------------------------------------------*/
.main-nav .menu .sub-menu {
    position: absolute;
    top: 100%; 
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 0;
    list-style: none;
    display: none; /* Hide by default */
    z-index: 9999;
    text-align: left;
    border-top: 3px solid #73b21a;
}

/* Show on hover */
.main-nav .menu li:hover .sub-menu {
    display: block;
    animation: fadeInUp 0.3s ease;
}

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

.main-nav .menu .sub-menu li {
    display: block;
    float: none; /* Stack vertically */
    margin: 0;
    border-bottom: 1px solid #f5f5f5;
}

.main-nav .menu .sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: #555;
    font-size: 14px;
    font-weight: 400;
    text-transform: capitalize;
    line-height: 1.5;
}

.main-nav .menu .sub-menu li a:hover {
    background-color: #f9f9f9;
    color: #73b21a;
    padding-left: 25px; /* Slide effect */
}

/* ----------------------------------------------------------------
   6. Mobile & Responsive Adjustments
-----------------------------------------------------------------*/
@media (max-width: 991px) {
    .site-menu {
        display: none; /* Hide desktop menu on tablet/mobile */
    }
    
    .navbar-toggle {
        display: block !important;
        float: right;
        margin-top: 10px;
        margin-right: 15px;
        background: transparent;
        border: none;
    }
    
    .navbar-icon .navbars-line {
        background-color: #333;
        display: block;
        width: 24px;
        height: 2px;
        position: relative;
    }
    
    .navbar-icon .navbars-line:before,
    .navbar-icon .navbars-line:after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: #333;
        left: 0;
    }
    
    .navbar-icon .navbars-line:before { top: -6px; }
    .navbar-icon .navbars-line:after { bottom: -6px; }

    /* Topbar Stacking */
    .topbar-left, .topbar-right {
        float: none;
        text-align: center;
        display: block;
        margin-bottom: 5px;
    }
}

/* ----------------------------------------------------------------
   7. Transparent & Sticky Header Fixes
-----------------------------------------------------------------*/
.header-transparent .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-sticky .site-header.minimized {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Adjustments for sticky mode */
.header-sticky .site-header.minimized .site-logo img {
    max-height: 50px;
}
.header-sticky .site-header.minimized .main-nav .menu > li > a {
    padding: 15px 0;
}

/* ----------------------------------------------------------------
   8. User Requested Color Adjustments
-----------------------------------------------------------------*/
/* White text for section with bg-box-2.jpg */
.features-1 .box-title span,
.features-1 .desc p,
.features-1 .fh-icon i {
    color: #fff !important;
}

/* White text for footer/bottom bar */
.site-footer,
.site-footer .site-info,
.site-footer a,
.site-footer p {
    color: #fff !important;
}

/* ----------------------------------------------------------------
   9. Express Partners Optimization
-----------------------------------------------------------------*/
.partener-1 .partner-item img {
    max-width: 140px;
    margin: 0 auto;
    display: block;
    height: auto;
}

.partener-1 .fh-partner {
    position: relative;
}

.partener-1 .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    margin-top: -20px;
    pointer-events: none;
}

.partener-1 .owl-prev,
.partener-1 .owl-next {
    position: absolute;
    background: rgba(0,0,0,0.3) !important;
    color: #fff !important;
    font-size: 20px !important;
    padding: 5px 15px !important;
    border-radius: 3px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.partener-1 .owl-prev:hover,
.partener-1 .owl-next:hover {
    background: rgba(0,0,0,0.8) !important;
}

.partener-1 .owl-prev {
    left: -20px;
}

.partener-1 .owl-next {
    right: -20px;
}
