.academic-calendar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 120px;

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

  .calendar-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;

    .filter-wrapper {
      position: relative;
      width: 384px;
      height: 48px;
      max-width: 384px;
      max-height: 48px;
      cursor: pointer;
      font-family: 'Inter', sans-serif;

      .filter-all {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 4px 16px;
        width: 100%;
        height: 100%;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        transition: border-color 0.2s;

        &:hover {
          border-color: #a0aec0;
        }

        .texts {
          display: flex;
          flex-direction: column;
          flex-grow: 1;

          .label-row {
            .label-text {
              font-weight: 500;
              font-size: 14px;
              line-height: 20px;
              color: #718096;
            }
          }

          .selected-value {
            font-size: 12px;
            color: #130f26;
            display: none;
          }
        }

        .icon-wrapper {
          width: 20px;
          height: 20px;
          display: flex;
          align-items: center;
          justify-content: center;

          img {
            width: 100%;
            height: 100%;
          }
        }
      }

      .options-menu {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        width: 100%;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
        z-index: 100;
        overflow: hidden;

        .option {
          padding: 12px 16px;
          font-size: 14px;
          color: #718096;
          transition: background 0.2s;

          &:hover {
            background: #f7fafc;
            color: #130f26;
          }
        }
      }

      &.active {
        .options-menu {
          display: block;
        }
        .filter-all {
          border-color: #718096;
        }
      }
    }
  }
}

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

    h3 {
      font-size: 26px !important;
      line-height: 38px !important;
    }

    .calendar-filters {
      grid-template-columns: 1fr;

      .filter-wrapper {
        width: calc(100% - 32px);
        min-width: 343px;
      }
    }

    .calendar {
      overflow-x: scroll;
    }
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .academic-calendar {
    margin-top: 100px;
    gap: 20px;

    h3 {
      font-size: 32px;
      line-height: 48px;
    }

    .calendar-filters {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;

      .filter-wrapper {
        width: 100%;
        max-width: none;
        height: 48px;
        max-height: 48px;
      }
    }

    .calendar {
      overflow-x: auto;
    }
  }
}
