/*
Theme Name: CMCT | Divi Child Theme
Theme URI: https://creativechildtheme.com
Description: Child Theme by creativechildthemes.com
Author: Fabio Sarcona
Author URI: https://creativechildtheme.com
Template: Divi
Version: 1.0
License:  GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
*/

/* -----------------------------------------------------------------------------
 Circle Menu by Callmenick from https://github.com/callmenick/CSS-Circle-Menu
----------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------

  Circle Menu Component

----------------------------------------------------------------------------- */

.c-circle-menu {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 24px;
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu {    
    width: 75px;    
    height: 75px;    
    -webkit-border-radius: 48px;
    border-radius: 48px;
  }
}

.c-circle-menu__items {
    display: block;
    list-style: none;
    position: absolute;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.c-circle-menu__item {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    opacity: 0;
    -webkit-transition: opacity, -webkit-transform;
    transition: transform, opacity, -webkit-transform;
    -webkit-transition-duration: 0.3s, 0.3s;
    transition-duration: 0.3s, 0.3s;
    -webkit-transition-timing-function: cubic-bezier(0.35, -0.59, 0.47, 0.97);
    transition-timing-function: cubic-bezier(0.35, -0.59, 0.47, 0.97);
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__item {    
    width: 82px;    
    height: 82px;    
    -webkit-border-radius: 48px;
    border-radius: 48px;
  }
}

/**
 * Transisition delays at the default state.
 */

.c-circle-menu__item:nth-child(1) {
    -webkit-transition-delay: 0.4s;
    transition-delay: 0.4s;
}

.c-circle-menu__item:nth-child(2) {
    -webkit-transition-delay: 0.3s;
    transition-delay: 0.3s;
}

.c-circle-menu__item:nth-child(3) {
    -webkit-transition-delay: 0.2s;
    transition-delay: 0.2s;
}

.c-circle-menu__item:nth-child(4) {
    -webkit-transition-delay: 0.1s;
    transition-delay: 0.1s;
}

.c-circle-menu__item:nth-child(5) {
    -webkit-transition-delay: 0s;
    transition-delay: 0s;
}

/**
 * We're using the .is-active class, which is added to the menu via JavaScript.
 * Once the menu is active, the items inherit the properties below. We will
 * manually write out the transform properties for first and last items, as we
 * already know their position. For all items in between though, we'll use some
 * polar-to-cartesian math and some Sass functions to get the positioning.
 */

 /* -----------------------------------------------------------------------------

  Below you can customize the position of every single items

----------------------------------------------------------------------------- */

.c-circle-menu.is-active .c-circle-menu__item {
    opacity: 1;
}

.c-circle-menu.is-active .c-circle-menu__item:nth-child(1) {
    -webkit-transition-delay: 0s;
    transition-delay: 0s;
    -webkit-transform: translate(-144px, 0);
    transform: translate(-144px, 0);
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu.is-active .c-circle-menu__item:nth-child(1) {    
    -webkit-transform: translate(-288px, 0);    
    transform: translate(-288px, 0);
  }
}

.c-circle-menu.is-active .c-circle-menu__item:nth-child(2) {
    -webkit-transition-delay: 0.1s;
    transition-delay: 0.1s;
    -webkit-transform: translate(-134px, -56px);
    transform: translate(-134px, -56px);
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu.is-active .c-circle-menu__item:nth-child(2) {    
    -webkit-transform: translate(-267px, -111px);    
    transform: translate(-267px, -111px);
  }
}

.c-circle-menu.is-active .c-circle-menu__item:nth-child(3) {
    -webkit-transition-delay: 0.2s;
    transition-delay: 0.2s;
    -webkit-transform: translate(-102px, -102px);
    transform: translate(-102px, -102px);
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu.is-active .c-circle-menu__item:nth-child(3) {    
    -webkit-transform: translate(-204px, -204px);    
    transform: translate(-204px, -204px);
  }
}

.c-circle-menu.is-active .c-circle-menu__item:nth-child(4) {
    -webkit-transition-delay: 0.3s;
    transition-delay: 0.3s;
    -webkit-transform: translate(-56px, -134px);
    transform: translate(-56px, -134px);
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu.is-active .c-circle-menu__item:nth-child(4) {    
    -webkit-transform: translate(-111px, -267px);    
    transform: translate(-111px, -267px);
  }
}

.c-circle-menu.is-active .c-circle-menu__item:nth-child(5) {
    -webkit-transition-delay: 0.4s;
    transition-delay: 0.4s;
    -webkit-transform: translate(0, -144px);
    transform: translate(0, -144px);
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu.is-active .c-circle-menu__item:nth-child(5) {    
    -webkit-transform: translate(0, -288px);    
    transform: translate(0, -288px);
  }
}

/**
 * Apart from the transform properties, we'll also make sure the items get
 * the correct opacity.
 */

/**
 * Let's style the links now. This is just boilerplate stuff, and of course,
 * you'll probably want to change up the icons to match your needs. In any case,
 * we'll do it here for the sake of completion.
 */

.c-circle-menu__link {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    box-shadow: inset 0 0 0 2px #fff; /** <--- Here you can customize the color of the border of each items **/
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__link {    
    -webkit-border-radius: 48px;
    border-radius: 48px;
  }
}

.c-circle-menu__link .fa {
    display: block;
    color: #fff; /** <--- Here you can customize the color of the link/icon of each items **/
    line-height: 78px;
    text-align: center;
    max-width: 100%;
    height: auto;
    font-size: 30px;
    -webkit-transition: all .3s;
    transition: all .3s;
}

@media only screen and (max-width: 480px) {
  .c-circle-menu__link .fa {    
    line-height: 48px;    
    font-size: 20px;
  }
}

.c-circle-menu__link .fa:hover {
    color: #2c4ae4; /** <--- Here you can customize the color of the link/icon of each items on hover **/
}

.c-circle-menu__link:hover {
    box-shadow: inset 0 0 0 2px #2c4ae4; /** <--- Here you can customize the color of the border of each items on hover **/
}

/* -----------------------------------------------------------------------------

  Label for Items Menu

----------------------------------------------------------------------------- */


@media only screen and (min-width: 481px) {
  .menu_items {    
    position: absolute;    
    top: 28px;    
    left: -95px;    
    color: #fff;    
    text-align: center;    
    font-size: 14px;    
    font-weight: 700;    
    background-color: #2c4ae4; /** <--- Here you can customize the background-color of the label **/   
    min-width: 100%;    
    -webkit-border-radius: 4px;
    border-radius: 4px;    
    -webkit-opacity: 0;
    opacity: 0;    
    -webkit-transition: all .3s;
    transition: all .3s;
  }
  .c-circle-menu__link:hover .menu_items {    
    -webkit-opacity: 1;
    opacity: 1;
  }
}

@media only screen and (max-width: 480px) {
  .menu_items {    
    display: none;
  }
}

/* -----------------------------------------------------------------------------
  The Toggle Component
----------------------------------------------------------------------------- */

/**
 * The toggle is a button element, and as such requires some resets that are
 * unique to buttons. This button also inherits some funky stuff from my
 * CSS animating hamburger menu icons demo, which can be found at this url:
 * https://github.com/callmenick/Animating-Hamburger-Icons
 */

.c-circle-menu__toggle {
    display: block;
    position: absolute;
    z-index: 100;
    margin: 0;
    padding: 0;
    width: 48px; /** <--- Here you can customize the size of the button for smartphones **/
    height: 48px;
    background-color: #2c4ae4; /** <--- Here you can customize the background-color of the button **/
    font: inherit;
    font-size: 0;
    text-indent: -9999px;
    border-radius: 24px;
    -webkit-transition: background 0.3s;
    transition: background 0.3s;
    /* reset some browser defaults */
    cursor: pointer;
    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__toggle {    
    width: 75px;    /** <--- Here you can customize the size of the button for tablets and Desktop **/
    height: 75px;    
    -webkit-border-radius: 48px;
    border-radius: 48px;
  }
}

.c-circle-menu__toggle:hover, .c-circle-menu__toggle:focus, .c-circle-menu__toggle.is-active {
    outline: none;
    background-color: #2c4ae4;
}

.c-circle-menu__toggle span, .c-circle-menu__toggle span::before, .c-circle-menu__toggle span::after {
    display: block;
    position: absolute;
    height: 4px;
    background: #fff;
    border-radius: 1px;
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__toggle span, .c-circle-menu__toggle span::before, .c-circle-menu__toggle span::after {    
    height: 4px;    
    -webkit-border-radius: 1px;
    border-radius: 1px;
  }
}

.c-circle-menu__toggle span {
    top: 22px;
    left: 10px;
    right: 10px;
    -webkit-transition: background 0.3s;
    transition: background 0.3s;
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__toggle span {    
    top: 35px;    
    left: 20px;    
    right: 20px;
  }
}

.c-circle-menu__toggle span::before, .c-circle-menu__toggle span::after {
    left: 0;
    width: 100%;
    content: "";
    -webkit-transition-duration: 0.3s, 0.3s;
    transition-duration: 0.3s, 0.3s;
    -webkit-transition-delay: 0.3s, 0s;
    transition-delay: 0.3s, 0s;
}

.c-circle-menu__toggle span::before {
    top: -8px;
    -webkit-transition-property: top, -webkit-transform;
    transition-property: top, transform, -webkit-transform;
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__toggle span::before {    
    top: -10px;
  }
}

.c-circle-menu__toggle span::after {
    bottom: -8px;
    -webkit-transition-property: bottom, -webkit-transform;
    transition-property: bottom, transform, -webkit-transform;
}

@media  (min-width: 480px) and (min-height: 480px) {
  .c-circle-menu__toggle span::after {    
    bottom: -10px;
  }
}

/* button active state */

.c-circle-menu__toggle.is-active span {
    background: none;
}

.c-circle-menu__toggle.is-active span::before {
    top: 0;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-transition-delay: 0s, 0.3s;
    transition-delay: 0s, 0.3s;
}

.c-circle-menu__toggle.is-active span::after {
    bottom: 0;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-transition-delay: 0s, 0.3s;
    transition-delay: 0s, 0.3s;
}

/* -----------------------------------------------------------------------------
  The Mask Component
----------------------------------------------------------------------------- */

/**
 * Here's the mask component, which actually gets created and inserted to the
 * DOM via JavaScript. It simply acts as an overlay to draw attention to the
 * menu when it is active. It also uses the .is-acvite state class.
 */

.c-circle-menu__mask {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-transition: opacity 0.6s, visibility 0.6s;
    transition: opacity 0.6s, visibility 0.6s;
}

.c-circle-menu__mask.is-active {
    opacity: 1;
    visibility: visible;
}