/* Custom updates to override existing styles */

/* Ensure text on count-bg-1.jpg is white */
.homecounts .count-title,
.homecounts .counter .value,
.homecounts .counter h4 {
    color: #fff !important;
}

/* Remove borders from Partners icons */
.partener-1 .fh-partner .partner-item {
    border: none !important;
}

/* Blog/News Layout Optimization */
.blog-wrapper .wrapper {
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 30px;
    border-radius: 4px;
}

.blog-wrapper .entry-header {
    margin-bottom: 15px;
}

.blog-wrapper .entry-title {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-wrapper .entry-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Remove topbar completely to eliminate blank area */
.topbar {
    display: none !important;
}

/* Remove extra spacing from logo area */
.site-logo {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.site-logo a.logo {
    display: block;
}

/* Ensure mobile menu doesn't have gaps */
.primary-mobile-nav {
    padding-top: 20px;
}

/* About Us & Company Culture Text Optimization */
.text-content-box {
    background: #fff;
    padding: 30px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.text-content-box h3, 
.text-content-box h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.text-content-box h3:after, 
.text-content-box h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #73b21a;
}

.text-content-box p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 15px;
}

.text-content-box ul li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    color: #555;
}

.text-content-box ul li:last-child {
    border-bottom: none;
}

.icon-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 30px;
}

/* Sticky Header Implementation */
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    z-index: 10000 !important;
    background: #fff !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    height: 90px !important;
}

/* Force header container to be full width */
.site-header .container {
    width: 100% !important;
    max-width: none !important;
    padding-left: 20px !important; /* Slight padding from edge */
    padding-right: 20px !important;
}

/* Adjust logo container to fit fixed height */
.site-logo {
    padding-top: 0 !important;
    padding-left: 0 !important;
    display: flex !important;
    align-items: flex-start !important; /* Align logo to the top */
    height: 90px !important;
}

/* Ensure menu hits the right edge */
.site-menu {
    padding-right: 0 !important;
}

/* Adjust navigation to vertically center */
.main-nav .menu > li > a {
    padding: 35px 0 !important;
}

/* Compensate for fixed header height in document flow */
#page {
    padding-top: 90px;
}

/* Ensure mobile menu positioning is correct */
.primary-mobile-nav {
    margin-top: 0;
    z-index: 10001; /* Above header */
}

/* Navigation Layout Optimization for Email Link */
.header-email-link a {
    color: #73b21a !important; /* Use brand color */
    font-weight: 600;
    text-transform: none !important; /* Keep email lowercase */
}

.header-email-link i {
    color: #73b21a;
    font-size: 16px;
    vertical-align: middle;
}

/* Desktop Navigation Flexbox Layout */
@media (min-width: 992px) {
    /* Flexbox Container for Logo and Menu to control spacing */
    .header-main .row {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    /* Logo: Auto width, maintain distance from menu */
    .site-logo {
        width: auto !important;
        flex: 0 0 auto !important;
        padding-right: 0 !important;
        margin-right: 60px !important; /* Explicit distance from Logo */
        margin-bottom: 0 !important;
    }

    /* Menu Container: Fill remaining space */
    .site-menu {
        width: auto !important;
        flex: 1 1 auto !important;
        position: static !important;
        padding-right: 0 !important;
    }

    /* Menu List: Flex layout to manage items */
    .main-nav .menu {
        display: flex !important;
        justify-content: flex-start !important; /* Align menu items to the Left */
        align-items: center !important;
        width: 100% !important;
        float: none !important;
    }

    /* Menu Items: Increased Spacing */
    .main-nav .menu > li {
        float: none !important;
        margin-left: 0 !important;
        margin-right: 45px !important; /* Increased spacing between buttons */
        display: block !important;
    }

    /* Email Link: Push to far right */
    .header-email-link {
        margin-left: auto !important; /* Dynamic spacer pushes email to far right */
        margin-right: 0 !important;
    }
}

/* Responsive adjustment for smaller desktops */
@media (min-width: 992px) and (max-width: 1350px) {
    .site-logo {
        margin-right: 30px !important;
    }
    .main-nav .menu > li {
        margin-right: 25px !important; /* Reduce spacing slightly to prevent wrapping */
    }
    .main-nav .menu > li > a {
        font-size: 14px !important;
    }
}
