/* ===============================  RESPONSIVE DESIGN FOR NAVIGATION BAR  =============================== */

@media screen and (max-width: 421px) {
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #apply-btn {
    display: none;
  }

  .nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
  }

  .nav-container {
    padding: 0 2vw;
  }

  nav {
    padding: 10px 15px;
  }

  .school-logo {
    width: 50px;
  }

  .school-name {
    font-size: 15px !important;
    line-height: 1.2;
    color: #b38b00 !important;
    -webkit-text-fill-color: initial !important;
  }

  #menu-open,
  #menu-close {
    display: initial;
    font-size: 19px;
  }

  #menu-open {
    cursor: pointer;
    font-weight: 800;
  }

  .hamburger-menu {
    display: block;
    position: relative;
    right: -60px;
  }

  .nav-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 43%;
    height: 100vh;
    background: rgba(30, 62, 168, 0.9);
    backdrop-filter: blur(4px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  nav ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 37px;
    padding-left: 20px;
  }

  nav ul li a.nav-link {
    color: #f1f8fd;
    padding-right: 20px;
    font-size: 13px;
    font-weight: 500;
  }

  /*========= HOMEPAGE  ==========*/
  #home {
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    padding-top: 3vh;
    box-sizing: border-box;
  }

  #home h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    margin-top: 0;
    padding: 0 12px;
  }

  #home h2 {
    font-size: 1rem;
    margin-bottom: 10px;
    padding: 0 12px;
  }

  #home p {
    font-size: 0.75rem;
    width: 88%;
    line-height: 1.5em;
    margin-top: 5px;
    margin-bottom: 40px;
    margin-left: 2px;
    margin-right: 2px;
  }

  #home .btn {
    margin-top: 3px;
  }

  #home .btn a {
    font-size: 0.75rem;
    padding: 10px 25px;
  }

  /*========= ADMISSION PAGE  ==========*/
  #admissions {
    margin-top: 8px;
    padding: 3vh 6vw;
    max-width: 100%;
    min-height: auto;
    box-sizing: border-box;
  }

  .info-container h1 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding: 0 12px;
  }

  .info-container p {
    font-size: 0.75rem;
    margin-left: 2px;
    margin-right: 2px;
    line-height: 1.5em;
    margin-bottom: 28px;
  }

  /*========= ADMISSION CARDS  ==========*/
  .admission-card .icon i {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .admission-card h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .admission-card p {
    font-size: 0.75rem;
  }

  .admission-card {
    border-left: 2px solid transparent;
    padding: 10px;
  }

  /*========= EXCELLENCE PAGE  ==========*/
  #excellence-page {
    padding: 3vh 6vw;
    max-width: 90%;
    display: flex;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 30px;
    box-sizing: border-box;
  }

  #excellence-page p {
    font-size: 0.75rem;
  }

  #excellence-page .counter {
    font-size: 0.9rem;
    font-weight: 700;
  }

  #excellence-page .icons i {
    font-size: 1rem;
  }

  #excellence-page .icons {
    width: 40px;
    height: 40px;
  }

  #excellence-page .students,
  #excellence-page .educators,
  #excellence-page .pass-rate,
  #excellence-page .years-experience {
    flex: 0 0 auto;
    min-width: 120px;
  }

  /*========= ABOUT PAGE  ==========*/
  #staff {
    padding: 3vh 6vw;
    max-width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
  }

  #staff .content-container h1 {
    font-size: 1.2rem;
    margin-top: 5px;
    padding: 0 12px;
  }

  #staff .content-container h2 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 0 12px;
  }

  #staff .content-container p {
    font-size: 0.75rem;
    margin-left: 2px;
    margin-right: 2px;
    line-height: 1.5em;
    margin-bottom: 90px;
    color: white;
  }

  #staff .leaders-images figure p {
    font-size: 0.66rem;
  }

  #staff .leaders-images figure {
    width: 300px;
  }

  #staff .leaders-images figure::after {
    font-size: 0.49rem;
  }

  /*========= CURRICULUM PAGE  ==========*/
  #curriculum {
    padding: 4vh 4vw;
    margin-bottom: 10px;
    min-height: 100vh;
    box-sizing: border-box;
  }

  #curriculum h1 {
    font-size: 1.2rem;
    margin-top: 0;
    padding: 0 12px;
  }

  #curriculum h2 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 0 12px;
  }

  #curriculum p {
    font-size: 0.75rem;
    margin-left: 2px;
    margin-right: 2px;
    line-height: 1.5em;
    margin-bottom: 28px;
  }

  .curriculum-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    justify-items: center;
  }

  .curriculum-card {
    position: static;
    max-width: 120px;
    height: auto;
    overflow: visible;
    box-shadow: none;
    border-radius: 8px;
    cursor: default;
  }

  .card-face.face1,
  .card-face.face2 {
    position: static;
    width: 100%;
    height: auto;
    transform: none !important;
    padding: 10px;
  }

  .card-face.face1 {
    background-size: cover;
    background-position: center;
    height: 100px;
    border-radius: 8px 8px 0 0;
  }

  .card-face.face2 {
    background-color: #fff;
    text-align: center;
    padding: 10px 8px;
  }

  .card-face.face2 h3 {
    font-size: 0.75rem;
    margin: 5px 0;
  }

  .card-face.face2 ul {
    font-size: 0.6rem;
    margin: 5px 0 10px 0;
    padding-left: 15px;
    text-align: left;
  }

  /*========= STUDENT RESOURCES PAGE  ==========*/
  .resources {
    padding: 4vh 5vw;
    min-height: 100vh;
    box-sizing: border-box;
  }

  .resources h1 {
    font-size: 1.2rem;
    margin-top: 5px;
    padding: 0 12px;
  }

  .resources p {
    margin-top: 0;
    font-size: 0.75rem;
    margin-left: 8px;
    margin-right: 8px;
    line-height: 1.5em;
    margin-bottom: 20px;
    margin-top: -60px;
  }

  .book-icon {
    display: flex;
    justify-content: center;
    margin-top: 0;
    margin-bottom: 15px;
    margin-top: -90px;
  }

  .book-icon i {
    font-size: 4rem;
  }

  .download-item span {
    font-size: 0.75rem;
  }

  .download-btn {
    padding: 5px 12px;
    font-weight: 500;
    font-size: 0.75rem;
  }

  .download-buttons {
    margin-top: 0px;
    margin-bottom: 25px;
    gap: 12px;
  }

  /*========= CONTACT INFO  ==========*/
  #contact {
    padding: 2vh 2vw;
    box-sizing: border-box;
    padding-bottom: 50px;
    padding-right: 5px;
    min-height: 100vh;
  }

  #contact-form {
    margin-left: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "form form"
      "info map";
    gap: 20px;
  }

  .contactUs h1 {
    font-size: 1.2rem;
    text-align: center;
    margin-top: 5px;
  }

  #contact-form h3 {
    font-size: 0.8rem;
    margin-bottom: 10px;
    margin-left: 30px;
    margin-top: 15px;
  }

  .contact.form {
    grid-area: form;
    padding: 3px 8px;
    width: 80%;
    margin-left: 23px;
  }

  .formBox {
    width: 80%;
    margin: 0 auto;
    padding: 0;
    margin-left: 30px;
  }

  .row50,
  .row100 {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  .formBox .inputBox input,
  .formBox .inputBox textarea {
    font-size: 0.65rem;
    padding: 3px 4px;
  }

  .formBox .inputBox label {
    font-size: 0.7rem;
    margin-bottom: 0;
  }

  .row100 textarea {
    min-height: 80px;
    padding: 5px;
    resize: none;
    box-sizing: border-box;
  }

  #message {
    height: 17px !important;
    font-size: 0.65rem;
    padding: 2px;
  }

  /*========= CONTACT INFO  ==========*/
  .contact.info {
    grid-area: info;
    width: 90%;
    height: 160px;
    padding: 15px;
    font-size: 0.58rem;
    margin-left: -8px;
  }

  .contact.info h3 {
    margin-left: 0 !important;
    margin-top: -5px !important;
    font-size: 0.8rem !important;
  }

  .info .infoBox i {
    min-width: 20px;
    height: 20px;
    font-size: 0.5rem;
    border-radius: 50%;
    margin-right: 0;
  }

  /*========= CONTACT MAP  ==========*/
  .contact.map {
    grid-area: map;
    margin-top: -6px !important;
    width: 105%;
    height: 105%;
    padding: 5px;
    box-sizing: border-box;
    margin-left: -12px !important;
  }

  .contact.map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
  }

  /*========= FOOTER  ==========*/
  .footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 15px 3vw;
  }

  .footer .col-1,
  .footer .col-2,
  .footer .col-3 {
    margin: 0;
    min-width: auto;
  }

  .col-1 {
    padding-left: 10px !important;
  }

  .col-1 ul li {
    margin-bottom: 2px;
  }

  .col-1 ul li a {
    font-size: 0.65rem;
  }

  .footer div h3 {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .footer div ul li {
    margin-bottom: -4px !important;
  }

  .footer div a {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }

  .col-2 p,
  .col-2 a,
  .col-3 p {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }
}

