/* Mobile Friendly Adjustments */

/* Define new class for splitbox behavior */
.splitbox-stack-mobile {
  /* This class will be used to indicate a splitbox-right that should stack below splitbox-left on mobile */
}

.splitbox-hide-mobile {
  /* This class will be used to indicate a splitbox-right that should be hidden on mobile */
}

/* Media query for tablets */
/* @media (max-width: 1260px) {

  .content-wrapper {
    width: 90%;
  }

  .welcome h1 {
    font-size: 6vw;
    line-height: 7vw;
  }

  .welcome p {
    width: 90%;
    font-size: 18px;
  }

  .participate-button {
    font-size: 2vw;
  }

  .iframe-wrapper iframe {
    width: 50vw;
    height: 60vh;
  }

  .terminal,
  .terminal-code {
    width: 50vw;
  }
} */


/* Media query for mobile devices */
@media (max-width: 1025px) {

  .content-wrapper {
    width: 90%;
  }
  
  .welcome h1 {
    font-size: 6vw;
    line-height: 7vw;
  }
  
  .welcome p {
    width: 90%;
    font-size: 18px;
  }
  
  .participate-button {
    font-size: 2vw;
  }
  
  .iframe-wrapper iframe {
    width: 50vw;
    height: 60vh;
  }
  
  .terminal,
  .terminal-code {
    width: 50vw;
  }


  /* Indent on mobile too large */
  ul,
  ol {
    /* padding-inline-start: 20px; */
    padding-inline-start: 15px
  }

  /* Show mobile navigation and hide desktop menu */
  .menu ul .menu-bars {
    display: block;
    float: right;
    margin: 15px 0px;
    /* height: 55px; */
    /* font-size: 24px; */
    cursor: pointer;
  }

  .iframe-wrapper {
    display: none;
  }

  .canvas-container {
    width: 60;
    /* Match the mobile size */
    height: 40vh;
  }

  #meshCanvas {
    background-color: transparent !important;
    width: 100%;
    height: 100%;
    display: block;
    margin-top: 20px;
  }

  .spinner {
    width: 70px;
    height: 70px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
  }


  .menu ul li:not(.menu-bars) {
    display: none;
  }

  .mobile-br {
    display: block;
  }

  /* Welcome section adjustments */
  .welcome {
    flex-direction: column;
    padding: 10px;
    margin-bottom: 10vh;
    height: auto;
  }

  .welcome h1 {
    font-size: 8vw;
    line-height: 10vw;
    width: 100%;
    margin: 20px auto;
    text-align: center;
  }

  .welcome p {
    width: 90%;
    margin: 0 auto;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
  }

  .participate-button {
    font-size: 4vw;
    margin: 20px auto;
    display: block;
    width: 80%;
    text-align: center;
  }

  .welcome-text {
    align-items: center;
    margin: 0 auto;
  }

  .participate-box {
    margin: 20px auto;
    width: 90%;
    font-size: 4vw;
    text-align: center;
  }

  /* Splitbox adjustments for mobile */
  .splitbox-container {
    width: 95%;
  }

  .splitbox-left,
  .splitbox-right {
    display: block;
    width: 100%;
    padding: 0.5em;
  }

  /* Different handling based on class */
  .splitbox-hide-mobile.splitbox-right {
    display: none;
  }

  .splitbox-stack-mobile.splitbox-right {
    display: block;
    margin-top: 20px;
  }

  /* Process circle adjustments */
  .process-circle {
    width: 40vw;
    height: 40vw;
    font-size: 4em;
  }

  /* Terminal adjustments for mobile */
  .terminal,
  .terminal-code {
    width: 80vw;
    height: 70vh;
    min-height: 300px;
    padding: 1rem;
  }

  /* Submission form adjustment */
  .submission-form {
    width: 90%;
    padding: 20px;
  }

  .submission-form input[type='submit'] {
    width: 100%;
  }

  .content-wrapper.submission-form {
    color: hsl(0, 0%, 0%);
    border: 0px !important;
  }

  .submission-form .select-birth {
    width: 31.5%;
  }

  .submission-form p {
    margin-block-start: 1em;
  }

  /* Interface box adjustment */

  .content-wrapper.interface-box {
    color: hsl(0, 0%, 0%);
    border: 0px !important;
    font-size: 16px;
  }


  .interface-box {
    width: 90%;
    padding: 20px;
  }

  /* Adjust iframe for mobile */
  .iframe-wrapper iframe {
    width: 90vw;
    height: 50vh;
  }

  /* Hide non-mobile video and show mobile video */
  .rec-desktop {
    display: none;
  }

  .rec-mobile {
    display: block;
  }

  /* Footer adjustments */
  #footer-links .content-wrapper {
    gap: 20px;
  }

  .footer-column {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }

  footer input[type='email'] {
    width: 80%;
    text-align: center;
  }

  footer input[type='submit'] {
    width: 80%;
  }

  /* Partner adjustments */
  .partner-row {
    display: block;
  }

  .partner-text,
  .partner-img {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }


  .bottom_space {
    width: 100%;
    height: 40vw;
  }


  /* Adjust menu for mobile */
  .mobile-menu {
    display: block;
    position: fixed;
    margin-top: 70px;
    top: 0px;
    left: -102%;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    overflow-y: auto;
  }

  .mobile-menu ul li {
    font-size: 3vh;
    line-height: 6vh;
    color: white;
  }

  .menu ul .menu-bars {
    display: block;
    font-size: 55px;
    height: 55px;
    margin: 0vw 4vw;
    transform: translateY(-1vw);

  }


  .mobile-menu.active {
    left: 0;
  }


  /* Style for parent menu items */
  .mobile-menu .parent-menu-item {
    border-left: 4px solid #ffcc00;
    /* Add a colored border */
    margin-bottom: 15px;
    padding-left: 12px;
    /* Add padding between border and text */
  }

  /* Style for parent menu label */
  .mobile-menu .menu-parent {
    display: block;
    font-weight: bold;
    /* padding: 10px 0; */
    color: #ffcc00;
    /* Highlight color */
  }

  /* Style for submenu items */
  .mobile-menu .parent-menu-item ul {
    background-color: rgba(255, 255, 255, 0.1);
    /* Subtle background */
    /* margin-left: 10px; */
    border-radius: 5px;
    padding: 5px;
  }

  .mobile-menu .parent-menu-item ul li {
    padding-left: 0px;
    line-height: 1.2;
  }

  .mobile-menu .parent-menu-item ul li a {
    padding: 5px 0;
    display: block;
  }

  .mobile-menu .menu-parent {
    margin-bottom: 5px;
  }

  /* .language-selector {
    display: none;
  } */

  /* Add language selector to mobile menu */
  .menu .language-selector {
    height: 95%;
  }

  /* LANGUAGE  */

  .mobile-menu .language-dropdown {
    position: relative;
    width: 100%;
  }

  .menu .language-selector .language-dropdown li {
    display: inline;
  }

  .menu ul .special-button {
    display: inline!important;
    /* margin-top:13px!important; */
    margin-right:0px!important;
    padding: 3px!important;
  }

  .menu #menu-selector {
    /* margin-top: 7px; */
    margin: 0;
    height: 100%;
    display: flex; 
    /* position: relative; */
    /* display: inline-flex; */
    align-items: center;
  }


  /* FAQ section adjustments */
  .faq-answer {
    padding: 10px 0 10px 15px;
  }

  /* Organization section adjustments */
  .orgaimg {
    float: none;
    display: block;
    margin: 0 auto 15px auto;
  }

  .orgatext {
    width: 90%;
    margin: 0 auto;
    text-align: center;
  }

  .orgaamb_wrapper {
    width: 90%;
    margin: 0 auto;
    text-align: center;
  }

  /* Image wrapper adjustments */
  .image-wrapper {
    width: 100%;
    margin-bottom: 20px;
  }

  /* Smaller process circles for very small screens */
  .process-circle {
    width: 50vw;
    height: 50vw;
    font-size: 3em;
  }

  /* Adjust timeline for small screens */
  .timeline-circle {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .timeline-item .splitbox-left,
  .timeline-item .splitbox-right {
    vertical-align: middle;
    width: 93%;
  }

  .timeline-line {
    left: 95%;
  }

  .timeline-circle {
    left: 95%;
  }
}

