#section-3{
    display: flex;
    padding: 28px;
    flex-direction: row;
   
}

.sec3-con {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

/* make the two main children share available width equally */
.sec3-con > .text-main-con,
.sec3-con > .sec3-img-con {
    flex: 1 1 0; /* grow/shrink equally, base 0 to split space evenly */
    min-width: 0; /* prevents overflow of long content inside flex items */
    box-sizing: border-box;
}
.text-main-con {
    display: flex;
    flex-direction: column;
}
.text-con {
    display: flex;
    flex-direction: column;
}

.text-con h2 {
    color: #642E11 !important;
    padding: 15px;
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.text-con p {
    padding: 15px;
    font-size: small;
    line-height: 1.6;
    text-align: justify;
}

.schedule-button {
    padding: 15px;
}
.schedule-button button {
    font-size: large;
    font-weight: 500;
    font-style: italic;
}

.sec3-img-con {
    padding: 20px;
    
  
}
.sec3-img-con img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 1200px) {
  #section-3 { padding: 28px; }
  .sec3-con { gap: 16px; align-items: stretch; }

  /* allow columns to share space but avoid forcing wide minimums */
  .sec3-con > .text-main-con,
  .sec3-con > .sec3-img-con {
    flex: 1 1 50%;
    min-width: 0; /* prevents overflow */
    box-sizing: border-box;
  }

  .text-con h2 { font-size: 1.6rem; padding: 12px; }
  .text-con p { font-size: 0.95rem; padding: 12px; line-height: 1.55; }

  .sec3-img-con { padding: 12px; }
  .sec3-img-con img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  .schedule-button { padding: 12px; }
  .schedule-button button { font-size: 1rem; }
}

/* <= 900px: stack the two columns vertically, keep content compact */
@media (max-width: 900px) {
  #section-3, .sec3-con { flex-direction: column; padding: 18px; }
  .sec3-con > .text-main-con,
  .sec3-con > .sec3-img-con {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 100%;
  }

  .text-con h2 { font-size: 1.35rem; padding: 10px; }
  .text-con p { font-size: 0.96rem; padding: 10px; line-height: 1.5; text-align: left; }

  .sec3-img-con { padding: 8px 0; }
  .sec3-img-con img { width: 100%; height: auto; padding: 8px 0; }

  .schedule-button { text-align: center; margin-top: 10px; }
  .schedule-button button {
    width: auto;
    max-width: 320px;
    padding: 10px 18px;
    font-size: 1rem;
  }
}

/* <= 520px: phone portrait — tighten paddings/fonts and make CTA full width */
@media (max-width: 520px) {
  #section-3, .sec3-con { padding: 14px; gap: 12px; }
  .text-con h2 { padding: 8px; text-align: center;}
  .text-con p { font-size: small; padding: 8px; line-height: 1.5; text-align: justify; }

  .sec3-img-con { padding: 6px 0; }
  .sec3-img-con img { max-width: 100%; height: auto; }

  .schedule-button { padding: 8px; }
  .schedule-button button {
    width: 100%;
    display: block;
    padding: 12px;
    font-size: 1rem;
    box-sizing: border-box;
  }
}

/* <= 375px: very small phones — smallest comfortable sizes */
@media (max-width: 375px) {
  #section-3, .sec3-con { padding: 10px; gap: 10px; }
  .text-con h2 { padding: 6px; }
  .text-con p { padding: 6px; line-height: 1.4; }

  .sec3-img-con img { height: auto; max-width: 100%; }

  .schedule-button button {
    padding: 10px;
  }
}

/* Utility: ensure images and flex items never force horizontal scroll */
.sec3-con, .sec3-con > * {
  box-sizing: border-box;
}