/* ==== SECTION 5: mirror the working section-3 layout ==== */
#section-5 {
    display: flex;
    padding: 120px 28px 80px;   /* CHANGED: pushes section down */
    flex-direction: row;
    box-sizing: border-box;
    align-items: center;        /* ADDED: vertical centering */
    min-height: 60vh;           /* ADDED: gives natural centered space */
    padding-top: 0;
  }


.sec5-con {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* make the two main children share available width similarly to section-3 */
.sec5-con > .text-main-con,
.sec5-con > .sec5-img-con {
    flex: 1 1 0; /* grow/shrink equally */
    min-width: 0; /* prevents overflow of long content inside flex items */
    box-sizing: border-box;
}

/* text column layout (matches your HTML .text-main-con > .text-con) */
.text-main-con {
    display: flex;
    flex-direction: column;
}

.text-con {
    display: flex;
    flex-direction: column;
}

/* heading: centered and styled like section-3 */
.text-con h2 {
    color: #642E11 !important;
    padding: 12px 8px;
    font-size: x-large;
    text-align: center;     /* center the Prime Location heading */
    margin: 10;
}

/* paragraphs: justify and match spacing from section-3 */
.text-con p {
    padding: 0px;
    font-size: small;
    line-height: 1.6;
    text-align: justify;    /* justify the paragraphs */
    padding: 0px 15px 65px;
}

/* image column */
.sec5-img-con {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* keep image on the right */
    box-sizing: border-box;
}

.sec5-img-con img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-width: 420px; /* limit so text column remains readable */
    border-radius: 1px;
}

/* ===== responsive adjustments (same pattern as section-3) ===== */
@media (max-width: 1200px) {
  #section-5 { padding: 28px;}
  .sec5-con { gap: 16px;}
 
  .sec5-con > .text-main-con,
  .sec5-con > .sec5-img-con {
    flex: 1 1 45%;
    min-width: 45%;
    max-width: 45%;
    box-sizing: border-box;
  }

  .text-con h2 { font-size: 1.6rem; padding: 12px; }
  .text-con p { font-size: 0.98rem; 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 > .text-main-con,
  .sec5-con > .sec5-img-con {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
  }

  .text-con h2 { font-size: 1.35rem; padding: 8px; text-align: center; }
  .text-con p { font-size: 0.98rem; 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; }
  .sec5-text-con p { font-size: small; 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;
  }
}


/* <= 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; }

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

/* Utility: always prevent children from forcing horizontal scroll */
.sec5-con, .sec5-con > *, .sec5-img-con, .sec5-img-con > * {
  box-sizing: border-box;
  min-width: 0;
}
