@import "./variables.css";

.header {
  container-name: header;
  container-type: inline-size;
}

.header__wrapper {
  display: grid;
  grid-template-columns: 12fr;
}

.header__title-home-link {
  text-decoration: none;
}
  
.header__site-title {
  margin-bottom: 0;
  color: var(--light);
  font-size: 2em;
  font-weight: 500;
}

.header__current-page {
  margin-top: .5rem;
  font-size: 1rem;
  font-weight: 200;
}

.header__navigation {
  container-name: header-navigation;
  container-type: inline-size;
  margin-bottom: 1rem;
}

.header__menu {
  display: grid;
  /*grid-template-columns: 1fr 1fr 1fr;*/
  padding: 0;
  margin: 0;
}

.header__menu-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
}

.header__menu-item:first-of-type {
  background-color: var(--primary);
}

.header__menu-item:nth-of-type(2) {
  background-color: var(--secondary);
}

.header__menu-item:last-of-type {
  background-color: var(--tertiary);
}

.header__menu-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  color: var(--light);
}

@container header (width > 60ch) {
  .header__wrapper {
    grid-template-columns: 3fr 9fr;
    gap: 1rem;
  }
  
  .header__navigation {
    margin-top: 2rem;
    margin-bottom: 0;
  }
}

@container header-navigation (width > 20ch) {
  /* Change the flex direction of the .child element. */
  .header__menu { 
    grid-template-columns: 3fr 3fr 3fr;
  }
}