/*
Theme Name: TBX Core
Theme URI: 
Description: A custom WordPress theme for TBX Forest Hills
Version: 1.0
Author: TBX
Author URI: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tbx-core
*/

body {
  margin: 0;
}

.announcement-bar {
  position: relative;
  background-color: var(--color-darkblue);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 65px;

  .content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 25px;

    p {
      color: white;
      margin: 0;
      font-size: 14px;
      font-weight: 800;
      text-align: center;
    }

    a.text-link {
      margin: 0;
    }

  }

  img.close-announcement {
    position: absolute;
    right: 0;
    top: 0;
    width: 17px;
    height: 17px;
    right: 55px;
    top: 22px;

    &:hover {
      cursor: pointer;
    }
  }

  &.closed {
    display: none;
  }

  @media (max-width: 800px) {
    padding: 14px 55px;

    .content-wrapper {
      gap: 10px 25px;
    }

    img.close-announcement {
      right: 20px;
      top: 20px;
      width: 13px;
      height: 13px;
    }
  }
}

.video-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0 auto;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: 0.4s;

  .video-wrapper {
    width: 90%;
    max-width: 1080px;
    aspect-ratio: 16/9;

    iframe {
      width: 100%;
      height: 100%;
      min-height: 750px;
    }
  }

  img.close-video-popup {
    position: absolute;
    top: 45px;
    right: 45px;
    width: 30px;
    height: 30px;
    filter: invert(1);

    &:hover {
      cursor: pointer;
    }
  }

  @media (max-width: 800px) {
    img.close-video-popup {
      right: 25px;
      top: 25px;
      width: 25px;
      height: 25px;
    }
  }
}

#lightbox {
  display: none;
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 1);
  align-items: center;
  justify-content: center;
  z-index: 1000;

  button#close-lightbox {
    position: absolute;
    top: 65px;
    right: 25px;
    background: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;

    img {
      width: 25px;
    }
  }

  @media (max-width: 800px) {
    button#close-lightbox {
      top: 25px;
      right: 20px;
    }
  }
}

img.lightbox-trigger {
  &:hover {
    cursor: pointer;
  }
}

.search-results-page {
  padding: 65px;

  .content-wrapper {
    max-width: 1600px;
    margin: 0 auto;

    .search-header {
      background-color: var(--color-blue);
      padding: 65px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 25px;
      margin-bottom: 45px;

      h3 {
        text-align: center;
        color: white;
      }

      .search-filter-base {
        width: 400px;
        border-bottom: solid 2px white;

        .search-filter-input-text {
          font-family: 'bicyclette', sans-serif;
          border: none;
          color: white;
        }

        .search-filter-input-text__input::placeholder {
          color: white !important;

        }
      }
    }

    .search-filter-query-posts {
      .result-single {
        margin-bottom: 0;
        padding: 45px;

        &:nth-child(even) {
          background-color: var(--color-lightgray);
        }
      }
    }

    .pagination {
      margin-top: 25px;
      display: flex;
      justify-content: center;
      gap: 85px;
    }
  }

  @media (max-width: 800px) {
    padding: 45px 25px;

    .content-wrapper {
      .search-header {
        padding: 25px 25px 35px;
        gap: 0;
      }

      .search-filter-query-posts {
        .result-single {
          padding: 25px;

        }
      }
    }
  }
}

.dropdown-single {

  .dropdown-content {
    max-height: 0;
    visibility: hidden;
    opacity: 0;
    transition: 0.15s;

    &.active {
      visibility: visible;
      opacity: 1;
      padding-bottom: 25px;
    }
  }
}