/*=== CURRICULUM CARDS RESPONSIVE (IPHONe SE & SIMILAR) ===*/
@media screen and (max-width: 412px) {
  .curriculum-cards-container {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px;
    justify-items: center;
  }

  .curriculum-card {
    max-width: 120px;
    width: 100%;
    height: auto;
  }

  #curriculum h1 {
    font-size: 1.1rem;
  }

  #curriculum h2 {
    font-size: 0.9rem;
  }

  #curriculum p {
    font-size: 0.65rem;
  }

  .card-face.face2 h3 {
    font-size: 0.65rem;
  }

  .card-face.face2 ul {
    font-size: 0.55rem;
  }

  @media screen and (max-width: 395px) {
    #curriculum h1 {
      font-size: 1.1rem;
    }

    #curriculum h2 {
      font-size: 0.9rem;
    }

    #curriculum p {
      font-size: 0.65rem;
    }

    .card-face.face2 h3 {
      font-size: 0.65rem;
    }

    .card-face.face2 ul {
      font-size: 0.55rem;
    }
  }
}

/*=== CURRICULUM CARDS RESPONSIVE (SMALLER SCREENS) ===*/
@media screen and (max-width: 360px) {
  #curriculum h1 {
    font-size: 1rem;
  }

  #curriculum h2 {
    font-size: 0.85rem;
  }

  #curriculum p {
    font-size: 0.6rem;
  }

  .card-face.face2 h3 {
    font-size: 0.6rem;
  }

  .card-face.face2 ul {
    font-size: 0.5rem;
  }
}

