@media screen and (max-width: 768px) {
    .container {
      flex-direction: column;
      width: 95%;
      left: 2.5%;
    }
    header{
      padding: 10px;
    }
    nav li{
      font-size: 1.2rem;
      line-height: 2rem;
    }
    nav li::after{
      height: 3px;
    }

    .titles-list {
      width: 100%;
      padding: 5px;
      margin-bottom: 10px;
      display: flex; /* This will make the titles align horizontally */
      justify-content: space-around; /* Space the titles evenly */
      flex-direction: row;
    }

    .card-container {
      width: 100%;
      padding: 10px;
    }

    .card {
      width: 100%;
      padding: 10px;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
    }

    .titles-list div {
      font-size: 1.5rem;
      margin-bottom: 10px;
      padding: 5px;
      cursor: pointer;
      text-underline-offset: .5rem;
    }

    .titles-list div.active{
      text-decoration-thickness: 3px;
    }


    .card-container {
      position: relative;
      height: auto;
      overflow-y: auto;
    }
    
    .card {
      position: static;
      transform: none !important;
      opacity: 1 !important;
      display: none;
      height: auto;
      text-align: center;
      padding: 20px;
      background-color: transparent;
      z-index: auto;
    }
    .card.active{
      display: block;
    }
    
    .card .text {
      display: block;
      color: #ddd;
      font-size: 1.2rem;
      line-height: 1.5;
    }

    .titles-list {
      margin-bottom: 15px;
    }
  }