/*------Homepage------ */

/* ------IPad------ */
@media (max-width: 1024px) {
  /* ปุ่มหลัก */
  .hp-button1 {
    flex-wrap: wrap;
    gap: 2em;
  }

  .hp-button1-box {
    width: 280px;
    height: 120px;
    margin-top: -2vw;
  }

  .hp-button1-main {
    font-size: 34px;
  }

  .hp-button1-name {
    font-size: 20px;
  }

  /* about us */
  .hp-aboutus {
    flex-direction: column;
    align-items: center;
    gap: 2em;
  }

  .hp-aboutus img {
    width: 80%;
    height: auto;
  }

  .hp-aboutus-box {
    width: 90%;
    text-align: center;
  }

  .hp-aboutus-body {
    font-size: 18px;
  }

  .aboutus-read-more {
    margin: 2em 0;
    justify-self: center;
  }

  /* reward */
  .reward-group {
    height: 320px;
  }

  .reward-card img,
  .reward-card1 img {
    width: auto;
    height: 100%;
  }

  .modal-content {
    width: 100%;
    max-width: 900px;
    height: auto;
  }

  /* news */
  .news-header {
    padding: 1.5em 10em 0 10em;
  }

  .news-header h2 {
    font-size: 20px;
    margin: 0;
  }

  .swiper-wrapper {
    margin-top: 6vw;
  }
}

/* ------subject------ */
@media (max-width: 1024px) {
  /* Head */
  .pre-layout {
    flex-direction: column;
  }

  .pre-left {
    width: 100%;
    padding: 2em 2.5em;
  }

  .Breadcrumb {
    margin-top: 0;
  }

  .underline {
    width: 200px;
  }

  .primary-navigation {
    margin-top: 20px;
  }

  .pre-right {
    width: 100%;
  }

  .carousel-wrapper {
    height: 60vh;
    filter: none;
  }

  .carousel-inner img {
    height: 60vh;
  }

  .overlay-main {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
  }

  /* Name */
  .namebox {
    padding: 2em 8em;
  }

  .Breadcrumb {
    margin-top: 7em;
  }

  /* วัตถุประสงค์ */
  .วัตถุประสงค์ {
    flex-direction: column;
    padding: 6vh 5em;
  }

  .วัตถุประสงค์ img {
    width: 100%;
    max-height: 40vh;
  }

  .วัตถุประสงค์-container {
    width: 100%;
  }

  /* แนวทางแต่ละชั้นปี */
  #section-4 {
    padding: 0 8vw;
  }

  .แนวทาง h2 {
    font-size: 24px;
    margin: 1em 0;
    width: auto;
  }

  .year-row,
  .year-row.reverse {
    flex-direction: column;
  }

  .year-row img,
  .year-box {
    width: 100%;
    height: auto;
  }

  .year-row img {
    max-height: 32vh;
  }

  .year-row {
    margin-bottom: 7vh;
  }

  .year-box p {
    font-size: 20px;
  }

  /* จุดแข็งของหลักสูตร */
  .strength-layout {
    grid-template-columns: 1fr;
    gap: 6vh;
  }

  .strength-images {
    flex-direction: row;
    justify-content: center;
    gap: 3vw;
  }

  .strength-images img {
    width: 30vw;
    height: auto;
  }

  .course-underline h2 {
    width: auto;
    font-size: 28px;
  }

  .course-box {
    padding: 3vh 3em;
  }

  /* PLO */
  .plo-head {
    width: auto;
    font-size: 26px;
  }

  .container-bg {
    margin-top: -5vh;
  }

  .card-wrapper {
    width: 95%;
  }

  .plo-modal-content {
    width: 92%;
    max-width: 720px;
    max-height: 85vh;
    padding: 2em;
  }

  .plo-box {
    height: 480px;
  }

  .subplo-hidden {
    width: 90%;
    max-width: 900px;
    height: auto;
  }

  /* งานอนาคต */
  #section-6.work {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 5vh 6vw;
  }

  .work h4 {
    width: 45vh;
  }

  #section-6 img {
    height: auto;
    width: 40vh;
    margin-top: 3vh;
  }

  #section-7.work {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 5vh 6vw;
  }

  #section-7 img {
    width: 40vh;
    margin-top: 3vh;
  }

  /* papers */
  .papers-box {
    width: 240px;
    height: 75px;
    font-size: 17px;
  }

  .papers h4 {
    width: 30vh;
  }

  .card-wrapper {
    width: 90%;
    margin: 8vh auto;
  }
}

/* Myteam right sidebar */
@media (max-width: 1024px) {
  .side-menu {
    display: none;
  }
  .content-with-sidebar {
    margin-right: 0;
  }
}

/* news */

@media (max-width: 1024px) {
  .navigation-tab {
    margin-top: 12vw;
  }

  .filter-buttons {
    height: 400px;
  }

  .news-container {
    margin: 0;
  }

  .carousel-poster img {
    object-fit: contain;
    height: auto;
  }

  .carousel-text {
    padding: 1vw;
  }

  .carousel-text h4 {
    font-size: 14px;
    margin-bottom: 0.5vw;
  }

  .carousel-text p {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 0.5vw;
  }

  .tags {
    font-size: 10px;
    padding: 0.3vw;
  }

  .card-title h2 {
    font-size: 5px;
  }

  .content-head {
    width: 100% !important;
  }

  .bg-head {
    width: 100% !important;
    padding: 2vw;
  }

  .content-text {
    width: 100% !important;
  }
}

/* scholarship */
@media (max-width: 1024px) {
}

/* TABEE */
@media (max-width: 1024px) {
  .tabee-nav {
    float: right;
    right: 0;
  }

  .tabee-history h5 {
    margin: 0 4vw;
    padding: 2vw;
  }

  .tabee-bodycard,
  .tabee-history-body {
    width: 90% !important;
    height: auto !important;
  }

  .tabee-subplo,
  .tabee-history-box {
    flex-direction: column;
    width: 90% !important;
    justify-self: center !important;
  }

  .tabee-history-box {
    align-items: center;
  }

  .card-head,
  .tabee-history-head {
    width: 90% !important;
    height: auto !important;
    justify-self: center;
    border-radius: 10px 10px 0 0;
  }

  .tabee-bodycard,
  .tabee-history-body {
    border-radius: 0 0 10px 10px;
    justify-self: center;
  }
}

/* history */
@media (max-width: 1024px) {
  .history-layout {
    padding: 1vw 10vw;
    max-width: 100%;
  }

  .history-heads-sidebar {
    flex: 0 0 280px;
  }

  .head-img {
    width: 100px;
  }

  .history-head1 p {
    margin: 0 1vw;
  }
}

/* document */
@media (max-width: 1024px) {
  .navigation-tab {
    margin: 10vw 0 0 5vw;
  }

  .request-forms,
  .Internship-form,
  .form-body {
    width: 90%;
    margin: 2vw auto;
  }

  .form-container,
  .Internship-form h4,
  .Internship-body {
    padding: 0 4vw;
  }
}