/* Media query for very small screens */
@media (max-width: 480px) {
  .welcome h1 {
    font-size: 10vw;
    line-height: 12vw;
  }

  .participate-button {
    font-size: 5vw;
  }

  section {
    padding: 80px 0;
  }

  h2 {
    font-size: 36px;
  }

  h3 {
    font-size: 24px;
  }


  /* Support buttons for small screens */
  .icsc-button.support-button {
    width: 90%;
  }

  .icsc-button {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: fit-content;
    display: block;
    margin-bottom: 10px;
  }

  #process #timetable {
    font-size: 18px;
    line-height: 27px;
    width: 60%;
  }

  .materials {
    width: 25vw;
    margin: 0 1vw;
  }


  /* LOGIN */

  .login-box {
    width: 250px;
    background: hsl(0, 0%, 100%);
    border: 0px solid hsl(0, 0%, 0%) !important;
    padding: 20px;
    font-size: 16px;
    text-align: center !important;
    margin: 5vh auto;
  }

  .login-box input[type="text"],
  .login-box input[type="email"],
  .login-box input[type="password"] {
    height: 50px;
    font-size: 16px;
    /* Prevents iOS zoom on focus */
    padding: 0 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
  }

  /* Style login button */
  .login-box input[type="submit"],
  .login-box button[type="submit"],
  .login-button {
    height: 50px;
    font-size: 18px;
    width: 100%;
    margin: 20px 0;
  }

  .logout-button-main {
    display: none;
  }

  /* Make forgot password link more tappable */
  a.forgot-password {
    display: block;
    padding: 10px 0;
    margin-bottom: 15px;
    font-size: 16px;
  }

  /* Ambassador page */

  .ambassador-participant-details {
    font-size: 3.5vw;
  }
  .ambassador-participant-details i {
    font-size: 3.5vw !important;
  }
  
  .ambassador-participant-points  {
    font-size: 3.4vw;
  }

  .ambassador-participant-certificates {
    width: auto !important;
  }
}

@media only screen and (max-width: 1200px) {
  [dir="rtl"] .content-wrapper,
  html[lang="ar"] .content-wrapper {
    text-align: right !important;
  }
  
  [dir="rtl"] .menu ul .menu-bars,
  html[lang="ar"] .menu ul .menu-bars {
    float: left;
  }
  
  [dir="rtl"] .mobile-menu ul,
  html[lang="ar"] .mobile-menu ul {
    text-align: right;
  }
}