/* 
* Author: Brandon Church
* Template Version: 1.0
* App Version: 2.0
^ CSS Auto Prefixer: https://autoprefixer.github.io/
*/

/* Google Font Import - Source Sans Pro */
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap");

/* Used to style broswer specific CSS */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  /* Main Colors */
  --light-blue: #4672c4;
  --usaid-blue: #002a6c;
  --usaid-red: #cc1c4c;
  --light-grey: #f5f5f5;
  --white: #ffffff;
  --black: #222222;

  /* Other Colors */
  --medium-grey: #8d8a86;
  --dark-grey: #6c6463;

  /* Fonts */
  --usaid-Font: "Source Sans Pro", sans-serif;
}

body {
  font-family: var(--usaid-Font);
  background-color: var(--light-grey);
}

/* ? Widget CSS */
nav {
  font-family: var(--usaid-Font);
  background-color: var(--usaid-blue);
  padding: 25px 50px 5px 25px;
  box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: auto;
}

.nav-branding img {
  width: 250px;
}

.nav-profile {
  background-color: var(--light-blue);
  background-color: #32518b;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
  margin-right: 16px;
  width: 185px;
  height: 40px;
  transition: width 0.3s;
  cursor: pointer;
}

.nav-profile i {
  background-color: var(--white);
  color: var(--usaid-blue);
  font-size: 0.9rem;
  margin-right: 10px;
  height: 25px;
  width: 25px;
  border-radius: 100%;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
.nav-profile span {
  color: var(--white);
  font-weight: bold;
}

.nav-profile:hover {
  background-color: #32518bac;
}

.nav-links {
  display: flex;
  margin-top: 0.5rem;
}

.nav-profile-links {
  display: none;
  animation: profile-animation 0.3s ease-out forwards;
}

.nav-profile-links a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  margin-left: 15px;
}

.nav-profile-links a:hover {
  text-decoration: underline;
}

.nav-profile-links span {
  margin-left: 15px;
  transform: translateY(-2px);
}

.nav-profile:hover {
  width: 370px;
}

.nav-profile:hover .nav-profile-links {
  display: flex;
  overflow: hidden;
}

.nav-links li a,
.tech-support-link li a {
  color: var(--white);
  text-decoration: none;
}

/* Navigation Dropdown Animations */

/* Profile Animation */
@keyframes profile-animation {
  0% {
    opacity: 0;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 10;
  }
}

/* Main Nav Dropdowns */
.dropdown {
  padding: 8px 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: #fff;
  position: relative;
  font-size: 18px;
  perspective: 1000px;
  z-index: 100;
  margin-top: 1rem;
  margin-right: 16px;
  border-top-right-radius: 8px;
  border-top-left-radius: 8px;
  transition: 0.2s;
}

.dropdown i {
  font-size: 0.8rem;
  transform: translateY(-1px);
  margin-left: 3px;
}

.dropdown:hover {
  background: #2980b9;
  background-color: #34495e;
  background-color: #fff;
  color: #002a6c;
  cursor: pointer;
}

.dropdown:hover a {
  color: var(--usaid-blue);
}

.dropdown:nth-child(5) {
  margin-right: 0px;
}
.dropdown:hover .dropdown_menu li {
  display: block;
}
.dropdown_menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 225px;
  perspective: 1000px;
  z-index: -1;
}

.internal-dropdown-menu {
  position: absolute;
  top: 80px;
  left: 225px;
  width: 225px;
  perspective: 1000px;
  z-index: -1;
  display: block;
  display: flex;
  align-items: center;
  background-color: var(--usaid-blue);
}

.internal-dropdown-menu span {
  padding: 10px 20px;
}

.internal-dropdown-menu:hover {
  background-color: #fff;
}

.internal-dropdown-menu:hover span {
  color: var(--usaid-blue);
}

span .internal-dropdown-button:hover > .internal-dropdown-button {
  background-color: red;
}

.tech-support-link .dropdown_menu {
  width: 100%;
}

.dropdown_menu li {
  display: none;
  color: #fff;
  background-color: #34495e;
  background-color: #002a6c;
  padding: 10px 20px;
  font-size: 16px;
  opacity: 0;
  box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;
}

.dropdown_menu li:hover {
  background-color: #2980b9;
  background-color: #4672c4;
  background-color: #fff;
  color: #002a6c;
}

.dropdown_menu li i {
  margin-left: 8px;
}

.dropdown_menu span {
  position: relative;
}

.dropdown_menu span::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: #002a6c;
  -webkit-transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  -o-transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) and (pointer: fine) {
  .dropdown_menu li:hover span::before {
    left: 0;
    right: auto;
    width: 100%;
    background-color: var(--usaid-red);
  }
}

.dropdown_menu-portals {
  animation: rotateY 300ms ease-out forwards;
  transform-origin: top center;
}

.dropdown_menu-categories {
  animation: growOut 300ms ease-out forwards;
  transform-origin: top center;
}

.dropdown_bottom {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.dropdown:hover .dropdown_menu--animated {
  display: block;
}
.dropdown_menu--animated {
  display: none;
}
.dropdown_menu--animated li {
  display: block;
  opacity: 1;
}

@keyframes rotateY {
  0% {
    transform: rotateY(90deg);
    opacity: 0;
  }
  80% {
    transform: rotateY(-10deg);
    opacity: 1;
  }
  100% {
    transform: rotateY(0);
    opacity: 10;
  }
}

@keyframes growOut {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 10;
  }
}

/* ? Widget CSS */

footer {
  height: 100px;
  background-color: var(--usaid-blue);
  position: absolute;
  width: 100vw;
  bottom: 0;
  text-align: center;
  color: #fff;
  padding: 25px;
  box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
