/*
Theme Name:   Madison Child Theme for Divi
Theme URI:    https://brandandbuildtemplates.me/themes/madison/
Description:  For Coaches & Entrepreneurs
Author:       Brand & Build
Author URI:   https://brandandbuild.me
Template:     Divi
Version:      1.0
*/

/****************/
/*Global styling*/
/****************/

/*Madison Colour Variables*/

/*Edit the values below to change the custom CSS colours sitewide*/

:root {
    --bb-madison-dark: #33333a;
    --bb-madison-light: #ffffff;
    --bb-madison-biscuit: #f8f7f2;
    --bb-madison-grey: #dfdfdf;
    --bb-madison-silver: #bee2d6;
    --bb-madison-blue: #38c1b7;
}

/* Prevent page overflow */

#page-container {
    overflow: hidden;
}

/*Scrollbars*/

html {
    scrollbar-color: var(--bb-madison-dark) var(--bb-madison-biscuit);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--bb-madison-grey);
    border-radius: 0;
}

::-webkit-scrollbar-track {
    background: var(--bb-madison-silver);
}

::-webkit-scrollbar-thumb:window-inactive {
    background: var(--bb-madison-blue);
    opacity: 1;
}

/*Back to top*/

.et_pb_scroll_top::before {
    content: '↑';
    color: var(--bb-madison-blue);
}

.et_pb_scroll_top.et-pb-icon {
    background: transparent;
    bottom: 50px;
    padding: 15px;
}

/* Header Menu */

#bb-madison-header-menu
    .et-menu
    .menu-item-has-children
    > a:first-child::after {
    top: 50%;
    transform: translate(0, -50%);
}

#bb-madison-header-menu.et_pb_menu ul li {
    margin-top: 0;
}

#bb-madison-header-menu .et-menu-nav > ul ul,
#bb-madison-header-menu.et_pb_menu ul.sub-menu li.menu-item {
    padding: 0;
}

#bb-madison-header-menu .et_pb_menu__menu ul.sub-menu li.menu-item a {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    width: 240px;
}

/* Set mobile menu to scroll */
#bb-madison-header-menu .et_mobile_menu {
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    width: 100vw;
    right: -30px;
    left: auto;
    box-shadow: none;
    padding: 0;
}

/*Optin*/

/*Flex the optin fields*/

.bb-madison-slim-optin .et_pb_newsletter_field {
    flex: 1 1 auto !important;
}

/*Stop fields wrapping*/

.bb-madison-slim-optin .et_pb_newsletter_fields {
    /* flex-wrap: nowrap; */
    gap: 10px;
}

/*Don't resize the button*/

.bb-madison-slim-optin .et_pb_newsletter_button_wrap {
    flex: 1 1 auto;
}

/*Remove the email padding*/

.bb-madison-slim-optin .et_pb_newsletter_form p.et_pb_newsletter_field {
    padding-bottom: 0;
}

/* Blurbs */

.bb-madison-number-blurb .et_pb_blurb_container {
    display: flex;
    align-items: center;
}

@media all and (max-width: 767px) {
    .bb-madison-number-blurb .et_pb_blurb_container {
        flex-direction: column;
    }
}

.bb-madison-number-blurb-alt .et_pb_module_header span {
    vertical-align: sub;
    line-height: 0.5;
}

