#section-5 {
  display: block;
  padding: 15px;
  background: var(--secondary-col);
}

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

.sec5-text-con {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.sec5-heading-regular {
  color: var(--tertiary-col);
  font-size: 24px;
  font-family: var(--font1), serif;
}

.sec5-heading-cursive {
  font-family: var(--font2), cursive;
  color: var(--primary-col);
  margin-left: 15px;
  font-size: 35px;
}
.sec5-text-con p {
  padding: 15px;
  line-height: 1.6;
  font-size: small;
  text-align: justify;
}

.sec5-acc-map-con {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  padding: 20px;
  justify-content: space-around;
}

.accordian-container {
  display: flex;
  flex-direction: column;
  width: 50%;
  flex: 1;
  align-items: center;
  justify-self: center;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--secondary-col);
  color: var(--tertiary-col);
  padding: 15px;
  cursor: pointer;
  border: none;
  width: 450px;
  text-align: left;
  font-weight: bold;
}

.accordion-header::after {
  content: "";
  display: inline-block;
  margin-left: auto;

  transform: rotate(45deg);
  /* Initial rotation for down arrow */
  border: solid black;
  /* Adjust color */
  border-width: 0 2px 2px 0;
  /* Creates the arrow shape */
  padding: 3px;
  /* Adjust size */
  transition: transform 0.3s ease;
  /* Smooth transition for arrow rotation */
}

.accordion-header.active::after {
  transform: translateY(-50%) rotate(-135deg);
  /* Rotates to point up */
}

.accordion-header:hover {
  background-color: #e0e0e0;
}

.acc-icon-head-con {
  display: flex;
  flex-direction: row;
}
.acc-icon-head-con img {
  border-radius: 8px;
}
.acc-icon-head-con img:hover {
  border-radius: 8px;
  cursor: pointer;
}
.accordion-item {
  padding: 10px;
}

.accordion-content {
  padding: 0 15px;
  max-height: 0;
  /* Initially hidden */
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  /* Smooth transition */
}

.accordion-content ul {
  list-style: none;
  color: var(--tertiary-col);
  font-family: var(--font3);
}

.accordion-content ul span {
  font-size: medium;
  font-weight: 700;
}

.accordion-content ul li {
  font-size: small;
  padding: 2.5px;
}

.accordion-content ul li p {
  padding: 2px;
  line-height: 1.5;
}

/* Class added by JavaScript to show content */
.accordion-content.active {
  max-height: fit-content;
  /* Adjust as needed for content height */
  padding: 10px;
}

#prime-loc-accordian-con .accordion-content ul li::before {
  content: "";
  display: inline-block;
  width: 5px; /* circle size */
  height: 5px; /* circle size */
  background-color: rgb(0, 35, 77, 1) !important;
  border-radius: 50%; /* makes it a circle */
  margin-right: 10px;
}

.acb-ul {
  line-height: 1.6;
  list-style: circle;
}

.map-con {
  width: 50%;
  flex: 1;
}

.google-map {
  width: 100%;
  height: 100%;
}

.line {
  width: 100%;
  text-align: center;
  margin: 40px 0;
  position: relative;
  font-size: 22px;
  color: #6c5f54;
  letter-spacing: 8px;
}

.line::before,
.line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #8a827c;
}

.line::before {
  left: 0;
}

.line::after {
  right: 0;
}

@media (max-width: 1200px) {
  #section-13 {
    padding: 28px;
  }
  .sec5-con {
    gap: 16px;
  }

  .sec5-acc-map-con {
    padding: 12px;
    gap: 14px;
  }

  /* allow two-column but remove hard widths that cause overflow */
  #prime-loc-accordian-con {
    flex: 1 1 48%;
    max-width: 520px;
    align-items: center;
    justify-content: center;
  }
  #prime-loc-accordian-con .accordion-header,
  #prime-loc-accordian-con .accordion-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .map-con {
    width: 48%;
    flex: 1 1 48%;
    max-width: 520px;
  }
  .google-map {
    height: 360px;
    max-height: 360px;
    width: 100%;
  }

  /* safety */
  .sec5-acc-map-con,
  .sec5-acc-map-con > * {
    min-width: 0;
    box-sizing: border-box;
  }
}

/* <= 900px: stack accordion and map vertically, full width */
@media (max-width: 900px) {
  #section-13 {
    padding: 20px;
  }
  .sec5-acc-map-con {
    flex-direction: column;
    padding: 10px;
    gap: 12px;
  }

  #prime-loc-accordian-con,
  .map-con {
    width: 100%;
    flex: 0 0 auto;
    max-width: 100%;
    align-items: center;
    justify-content: center;
  }

  #prime-loc-accordian-con .accordion-header,
  #prime-loc-accordian-con .accordion-content {
    width: 100%;
    max-width: 100%;
  }

  .google-map {
    height: 320px;
    max-height: 320px;
    width: 100%;
  }

  .sec5-text-con p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

/* <= 520px: phone portrait — reduce paddings, smaller fonts, compact accordion and map */
@media (max-width: 520px) {
  #section-13 {
    padding: 14px 10px;
  }
  .sec5-con {
    gap: 10px;
  }

  .sec5-text-con h2 {
    padding: 4px;
  }
  .sec5-text-con p {
    font-size: small;
    padding: 4px;
    text-align: justify;
  }

  .map-con-text-con {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .sec5-acc-map-con {
    padding: 6px 0;
    gap: 10px;
  }

  #prime-loc-accordian-con,
  .map-con {
    width: 100%;
    padding: 0;
    align-items: center;
    justify-content: center;
  }

  #prime-loc-accordian-con {
    display: flex;
    flex-direction: column;
  }

  /* make accordion elements wrap content and not force width */
  #prime-loc-accordian-con .accordion-header,
  #prime-loc-accordian-con .accordion-content {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.95rem;
  }

  .accordion-item {
    width: stretch;
  }

  .google-map {
    height: 260px;
    max-height: 260px;
    width: 100%;
  }

  .google-map {
    display: block;
    position: relative;
    width: 100%;
    height: 260px;
    max-height: 260px;
    box-sizing: border-box;
    z-index: 9999; /* ensure map sits above small overlays on mobile */
  }

  /* Make the iframe fill the container on mobile */
  .google-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* ensure list bullets don't overflow */
  #prime-loc-accordian-con .accordion-content ul {
    padding-left: 18px;
  }
  #prime-loc-accordian-con .accordion-content ul li {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .sec5-acc-map-con,
  .sec5-acc-map-con > * {
    box-sizing: border-box;
    min-width: 0;
  }
}

/* <= 375px: very small phones — tighten further so nothing forces horizontal scroll */
@media (max-width: 375px) {
  #section-13 {
    padding: 10px 8px;
  }
  .sec5-text-con h2 {
    font-size: 1rem;
    padding: 3px;
  }
  .sec5-text-con p {
    font-size: 0.88rem;
    padding: 3px;
  }

  .sec5-acc-map-con {
    gap: 8px;
    padding: 4px 0;
  }
  #prime-loc-accordian-con .accordion-header,
  #prime-loc-accordian-con .accordion-content {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 0.9rem;
  }

  .google-map {
    height: 200px;
    max-height: 200px;
    width: 100%;
  }

  .google-map {
    display: block;
    position: relative;
    width: 100%;
    height: 200px;
    max-height: 200px;
    box-sizing: border-box;
    z-index: 9999;
  }

  .google-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* final safety: ensure no overflow from children */
  #prime-loc-accordian-con,
  .map-con,
  .sec5-acc-map-con {
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }
}
