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

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

.sec5-con > .sec5-text-con,
.sec5-con > .sec5-img-con {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
}

.sec5-text-con {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.sec5-text-con h2 {
  color: var(--teritary-col);
  padding: 15px;
  font-size: x-large;
}

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

.sec5-img-con {
  padding: 20px;
}

.sec5-img-con img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 350px;
  border-radius: 5%;
  margin-bottom: 5%;
}

/* ===== responsive adjustments (same pattern as section-3) ===== */
@media (max-width: 1200px) {
  #section-5 {
    padding: 28px;
  }
  .sec5-con {
    gap: 16px;
  }

  .sec5-con > .sec5-text-con,
  .sec5-con > .sec5-img-con {
    flex: 1 1 45%;
    min-width: 45%;
    max-width: 45%;
    box-sizing: border-box;
  }

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

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

@media (max-width: 900px) {
  #section-5,
  .sec5-con {
    flex-direction: column;
    padding: 18px;
    gap: 12px;
  }

  .sec5-con > .sec5-text-con,
  .sec5-con > .sec5-img-con {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
  }

  .sec5-text-con h2 {
    font-size: 1.35rem;
    padding: 8px;
    text-align: center;
  }
  .sec5-text-con p {
    font-size: 0.95rem;
    padding: 8px;
    line-height: 1.5;
    text-align: justify;
  }

  .sec5-img-con {
    padding: 6px 0;
    justify-content: center;
  }
  .sec5-img-con img {
    width: 100%;
    height: auto;
    padding: 0;
    max-width: 100%;
  }
}

/* <= 520px — phone portrait: tighter paddings, readable text, no horizontal scroll */
@media (max-width: 520px) {
  #section-5,
  .sec5-con {
    padding: 14px 10px;
    gap: 10px;
  }

  .sec5-text-con h2 {
    padding: 6px 2px;
    margin-top: -20px;
  }
  .sec5-text-con p {
    font-size: 0.95rem;
    padding: 6px 2px;
    line-height: 1.45;
    text-align: justify;
  }

  .sec5-img-con {
    gap: 10px;
    padding: 4px 0;
  }
  .sec5-img-con img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin-top: -40px;
  }
}

/* <= 375px — very small phones: smallest comfortable sizes */
@media (max-width: 375px) {
  #section-5,
  .sec5-con {
    padding: 10px 8px;
    gap: 8px;
  }

  .sec5-text-con h2 {
    padding: 4px 2px;
  }
  .sec5-text-con p {
    padding: 4px 2px;
    line-height: 1.4;
    font-size: 0.95rem;
  }

  .sec5-img-con img {
    border-radius: 6px;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .sec5-img-con {
    margin-top: 40px;
  }
  .sec5-text-con h2 {
    margin-bottom: 16px;
    font-size: 1.4rem;
  }

  .sec5-text-con p {
    margin-bottom: 16px;
    font-size: 0.95rem;
  }
}

/* Extra spacing for very small screens */
@media (max-width: 480px) {
  .sec5-img-con {
    margin-top: 40px;
  }
  .sec5-text-con h2 {
    margin-bottom: 14px;
  }

  .sec5-text-con p {
    margin-bottom: 14px;
    line-height: 1.6;
  }
}