/*=== IPHONE SE CONTACT RESPONSIVE ===*/
@media screen and (max-width: 377px) {
  .contact.info {
    height: 100px !important;
    padding: 8px 10px !important;
    font-size: 0.55rem !important;
    overflow: hidden;
    margin-left: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .contact.info h3 {
    font-size: 0.4rem !important;
    margin: 0 !important;
  }

  .contact.info .iconBox {
    gap: 4px !important;
    display: flex;
    align-items: center;
  }

  .contact.info .iconBox i {
    min-width: 16px !important;
    height: 16px !important;
    font-size: 0.5rem !important;
    margin-right: 6px !important;
    border-radius: 50%;
  }

  .contact.info .iconBox p {
    margin: 0 !important;
    font-size: 0.53rem !important;
  }

  .contact.map {
    height: 125px !important;
    padding: 5px !important;
    margin-left: 0 !important;
    overflow: hidden;
  }

  .contact.map iframe {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
    margin-top: -5px;
  }
}

/*=== CONTACT INFO FOR IPHONE 14 PRO MAX (430px) ===*/
@media screen and (max-width: 435px) {
  #contact {
    padding: 2vh 2vw;
    box-sizing: border-box;
    padding-bottom: 50px;
    padding-right: 5px;
    min-height: 100vh;
  }

  #contact-form {
    margin-left: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "form form"
      "info map";
    gap: 20px;
  }

  .contactUs h1 {
    font-size: 1.2rem;
    text-align: center;
    margin-top: 5px;
  }

  #contact-form h3 {
    font-size: 0.8rem;
    margin-bottom: 10px;
    margin-left: 30px;
    margin-top: 15px;
  }

  .contact.form {
    grid-area: form;
    padding: 3px 8px;
    width: 80%;
    margin-left: 23px;
  }

  .formBox {
    width: 80%;
    margin: 0 auto;
    padding: 0;
    margin-left: 30px;
  }

  .row50,
  .row100 {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  .formBox .inputBox input,
  .formBox .inputBox textarea {
    font-size: 0.65rem;
    padding: 3px 4px;
  }

  .formBox .inputBox label {
    font-size: 0.7rem;
    margin-bottom: 0;
  }

  .row100 textarea {
    min-height: 80px;
    padding: 5px;
    resize: none;
    box-sizing: border-box;
  }

  #message {
    height: 17px !important;
    font-size: 0.65rem;
    padding: 2px;
  }

  /* Contact Info Section */
  .contact.info {
    grid-area: info;
    width: 90%;
    height: auto;
    padding: 15px;
    font-size: 0.58rem;
    margin-left: 0;
  }

  .contact.info h3 {
    margin-left: 0 !important;
    margin-top: 0 !important;
    font-size: 0.8rem !important;
  }

  .contact.info .infoBox {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .contact.info .iconBox {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .contact.info .iconBox i {
    min-width: 24px;
    height: 24px;
    font-size: 0.6rem;
    border-radius: 50%;
    background: #1e3ea8;
    color: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0;
  }

  .contact.info .iconBox p {
    margin: 0;
    font-size: 0.65rem;
  }

  /* Contact Map */
  .contact.map {
    grid-area: map;
    margin-top: 0 !important;
    width: 100%;
    height: 250px;
    padding: 5px;
    box-sizing: border-box;
    margin-left: 0 !important;
  }

  .contact.map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
  }

  /* Curriculum Cards */
  .curriculum-cards-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
    justify-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  .curriculum-card {
    display: block;
    max-width: 130px;
    width: 100%;
    height: auto;
    overflow: visible;
    box-shadow: none;
    border-radius: 8px;
    cursor: default;
  }

  .card-face.face1,
  .card-face.face2 {
    position: static !important;
    width: 100%;
    height: auto;
    transform: none !important;
    padding: 10px;
    display: block;
  }

  .card-face.face1 {
    background-size: cover;
    background-position: center;
    height: 100px;
    border-radius: 8px 8px 0 0;
  }

  .card-face.face2 {
    background-color: #fff;
    text-align: center;
    padding: 10px 8px;
  }

  /* Hamburger */
  .hamburger-menu {
    display: block;
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1100;
    cursor: pointer;
  }

  #menu-open,
  #menu-close {
    display: inline-block;
    font-size: 20px;
    font-weight: 800;
    color: #b38b00;
  }

  .school-logo {
    width: 40px;
  }

  .school-name {
    font-size: 14px !important;
    line-height: 1.1;
  }

  nav ul li a.nav-link {
    color: #f1f8fd;
    padding-right: 20px;
    font-size: 12px;
    font-weight: 500;
  }

  /*========= FOOTER  ==========*/
  .footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 15px 3vw;
  }

  .footer .col-1,
  .footer .col-2,
  .footer .col-3 {
    margin: 0;
    min-width: auto;
  }

  .col-1 {
    padding-left: 10px !important;
  }

  .col-1 ul li {
    margin-bottom: 2px;
  }

  .col-1 ul li a {
    font-size: 0.65rem;
  }

  .footer div h3 {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .footer div ul li {
    margin-bottom: -4px !important;
  }

  .footer div a {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }

  .col-2 p,
  .col-2 a,
  .col-3 p {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }
}