.nav-wrapper {
  position: relative;
  z-index: 5;
  flex: 1;
  border-bottom: solid 1px white;

  #menu-global-menu {
    display: flex;
    justify-content: flex-end;
    position: relative;
    margin: 0;
    padding: 0;
    li {
      list-style: none;
      margin-left: 25px;

      &.schools {
        background-color: var(--color-blue);
        margin-left: 2px;

        a {
          color: white;
          padding: 0 17px;

          &:after {
            content: '';
            display: inline-block;
            position: relative;
            margin-left: 10px;
            background: url('public/svg/icon-chevron-up-darkblue.svg') no-repeat center center;
            background-size: contain;
            width: 14px;
            height: 9px;
            transform: scaleY(-1);
            transition: 0.2s;
          }
        }

        ul.sub-menu {
          box-shadow: 0 5px 10px rgba(0,0,0,0.5);

          ul.sub-menu {
            box-shadow: none;
          }
        }
      }

      a {
        display: flex;
        height: 32px;
        margin: 0;
        align-items: center;
        color: var(--color-darkgray);
      }

      ul.sub-menu {
        position: absolute;
        right: 0;
        top: 32px;
        background-color: var(--color-blue);
        z-index: 5;
        grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
        width: 950px;
        margin: 0;
        padding: 35px 65px;
        gap: 25px 60px;
        display: none;
        transition: 0.2s;

        &.active {
          display: grid;
        }

        li {
          margin-left: 0;
          
          &.heading {
            padding-bottom: 7px;
          }       

          a {
            padding: 0;
            height: auto;
            &:after {
              display: none;
            }
          }

          ul.sub-menu {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 5px;
            padding: 10px 0 0 0;
            top: 0;
            border-top: solid 1px var(--color-darkblue);
            width: 100%;
            margin-top: 7px;
            opacity: 1;
            visibility: visible;
          }

          &.full-width {
            grid-column: 1 / -1;

            ul {
              display: grid;
              grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
              gap: 60px;
            }
          }
        }
      }

      &.active {
        a {
          &:after {
            transform: scaley(1);
          }
        }
      }

      &.district {
        background-color: var(--color-darkgray);
        a {
          color: white;
          padding: 0 30px;
        }
      }
    }
  }

  .page-menu {
    display: flex;
    justify-content: flex-end;
    padding: 0;
    margin: 0;

    li {
      list-style: none;
      position: relative;

      &.menu-item-has-children {
        a {
          &:after {
            content: '';
            display: inline-block;
            position: relative;
            margin-left: 10px;
            background: url('public/svg/icon-chevron-up-darkblue.svg') no-repeat center center;
            background-size: auto;
            background-size: contain;
            width: 14px;
            height: 9px;
            transform: scaleY(-1);
            filter: brightness(0) invert(1);
            transition: 0.2s;
          }
          
        }

        &.active {
          background-color: var(--color-darkblue);

          a {
            &:after {
              transform: scaleY(1); 
            }
          }
        }
      }
      
      a {
        color: white;
        white-space: nowrap;
        padding: 10px 15px;
        display: block;
        margin: 0;
      }

      ul.sub-menu {
        margin: 0;
        padding: 0;
        position: absolute;
        right: 0;
        background-color: var(--color-darkblue);
        padding: 25px 0 15px;;
        display: none;
        min-width: 200px;
        box-shadow: 0 5px 10px rgba(0,0,0,.5);

        &.active {
          display: block;
        }

        li {
          padding: 0 25px;  
          margin-bottom: 10px;   

          a {
            padding: 0;
            &:after {
              display: none;
            }

            &:hover {
              color: var(--color-lightblue);
            }
          } 
          
          &.last {
            border-top: solid 1px white;
            padding-top: 15px;
            margin: 20px 0 0;
          }
        }

        ul.sub-menu {
          box-shadow: none;
        }
      }
    }
    
  }

  &.flip-menu {
    .page-menu {
      li {
        a {
          color: var(--color-darkgray);

          &:after {
            background: url('public/svg/icon-chevron-up-darkblue.svg') no-repeat center center;
            filter: none;
          }

          &:hover {
            color: var(--color-blue);
          }
        }

        &.menu-item-has-children {
          &.active {
            a {
              color: white;
              &:after {
                filter: brightness(0) invert(1);
              }

              &:hover {
                color: var(--color-blue);
              }
            }
          }
        }
      }
    }
  }

  @media (max-width: 1100px) {
    display: none;
  }
}
