@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css");
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

html {
  font-size: 16px;
}

:root {
  --primary: #1d3461;
  --primaryLight: #1f487e;
  --secondary: hsl(38, 100%, 63%);
  --secondaryLight: hsl(38, 100%, 63%);
  --headerColor: hsl(0, 0%, 10%);
  --bodyTextColor: hsl(247, 15%, 35%);
  --bodyTextColorWhite: hsl(210, 25%, 98%);
}

body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", "Gill Sans", sans-serif;
}

*,
*:before,
*:after {
  /* prevents padding from affecting height and width */
  box-sizing: border-box;
}

/* Styling for the swoopy hero sections */
#hero {
  color: var(--bodyTextColorWhite);
  &.large h1 {
    /* TODO: Set an actual font scale */
    font-size: clamp(2.5rem, 1.08rem + 7.09vw, 6.0625rem);
  }
  &.large div.inner {
    padding-bottom: clamp(4rem, 3.69rem + 1.55vw, 5rem);
    padding-top: clamp(6rem, 6.69rem + 1.55vw, 10rem);
  }
  & h1 {
    font-size: clamp(1.5rem, 0.8rem + 3.5vw, 3.5rem);
  }
  & > div.outer {
    background: var(--primary);
    width: 100%;
  }
  & div.inner {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--wrapper-max-width, 75rem);
    padding-left: clamp(1rem, 0.73rem + 1.36vw, 1.875rem);
    padding-right: clamp(1rem, 0.73rem + 1.36vw, 1.875rem);
    position: relative;
    padding-bottom: clamp(1.5rem, 1rem + 0.75vw, 2rem);
    padding-top: clamp(5rem, 5.5rem + 1vw, 8rem);
  }
  & > svg {
    transform: translateY(-1px);
    fill: var(--primary);
    display: block;
    height: 3.5em;
    width: 100%;
  }
}

#introduction {
  padding: clamp(2rem, 1.5rem + 2.5vw, 4rem) 0;

  & h2 {
    color: var(--headerColor);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
  }

  &.pg-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 0.73rem + 1.36vw, 1.875rem);

    @media (min-width: 768px) {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  & > * {
    background: white;
    border: 1px solid hsl(0, 0%, 90%);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: clamp(1.25rem, 1rem + 1.25vw, 2rem);
    display: flex;
    flex-direction: column;
    border-bottom: 3px solid var(--primary);
    border-top: 3px solid var(--primary);

    & h3 {
      color: var(--headerColor);
      font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
      margin: 0 0 1rem 0;
      line-height: 1.3;
      padding-bottom: 0.75rem;
      border-bottom: 1px solid hsl(0, 0%, 93%);
    }

    & p {
      color: var(--bodyTextColor);
      line-height: 1.6;
      margin-bottom: 0.75rem;
      font-size: 0.9375rem;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }
}

#news {
  padding: clamp(2rem, 1.5rem + 2.5vw, 4rem) 0;

  & > header {
    text-align: center;
    color: var(--headerColor);
    margin-bottom: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    h2 {
      font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
    }
  }

  & .pg-row {
    width: 100%;

    & > article {
      display: flex;
      flex-direction: column;
      max-width: 108ch;
      margin: auto;

      & > ul {
        list-style: none;
        padding: 0;
        margin: 0;
        > li {
          display: flex;
          flex-direction: column;
          margin-bottom: 0.25rem;
          padding-bottom: 0.25rem;
          border-bottom: 3px solid var(--primary);

          &:first-child {
            padding-top: 0.25rem;
            border-top: 3px solid var(--primary);
          }

          > .content {
            display: -webkit-box;
            -webkit-line-clamp: 20;
            -webkit-box-orient: vertical;
            overflow: hidden;
          }

          > .more-link {
            padding-top: 1rem;
            padding-bottom: 1rem;
            font-weight: 500;
          }
        }
      }
    }
  }
}

/* Team section */
#team {
  padding: clamp(2rem, 1.5rem + 2.5vw, 4rem) 0;

  & h2 {
    text-align: center;
    color: var(--headerColor);
    margin-bottom: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
  }

  & .pg-row {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(40ch, 1fr));
    gap: 1rem;

    & > * {
      flex: 1 1 clamp(20rem, 30%, 35rem);
      background: white;
      border: 1px solid hsl(0, 0%, 90%);
      border-radius: 0.5rem;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      margin-bottom: 2rem;
      padding: clamp(1.25rem, 1rem + 1.25vw, 2rem);
      display: flex;
      flex-direction: column;
      border-top: 3px solid var(--primary);

      & header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid hsl(0, 0%, 93%);

        & img {
          width: 80px;
          height: 80px;
          border-radius: 50%;
          object-fit: cover;
          flex-shrink: 0;
          border: 3px solid var(--primaryLight);
        }

        & h3 {
          color: var(--headerColor);
          font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
          margin: 0;
          line-height: 1.3;
        }
      }

      & p {
        color: var(--bodyTextColor);
        line-height: 1.6;
        margin-bottom: 0.75rem;
        font-size: 0.9375rem;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
}
