.student-clubs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 120px;

  h2 {
    font-weight: 500;
    font-size: 36px;
    line-height: 38px;
    letter-spacing: 0%;
    color: #212121;
  }

  p {
    font-weight: 400;
    font-size: 18px;
    line-height: 28px;
    letter-spacing: 0%;
    color: #212121;
  }

  .clubs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;

    .club {
      width: 384px;
      height: 408px;
      max-width: 384px;
      max-height: 408px;
      opacity: 1;
      border-radius: 20px;
      position: relative;
      overflow: hidden;
      display: flex;
      padding: 20px;

      & > img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
      }

      &::after {
        content: '';
        position: absolute;
        inset: 0;
        background: #21212180;
        z-index: 2;
      }

      .club-content {
        position: relative;
        z-index: 3;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        color: #ffffff;

        .club-info {
          display: flex;
          flex-direction: column;
          gap: 16px !important;

          h3 {
            a {
              font-weight: 500;
              font-size: 36px;
              line-height: 38px;
              letter-spacing: 0%;
              color: #ffffff;
              text-decoration: none;
            }
          }

          p {
            font-weight: 400;
            font-size: 18px;
            line-height: 28px;
            letter-spacing: 0%;
            color: #ffffff;
          }
        }

        a {
          font-weight: 700;
          font-size: 18px;
          line-height: 28px;
          letter-spacing: 0%;
          color: #ffffff;
          text-decoration: none;

          display: flex;
          align-items: center;
          gap: 12px;

          img {
            width: 24px;
            height: 24px;
          }
        }
      }
    }
  }
}

@media screen and (max-width: 450px) {
  .student-clubs {
    margin-top: 60px !important;

    h2 {
      font-size: 28px !important;
      line-height: 38px !important;
    }

    p {
      font-size: 12px !important;
      line-height: 23px !important;
    }

    .clubs {
      grid-template-columns: 1fr;

      .club {
        width: 343px !important;
        height: fit-content !important;
        width: 100% !important;
        min-width: 343px !important;
        max-height: fit-content !important;

        .club-content {
          .club-info {
            h3 {
              a {
                font-size: 28px !important;
                line-height: 38px !important;
              }
            }

            p {
              font-size: 18px !important;
              line-height: 22px !important;
            }
          }

          gap: 20px !important;
        }
      }
    }
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* All tablet overrides grouped here */

  .student-clubs {
    margin-top: 80px;

    h2 {
      font-size: 32px;
      line-height: 42px;
    }

    p {
      font-size: 16px;
      line-height: 26px;
    }

    .clubs {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 20px;

      .club {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: none;
        padding: 20px;


        &::after {
          inset: 0;
        }

        .club-content {
          position: relative;
          grid-area: 1 / 1;
          z-index: 3;

          gap: 24px !important;

          .club-info {
            h3 {
              a {
                font-size: 28px !important;
                line-height: 38px !important;
              }
            }

            p {
              font-size: 18px !important;
              line-height: 22px !important;
            }
          }
        }
      }
    }
  }
}
