/* Mobile fixes for QIOSQ website */

/* Fix preloader centering on mobile */
@media (max-width: 520px) {
  .preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  }

  .preloader-content {
    text-align: center;
    max-width: 250px;
    width: 90%;
    padding: 0 20px;
  }

  .preloader-progress {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
    position: relative;
  }

  .preloader-bar {
    height: 100%;
    background: #00c897;
    width: 0%;
    border-radius: 1px;
    transition: width 0.3s ease-out;
  }
}

/* Hide QIOSQ intro animation on mobile */
@media (max-width: 520px) {
  .intro {
    display: none !important;
  }
}

/* Fix heading sizes that are too big for mobile */
@media (max-width: 520px) {
  h1 {
    font-size: 16vw !important;
  }

  h2 {
    font-size: 12vw !important;
  }

  h3 {
    font-size: 8vw !important;
  }

  h4 {
    font-size: 6vw !important;
  }

  h5 {
    font-size: 5vw !important;
  }

    /* Specific adjustments for certain sections */
  .marquee h1 {
    font-size: 14vw !important;
  }

  .footer .full h1 {
    font-size: 20vw !important;
  }

    /* Fix Selected Projects title to fit mobile screen */
  .work .heading h1 {
    font-size: 10vw !important;
    line-height: 90% !important;
  }

  /* Ensure the title stacks properly */
  .work .heading .fade,
  .work .heading .fill {
    white-space: normal !important;
    text-align: left !important;
  }

  /* Specific fix for work section heading container */
  .work .heading_cnt {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .work .heading {
    width: 100% !important;
  }
}

/* Fix contact form alignment to match other sections */
@media (max-width: 520px) {
  /* Main contact section */
  section.contact {
    padding: 8rem 0;
  }

  section.contact #container {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    padding: 0 1rem !important;
  }

  section.contact #container .heading_cnt {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
  }

  /* Override the nested contact section that's causing alignment issues */
  section.contact .contact {
    padding: 0 !important;
    margin: 0 !important;
  }

  section.contact .contact #container {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  section.contact .contact #container .wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  section.contact .contact #container .wrapper .wrapper {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  section.contact .contact #container .wrapper .wrapper h5 {
    text-align: left !important;
    margin-top: 3rem !important;
    width: 100% !important;
  }

  section.contact .contact #container .wrapper .wrapper form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2rem !important;
    width: 100% !important;
    margin: 2rem 0 0 0 !important;
    padding: 0 !important;
  }

  section.contact .contact #container .wrapper .wrapper form input[type="text"],
  section.contact .contact #container .wrapper .wrapper form input[type="email"],
  section.contact .contact #container .wrapper .wrapper form input[type="tel"],
  section.contact .contact #container .wrapper .wrapper form textarea {
    width: 100% !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 2rem 0 !important;
  }

  section.contact .contact #container .wrapper .wrapper form .inputSub {
    align-self: flex-start !important;
    margin: 2rem 0 0 0 !important;
    padding: 1.2rem 2rem !important;
  }
}

/* Additional mobile container padding fixes */
@media (max-width: 520px) {
  #container {
    padding: 0 1rem;
  }

  .contact {
    padding: 4rem 0 !important;
  }

  .contact .contact {
    padding: 0;
  }
}
