<?php 
    $logo = '';
    $theme_color = '';
    $theme_secondary_color = '';

    $current_slug = get_post_field('post_name', get_post());
    switch ($current_slug) {
        case "crown-homes":
            $logo = home_url('/wp-content/uploads/2021/05/crown-homes-logo.svg');
            $theme_color = '#a98d59';
            $theme_secondary_color = '#a98d59';
            break;
        case "next-furniture":
            $logo = home_url('/wp-content/uploads/2020/04/AfolibaGroup-Next-furniture-23.svg');
            $theme_color = '#f7941d';
            $theme_secondary_color = '#6b7787';
            break;
        case "luma-medical-care":
            $logo = home_url('/wp-content/uploads/2020/04/Luma-medical-care-logo.svg');
            $theme_color = '#168f9e';
            $theme_secondary_color = '#168f9e';
            break;
        case "jabosung-motors":
            $logo = home_url('/wp-content/uploads/2020/04/AfolibaGroup-Jabosung-4.svg');
            $theme_color = '#ed1c24';
            $theme_secondary_color = '';
            break;
        case "a-g-insurance-broker":
            $logo = home_url('/wp-content/uploads/2020/04/AfolibaGroup-AG-Insurance-logo.svg');
            $theme_color = '#607aa8';
            $theme_secondary_color = '#16263e';
            break;
        case "africa-delivery-express-adex":
            $logo = home_url('/wp-content/uploads/2021/11/AfolibaGroup-Adex-final.svg');
            $theme_color = '#fecf07';
            $theme_secondary_color = '#8f99a5';
            break;
        case "happuch-shipping-company":
            $logo = home_url('/wp-content/uploads/2020/04/AfolibaGroup-Happuch-new.svg');
            $theme_color = '#423163';
            $theme_secondary_color = '#423163';
            break;
        case "nfon-farms-limited":
            $logo = home_url('/wp-content/uploads/2020/10/AfolibaGroup-nfon-farms-.svg');
            $theme_color = '#29bbab';
            $theme_secondary_color = '#8dc63f';
            break;
        default:
            $logo = '';
            $theme_secondary_color = '';
        }
    ?>

<!-- overide parent styles -->
<style>
.afoliba-button-primary {
    background-color: <?= $theme_color ?> !important;
    color: #fff;
    border-color: <?= $theme_color ?> !important;
    text-shadow: none;
}
.btn-link {
    color: <?= $theme_color ?> !important;;
}
.-bg-dark-red-gradient {
    background: linear-gradient( 135deg, <?= $theme_color ?> 60%, <?= $theme_secondary_color ?> 100%) !important;
}
input, textarea{
    border: 1px solid <?= $theme_color ?> !important;
}
.channeltiles__link:after {
    background: <?= $theme_color ?> !important;
}

@media only screen and (min-width: 1210px) {
    #header-nav-container li.level1-node>a:after {
        background-color:<?= $theme_color ?> !important;
    }
}
</style>

<style>
.header__trigger {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    margin-right: 1.5rem;
    position: fixed;
    z-index: 99999;
}

.header__logo {
    background-color: #fff;
    display: block;
}

.header__logo-img {
    display: block;
    height: auto;
    padding: 1.1rem 1.3rem;
    width: 12.2rem;
}

#header-logo-container img {
    opacity: 0;
}

.subsidiary-title {
    color: <?= $theme_color ?> !important;
}
.card-callout-quick-links a i{
    color: <?= $theme_color ?> !important;
}

@media (min-width: 999px) {
    .header__trigger {
        display: inline-block;
        vertical-align: bottom;
        width: 18.5rem;
    }

    .header__logo-img {
        padding: 1.2rem 2.9rem;
        -webkit-transition: padding .2s;
        transition: padding .2s;
        width: 16.5rem;
    }
}
</style>

<div class="header__trigger">
    <div class="header__heading">
        <a href="<?php echo home_url('/subsidiaries/' . get_post_field( 'post_name', get_post() ))?>" rel="home"
            class="header__logo">
            <img src="<?php echo $logo ?>" alt="<?php the_title(); ?> logo" class="header__logo-img">
            <span class="sr-only"><?php the_title(); ?></span>
        </a>
    </div>
</div>