/* ======= Procedures Module ======= */

:root {
  --area-heading-height: 60px;
}

.mod-procedures {
  .areas-list {
    display: grid;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 0;
    padding-bottom: 10px;
    row-gap: 10px;
    /* grid-area: services-list; */

    /* Tablet Styles */
    @media (width >= 768px) {
      grid-template-columns: 1fr 1fr;
      column-gap: 14px;
      row-gap: 18px;
      grid-template-rows: repeat(6, minmax(50px, auto)); 
    }

    /* Desktop Styles */
    @media (width >= 1024px) {
      column-gap: 32px;
      row-gap: 37px;
      grid-template-rows: repeat(9, minmax(50px, auto)); 
    }
    /* OLD Tablet Styles */
    /* @media (width >= 768px) {
      grid-template-columns: 1fr 1fr;
      column-gap: 10px;
    } */

    /* OLD Desktop Styles */
    /* @media (width >= 1024px) {
      grid-template-columns: 1fr 1fr 1fr 1fr;
      column-gap: 13px;
      row-gap: 13px;
    } */

    >li {
      background-repeat: no-repeat;
      background-size: cover;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      position: relative;
      min-height: 100vw;

      /* Tablet Styles */
      @media (width >= 768px) {
        min-height: 50vw;
        grid-row-end: span 2;
      }
      
      /* Desktop Styles */
      @media (width >= 1024px) {
        .not--device & {
          min-height: 438px;
          grid-row-end: span 3;
        }
      }

      /* Selecting the first 3 Procedure Areas */
      &:nth-last-of-type(-n+3) {
        @media (width >= 768px) {
          grid-column: 1;
        }
      }

      /* Selecting the last 2 Procedure Areaa */
      &:nth-last-of-type(-n+2) {
        @media (width >= 768px) {
          grid-column: 2;
        }
      }

      /* Placing Each Procedure Area */

      &:nth-of-type(1) {
        @media (width >= 768px) {
          grid-row-start: 1;
        }
      }

      &:nth-of-type(2) {
        @media (width >= 768px) {
          grid-row-start: 3;
        }
        @media (width >= 1024px) {
          grid-row-start: 4;
        }
      }

      &:nth-of-type(3) {
        @media (width >= 768px) {
          grid-row-start: 5;
        }
        @media (width >= 1024px) {
          grid-row-start: 7;
        }
      }

      &:nth-of-type(4) {
        @media (width >= 768px) {
          grid-row-start: 2;
        }
        @media (width >= 1024px) {
          grid-row-start: 3;
        }
      }

      &:nth-of-type(5) {
        @media (width >= 768px) {
          grid-row-start: 4;
        }
        @media (width >= 1024px) {
          grid-row-start: 6;
        }
      }
    }
  }

  .area-wrap {
    transition: all 0.5s;
    position: absolute;
    width: 100%;
    height: 100%;
    /* transform: translateY(100%); */

    .area-heading {
      font-size: 39px;
      line-height: 1em;
      font-weight: var(--fw-regular);
      color: var(--light-alt);
      /* padding-bottom: 20px; */

      /* New */
      position: absolute;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      text-decoration: none;
      bottom: 0;
      /* transform: translateY(-100%); */
      display: flex;
      align-items: flex-end;
      transition: all .5s;

      h3,
      .h3 {
        color: var(--light-color);
        text-align: center;
        /* background-color: var(--primary-color); */
        text-decoration: none;
        font-weight: var(--fw-bold);
        letter-spacing: .05em;
        /* padding-left: 20px; */
        /* width: 100%; */
        /* padding: 10px 0; */
        padding-bottom: 20px;
        margin: 0 auto;
        border-bottom: 1px solid rgb(from var(--primary-alt) r g b / 0);
        transition: all .5s;
      }
    }
  }

  .overlay,
  .underlay {
    background-color: rgb(from var(--dark-color) r g b / 0.0);
    transition: all 0.5s;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    mix-blend-mode: multiply;
  }

  .underlay {
    background: linear-gradient(rgb(from var(--dark-color) r g b / 0.0) 60%, rgb(from var(--dark-color) r g b / 0.60) 100%);
  }

  .bg-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all .5s;
    }
  }

  .home-procedures {
    /* transform: translateY(0); */
    transition: all 0.5s;
    padding-top: 20px;
    margin-left: 20px;
    list-style: none;
    /* display: none; */
  }

  .procedure-each {
    margin-bottom: 0.63em;

    a {
      font-size: 19px;
      line-height: 1em;
      font-weight: var(--fw-regular);
      text-decoration: none;
      color: var(--light-color);

      &:hover,
      &:active,
      &:focus {
        color: var(--primary-color);
      }
    }
  }

  /* .section-outro-container {
    text-align: center;
  } */
}

/* Hover State for areas with procedures. Not to be used on Express Build */

.mod-procedures {
  .areas-list {
    >.has-procedures {

      /* Desktop Styles */
      @media (width >= 1024px) {

        &:hover,
        &:active,
        &:focus {
          /* .area-wrap {
            transform: translateY(var(--area-heading-height));
          } */

          .overlay {
            /* background-color: rgb(from var(--dark-color) r g b / 0.5); */
            background-color: rgb(from var(--primary-color) r g b / 0.25)
          }

          .bg-photo {
            img {
              transform: scale(1.1);
            }
          }

          /* .home-procedures {
            transform: translateY(-60px);
            display: block;
          } */
          .proc-list-skin {

            /* Desktop Styles */
            @media (width >= 1024px) {
              column-count: 2;
            }
          }

          /* .area-heading {
            h3, .h3 {
              border-bottom: 1px solid var(--light-alt);
            }
          } */
        }
      }
    }

    /* For areas without procedures ONLY */

    >.no-procedures {

      /* Desktop Styles */
      @media (width >= 1024px) {

        &:hover,
        &:active,
        &:focus {
          .overlay {
            background-color: rgb(from var(--primary-color) r g b / .75);
          }
          .area-heading {
            /* transform: translateY(calc(50% + calc(var(--area-heading-height) / 2))); */
            bottom: 50%;
            h3, .h3 {
              border-color: rgb(from var(--primary-alt) r g b / 1);
              padding-bottom: 10px;
            }
          }
 
          /* h3,
          .h3 {
            transform: translateY(-50%);
          } */
        }
      }
    }
  }
}


/* ======= End Procedures Module ======= */