/*--------------------------------------------------------------
# Set main reusable colors and fonts using CSS variables
# Learn more about CSS variables at https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
--------------------------------------------------------------*/
/* Fonts */
:root {
  --font-default: #{$font-default};
  --font-primary: #{$font-primary};
  --font-secondary: #{$font-secondary};
}

/* Colors */
:root {
  --color-default: #{$default};
  --color-primary: #{$primary};
  --color-secondary: #{$secondary};
}

/* Smooth scroll behavior */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
  font-family: var(--font-default);
  color: var(--color-default);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: lighten($primary, 10);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
}

/*--------------------------------------------------------------
# Sections & Section Header
--------------------------------------------------------------*/
section {
  padding: 80px 0;
  overflow: hidden;
}

.section-header {
  text-align: center;
  padding: 30px 0;
  position: relative;

  h2 {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 0;
    color: darken($primary, 30);
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;

    &:after {
      content: '';
      position: absolute;
      display: block;
      width: 50px;
      height: 3px;
      background: var(--color-primary);
      left: 0;
      right: 0;
      bottom: 0;
      margin: auto;
    }
  }

  span {
    position: absolute;
    top: 46px;
    color: rgba($secondary, .06);
    left: 0;
    right: 0;
    z-index: 1;
    font-weight: 700;
    font-size: 56px;
    text-transform: uppercase;
    line-height: 0;
  }

  p {
    margin-bottom: 0;
    position: relative;
    z-index: 2;
  }

  @media (max-width: 640px) {
    h2 {
      font-size: 28px;
      margin-bottom: 15px;
    }
    span {
      font-size: 38px;
    }
  }
  
}

/*--------------------------------------------------------------
# Breadcrumbs
--------------------------------------------------------------*/
.breadcrumbs {
  
  .page-header {
    padding: 140px 0 80px 0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    &:before {
      content: '';
      background-color: rgba($secondary, 0.8);
      position: absolute;
      inset: 0;
    }
    h2 {
      font-size: 56px;
      font-weight: 500;
      color: #fff;
      font-family: var(--font-secondary);
    }

    p {
      color: rgba(#fff, .8);
    }
  }

  nav {
    background-color: lighten($secondary, 84);
    padding: 20px 0;

    ol {
      display: flex;
      flex-wrap: wrap;
      list-style: none;
      margin: 0;
      padding: 0;
      font-size: 16px;
      font-weight: 600;
      color: var(--color-secondary);
  
      a {
        color: var(--color-primary);
        transition: 0.3s;
        &:hover {
          text-decoration: underline;
        }
      }
  
      li + li {
        padding-left: 10px;
      }
  
      li + li::before {
        display: inline-block;
        padding-right: 10px;
        color: lighten($secondary, 40);
        
        content: "/";
      }
    }
  }

}

/*--------------------------------------------------------------
# Scroll top button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right:15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--color-primary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;

  i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
  }

  &:hover  {
    background: rgba($primary, .8);
    color: #fff;
  }

  &.active {
    visibility: visible;
    opacity: 1;
  }

}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: #fff;
  transition: all 0.6s ease-out;
  width: 100%;
  height: 100vh;

  &:before, &:after {
    content: "";
    position: absolute;
    border: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: animate-preloader 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  }

  &:after {
    animation-delay: -0.5s;
  }
}

@keyframes animate-preloader {
  0% {
    width: 10px;
    height: 10px;
    top: calc(50% - 5px);
    left: calc(50% - 5px);
    opacity: 1;
  }
  100% {
    width: 72px;
    height: 72px;
    top: calc(50% - 36px);
    left: calc(50% - 36px);
    opacity: 0;
  }
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}
