/* Tablet styles */
@media only screen and (max-width: 1250px) {
  .wrapper {
    max-width: 850px;
  }
  .sec3 .textbox {
    padding: 30px 20px;
  }
  .sec3 .textbox .box {
    width: 580px;
  }
  .sec3 .textbox .box a {
    width: calc(50% - 5px);
  }
}

/* Small tablet and large phone styles */
@media only screen and (max-width: 850px) {
  .wrapper {
    max-width: 100%;
    padding: 0 15px;
  }
  
  .line {
    height: 50px;
  }
  
  .line p {
    font-size: 14px;
    line-height: 50px;
  }
  
  .sec1 {
    padding: 20px 0;
  }
  
  .sec1 img {
    max-height: 100px;
  }
  
  .sec2 {
    padding: 30px 0;
  }
  
  .sec2 h1 {
    font-size: 26px;
    line-height: 1.3;
    text-align: center;
    padding: 0 15px;
  }
  
  .sec2 h1 span {
    font-size: 18px;
    display: block;
    margin-top: 15px;
  }
  
  .sec3 {
    padding: 20px 0;
  }
  
  .sec3 .textbox {
    padding: 25px 15px;
    margin: 0 15px;
    box-sizing: border-box;
  }
  
  .sec3 .textbox .box {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
  
  .sec3 .textbox h1 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
  }
  
  /* Fix button layouts for all questions */
  .sec3 .first_question .textbox.question1 .box,
  .sec3 .changable_popup .question1 .box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0;
  }
  
  .sec3 .first_question .textbox.question1 .box a,
  .sec3 .changable_popup .question1 .box a {
    width: calc(100% - 20px) !important;
    max-width: 300px;
    margin: 0 !important;
    padding: 14px 15px;
    font-size: 16px;
    box-sizing: border-box;
    text-align: center;
  }
  
  /* Form question styles */
  .sec3 .form_question p {
    font-size: 14px;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 20px;
  }
  
  .sec3 .form_question .box {
    width: 100%;
  }
  
  .sec3 .form_question .box .inputs {
    margin-bottom: 30px;
  }
  
  .sec3 .form_question .box .inputs input {
    width: 100%;
    max-width: 100%;
    font-size: 20px;
    padding: 12px;
    margin: 0;
  }
  
  .sec3 .form_question .box .inputs input::placeholder {
    font-size: 16px;
  }
  
  .sec3 .form_question .box .inputs_full_name {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  .sec3 .form_question .box .inputs_full_name input {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
  
  .sec3 .form_question .box button {
    width: 100%;
    max-width: 350px;
    font-size: 16px;
    padding: 15px 20px;
    margin-top: 20px;
  }
  
  /* Fix for Google autocomplete on mobile */
  .pac-container {
    max-width: calc(100% - 40px);
    left: 20px !important;
    right: 20px !important;
  }
  
  .sec4 {
    padding: 20px 0;
  }
  
  .sec4 p {
    font-size: 11px;
    text-align: center;
    padding: 0 20px;
  }
  
  /* Hide arrow on mobile */
  .sec3 .textbox .box .arow {
    display: none;
  }
}

/* Phone styles */
@media only screen and (max-width: 500px) {
  .wrapper {
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  .line {
    height: 40px;
  }
  
  .line p {
    font-size: 12px;
    line-height: 40px;
  }
  
  .sec1 {
    padding: 15px 0;
  }
  
  .sec1 img {
    max-height: 80px;
  }
  
  .sec2 {
    padding: 20px 0;
  }
  
  .sec2 h1 {
    font-size: 22px;
    padding: 0 10px;
    line-height: 1.2;
  }
  
  .sec2 h1 span {
    font-size: 16px;
    margin-top: 10px;
  }
  
  .sec3 {
    padding: 15px 10px;
  }
  
  .sec3 .textbox {
    padding: 20px 10px;
    margin: 0;
    border-radius: 8px;
    box-sizing: border-box;
  }
  
  .sec3 .textbox h1 {
    font-size: 18px;
    line-height: 1.3;
    padding: 0 5px;
  }
  
  .sec3 .first_question .textbox.question1 .box,
  .sec3 .changable_popup .question1 .box {
    padding: 0 5px;
  }
  
  .sec3 .first_question .textbox.question1 .box a,
  .sec3 .changable_popup .question1 .box a {
    width: 100% !important;
    max-width: none;
    padding: 12px 10px;
    font-size: 15px;
    margin: 0 !important;
  }
  
  .sec3 .form_question p {
    font-size: 11px;
    padding: 0 5px;
  }
  
  .sec3 .form_question .box {
    padding: 0 5px;
  }
  
  .sec3 .form_question .box .inputs input {
    font-size: 16px;
    padding: 8px;
    margin: 0;
    width: 100%;
    max-width: none;
  }
  
  .sec3 .form_question .box .inputs input::placeholder {
    font-size: 13px;
  }
  
  .sec3 .form_question .box button {
    font-size: 13px;
    padding: 10px 15px;
    letter-spacing: 0.5px;
    width: 100%;
    max-width: none;
    margin: 15px 0 0 0;
  }
  
  .sec4 p {
    font-size: 10px;
    padding: 0 10px;
  }
  
  /* Ensure no horizontal scroll */
  .sec3 .textbox .box {
    overflow: hidden;
  }
}

/* Very small phone styles */
@media only screen and (max-width: 375px) {
  .sec1 img {
    max-height: 70px;
  }
  
  .sec2 h1 {
    font-size: 20px;
  }
  
  .sec2 h1 span {
    font-size: 16px;
  }
  
  .sec3 .textbox h1 {
    font-size: 18px;
  }
  
  .sec3 .first_question .textbox.question1 .box a,
  .sec3 .changable_popup .question1 .box a {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .sec3 .form_question .box .inputs input {
    font-size: 16px;
  }
}

/* Landscape phone orientation */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  .sec1 {
    padding: 10px 0;
  }
  
  .sec1 img {
    max-height: 60px;
  }
  
  .sec2 {
    padding: 15px 0;
  }
  
  .sec2 h1 {
    font-size: 20px;
  }
  
  .sec3 .textbox {
    padding: 20px 15px;
  }
  
  .sec3 .textbox h1 {
    font-size: 18px;
    margin-bottom: 15px;
  }
}

/* Fix for dark mode on mobile */
@media only screen and (max-width: 850px) {
  body.dark {
    background-color: #f0f3f7;
  }
  
  .dark .sec1,
  .dark .sec2,
  .dark .sec3 {
    background-color: transparent;
  }
  
  .dark .sec3 .textbox {
    background-color: #fff;
  }
}