.bb-madison-number-blurb-alt h5 {
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

/**************/
/*Page styling*/
/**************/

/* Home page */

.bb-madison-testimonial-slider.et_pb_module.et_pb_slider {
    overflow: visible;
}

.bb-madison-testimonial-slider .et_pb_slide_description .et_pb_slide_title {
    order: 1;
}

/* Arrow styling */
.bb-madison-testimonial-slider .et-pb-arrow-prev::before,
.bb-madison-testimonial-slider .et-pb-arrow-next::before {
    font-size: 32px;
}

.bb-madison-testimonial-slider .et-pb-arrow-prev::before {
    content: '←';
}

.bb-madison-testimonial-slider .et-pb-arrow-next::before {
    content: '→';
}

.bb-madison-testimonial-slider .et-pb-arrow-next,
.bb-madison-testimonial-slider:hover .et-pb-arrow-next {
    right: -80px;
}

.bb-madison-testimonial-slider .et-pb-arrow-prev,
.bb-madison-testimonial-slider:hover .et-pb-arrow-prev {
    left: -80px;
}
@media all and (max-width: 980px) {
    .bb-madison-testimonial-slider .et-pb-arrow-next,
    .bb-madison-testimonial-slider:hover .et-pb-arrow-next {
        right: -60px;
    }

    .bb-madison-testimonial-slider .et-pb-arrow-prev,
    .bb-madison-testimonial-slider:hover .et-pb-arrow-prev {
        left: -60px;
    }
}

@media all and (max-width: 767px) {
    .bb-madison-testimonial-slider .et-pb-arrow-next,
    .bb-madison-testimonial-slider:hover .et-pb-arrow-next {
        right: -20px;
    }

    .bb-madison-testimonial-slider .et-pb-arrow-prev,
    .bb-madison-testimonial-slider:hover .et-pb-arrow-prev {
        left: -20px;
    }
}

/* Sales page */

@media all and (min-width: 981px) {
    .bb-madison-pricing-table .et_pb_pricing_table_wrap {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        grid-gap: 20px;
    }
}

@media all and (max-width: 980px) {
    .bb-madison-pricing-table .et_pb_pricing_table_wrap {
        display: flex;
        flex-direction: column;
    }

    .bb-madison-pricing-table .et_pb_pricing_table {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 50px !important;
    }

    .bb-madison-pricing-table .et_pb_pricing_table:last-child {
        margin-bottom: 0 !important;
    }
}

/* Blog global */

.bb-madison-blog .post-content .post-content-inner {
    margin-bottom: 20px;
}

.bb-madison-blog .et_pb_post a.more-link:after {
    content: '→';
    font-size: 26px;
    transition: all 0.3s ease;
}
.bb-madison-blog .et_pb_post a.more-link:hover::after {
    margin-left: 20px;
}

/* Pagination */
.bb-madison-blog .pagination .alignleft,
.bb-madison-blog .pagination .alignright {
    margin-left: 10px;
    position: relative;
}

.bb-madison-blog .pagination .alignright {
    margin-right: 10px;
    margin-left: 0;
}

.bb-madison-blog .pagination .alignleft::before,
.bb-madison-blog .pagination .alignright::after {
    content: '';
    background: var(--bb-madison-light);
    width: 30px;
    height: 100%;
    position: absolute;
    margin-left: -10px;
}

.bb-madison-blog .pagination .alignleft a::after {
    content: '←';
    position: absolute;
    font-size: 26px;
    left: -10px;

    top: 0;
    color: initial;
    transform: translateY(-12.5%);
    transition: all 0.3s ease;
}
.bb-madison-blog .pagination .alignright::after {
    right: -10px;
}

.bb-madison-blog .pagination .alignright a::before {
    content: '→';
    position: absolute;
    font-size: 26px;
    right: -10px;
    top: 0;
    color: initial;
    z-index: 1;
    transform: translateY(-12.5%);
    transition: all 0.3s ease;
}

.bb-madison-blog .pagination .alignleft:hover a::after {
    left: -30px;
}

.bb-madison-blog .pagination .alignright:hover a::before {
    right: -30px;
}

/*Blog Grid*/

/* Set the grid sizing */
.bb-madison-blog-grid .et_pb_ajax_pagination_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    grid-gap: 50px;
}

@media all and (min-width: 1200px) {
    .bb-madison-blog-grid .et_pb_ajax_pagination_container {
        grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    }
}

/* Flex the posts */
.bb-madison-blog-grid .et_pb_post {
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin-bottom: 0;
    background: var(--bb-madison-biscuit);
}

/* Remove image spacing */
.bb-madison-blog-grid .entry-featured-image-url {
    margin: -20px -20px 20px -20px;
}

/* Make pagination fullwidth */
.bb-madison-blog-grid .et_pb_ajax_pagination_container div {
    grid-column: 1 / -1;
}

/* Blog Inline */

.bb-madison-blog-inline .et_pb_post {
    margin-bottom: 80px;
}

.bb-madison-blog-inline .et_pb_post:nth-of-type(odd)::before,
.bb-madison-blog-inline .et_pb_post:nth-of-type(even)::before {
    content: '';
    position: absolute;
    width: 100vw;
    height: 120%;
    top: -5%;
    z-index: -1;
}

.bb-madison-blog-inline .et_pb_post:nth-of-type(odd)::before {
    background: var(--bb-madison-silver);
    left: 20vw;
    right: auto;
}

.bb-madison-blog-inline .et_pb_post:nth-of-type(even)::before {
    background: var(--bb-madison-biscuit);
    left: auto;
    right: 20vw;
}

