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

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

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

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

.sec6-text-con h2 {
  color: var(--teritary-col);
  padding: 15px;
  font-size: x-large;
  margin-bottom: 10px;
  padding-left: 20px;
}

.sec6-text-con P {
  padding: 15px;
  font-size: 16px;
  text-align: justify;
  line-height: 1.6;
  margin-top: -15px;
  padding-left: 20px;
}

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

.sec6-img-con img {
  width: 100%; /* keep natural width */
  max-width: 100%; /* fit inside column */
  height: 100%; /* keep full height, no cut */
  max-height: 350px;
  border-radius: 5%;
  margin-bottom: 5%;
}

@media (max-width: 1200px) {
  #section-6 {
    padding: 28px;
  }
  .sec6-con {
    gap: 14px;
  }

  .sec6-text-con {
    padding: 10 12px;
  }
  .sec6-text-con h2 {
    font-size: 1.75rem;
    padding: 12px 0;
  }
  .sec6-text-con p {
    font-size: 15px;
    padding: 10px 0;
    line-height: 1.6;
  }

  /* prevent flex children from forcing horizontal overflow */
  .sec6-con,
  .sec6-con > * {
    box-sizing: border-box;
    min-width: 0;
  }
}

/* <= 900px */
@media (max-width: 900px) {
  #section-6,
  .sec6-con {
    flex-direction: column;
    padding: 18px;
    gap: 12px;
  }

  .sec6-text-con {
    align-items: flex-start;
    text-align: left;
    padding: 6px 4px;
  }
  .sec6-text-con h2 {
    font-size: 1.4rem;
    padding: 8px 0;
  }
  .sec6-text-con p {
    font-size: 0.95rem;
    padding: 6px 0;
    line-height: 1.55;
  }
  .sec6-img-con {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 6px 0;
  }
  .sec6-img-con img {
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 0;
  }
}

/* <= 520px (phones) */
@media (max-width: 520px) {
  #section-6,
  .sec6-con {
    padding: 14px 10px;
    gap: 10px;
  }
  .sec6-text-con h2 {
    padding: 6px 0;
    margin-top: 20px;
    margin-bottom: 16px;
    font-size: 1.4rem;
  }
  .sec6-text-con p {
    font-size: 0.95rem;
    padding: 6px 0;
    line-height: 1.45;
    text-align: justify;
    line-height: 1.6;
  }

  .sec6-img-con {
    gap: 8px;
    padding: 4px 0;
    margin-top: 16px;
  }
  .sec6-img-con img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 0px;
    display: block;
  }
}

/* <= 375px (very small phones) */
@media (max-width: 375px) {
  #section-6,
  .sec6-con {
    padding: 10px 8px;
    gap: 8px;
  }

  .sec6-text-con h2 {
    padding: 4px 0;
    font-size: 1.4rem;
    margin-top: -20px;
    padding-bottom: 10px;
  }
  .sec6-text-con p {
    padding: 4px 0;
    line-height: 1.4;
    font-size: 0.95rem;
  }

  .sec6-img-con img {
    width: 100%;
    max-width: 100%;
    height: 220px; /* slightly shorter for very small phones */
    max-height: 220px;
    object-fit: cover;
    display: block;
  }
}

@media (max-width: 768px) {
  .sec6-text-con h2 {
    margin-top: -20px;
    font-size: 1.4rem;
  }

  .sec6-img-con {
    margin-top: 20px;
  }

  .sec6-img-con img {
    border-radius: 5%;
  }
}