@media all and (min-width: 768px) {
    /* Post min height */
    .bb-madison-blog-inline .et_pb_post {
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-bottom: 150px;
    }
    /* Size the image */
    .bb-madison-blog-inline .entry-featured-image-url {
        width: 50%;
        margin-bottom: 0;
        height: 100%;
        order: 2;
    }
    .bb-madison-blog-inline .entry-featured-image-url img {
        -o-object-fit: cover;
        object-fit: cover;
        height: 100%;
    }
    .bb-madison-blog-inline .entry-title {
        order: 0;
        width: 60%;
    }
    .bb-madison-blog-inline .post-meta {
        order: 1;
        margin-bottom: 15px;
    }
    .bb-madison-blog-inline
        .et_pb_post:nth-of-type(even)
        .entry-featured-image-url {
        margin-left: 50%;
    }
    /* Position the content */
    .bb-madison-blog-inline .post-content {
        position: absolute;
        margin-left: calc(50% + 50px);
        margin-top: 20px;
    }

    .bb-madison-blog-inline .et_pb_post:nth-of-type(even) .entry-title,
    .bb-madison-blog-inline .et_pb_post:nth-of-type(even) .post-meta {
        margin-left: 40%;
        text-align: right;
    }

    .bb-madison-blog-inline .et_pb_post:nth-of-type(even) .post-content {
        position: absolute;
        margin-left: 0;
        margin-right: calc(50% + 50px);
        margin-top: 20px;
    }
    /* Background */
    .bb-madison-blog-inline .et_pb_post:nth-of-type(odd)::before,
    .bb-madison-blog-inline .et_pb_post:nth-of-type(even)::before {
        content: '';
        position: absolute;
        width: 80vw;
        height: 120%;
        z-index: -1;
    }
}

@media all and (max-width: 767px) {
    .bb-madison-blog-inline .pagination {
        padding-top: 30px;
    }
}

/* Kind words */

.bb-madison-testimonial-card {
    transition: all 0.3s ease-in-out;
}

/*Set the image position*/

.bb-madison-testimonial-card .et_pb_testimonial_portrait {
    position: absolute;
    bottom: 10px;
    left: 30px;
}

.bb-madison-testimonial-card .et_pb_testimonial_portrait::before {
    display: none;
}

/*Set the author info position*/

.bb-madison-testimonial-card .et_pb_testimonial_author,
.bb-madison-testimonial-card .et_pb_testimonial_meta {
    margin-left: 90px;
}

.bb-madison-testimonial-card .et_pb_testimonial_author {
    margin-top: 10px;
    margin-bottom: -10px;
}

/*Add the quote marks*/

.bb-madison-testimonial-card .et_pb_testimonial_description:before {
    content: '“';
    position: absolute;
    top: -0.165em;
    font-family: 'Arial Black', Gadget, sans-serif !important;
    color: var(--bb-madison-silver);
    font-size: 10em;
    line-height: 0.7em;
    left: -0.165em;
}

/*Media queries*/

/*Remove description margin on smaller screens*/

@media all and (max-width: 980px) {
    .bb-madison-testimonial-card .et_pb_testimonial_description {
        margin-left: 0 !important;
    }
}

/* Single Posts /

/*Lists*/

.bb-madison-sans-headings li::marker,
.bb-madison-post-content li::marker,
.bb-madison-sidebar li::marker {
    color: var(--bb-madison-blue);
    font-weight: 700;
}

.bb-madison-sidebar ul li {
    list-style-type: square !important;
    margin-bottom: 0.3em;
}

/* Post navigation */

.bb-madison-post-nav .nav-previous a,
.bb-madison-post-nav .nav-next a {
    display: inline-flex;
}

.bb-madison-post-nav .nav-previous .meta-nav,
.bb-madison-post-nav .nav-next .meta-nav {
    transform: translateY(-10%);
    transition: all 0.3s ease;
}

.bb-madison-post-nav .nav-previous .nav-label {
    margin-left: 5px;
}

.bb-madison-post-nav .nav-next .nav-label {
    margin-right: 5px;
}

.bb-madison-post-nav .nav-previous:hover .meta-nav {
    margin-right: 20px;
    margin-left: -20px;
}

.bb-madison-post-nav .nav-next:hover .meta-nav {
    margin-right: -20px;
    margin-left: 20px;
}

/* Sidebar */

.bb-madison-sidebar ul {
    padding: 0 0 0 1em !important;
}

/* Dropdowns */

.bb-madison-sidebar .et_pb_widget select {
    border-radius: 0;
    border: none;
    color: var(--bb-madison-dark);
    height: 40px;
    font-size: inherit;
    text-align: center;
    -moz-text-align-last: center;
    -ms-text-align-last: center;
    text-align-last: center;
    background: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+)
        no-repeat 100% 50%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bb-madison-light);
}

/*Comment form*/

.bb-madison-comments a {
    color: var(--bb-madison-blue);
    font-weight: 700;
}

.bb-madison-comments #commentform input {
    width: 100%;
}

.bb-madison-comments #commentform input#wp-comment-cookies-consent {
    width: auto;
}
