/* custom overrides (loaded last) */

/* top contact bar (secondaryNav): the theme positions each icon absolutely
   20px off the block's left edge, which lets the gap between icon and text
   drift with block width. Flow the icons inline instead so each sits tight
   (8px) against its text; keep every item on one line. */
.secondaryNavContent .blockInnerContent {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.secondaryNavContent .blockInnerContent:before {
  position: static !important;
  left: auto !important;
  margin-top: 0 !important;
  margin-right: 8px !important;
  flex: 0 0 auto;
}
.secondaryNavContent .blockInnerContent p {
  margin: 0;
  white-space: nowrap;
}
.secondaryNavContent .blockContainer {
  width: auto !important;
  float: none !important;
  text-align: left !important;
}
.secondaryNavContent .blockInnerContent br {
  display: none;
}
/* at medium widths let whole items flow to the next row instead of
   overflowing; an icon never separates from its text */
.secondaryNavContent {
  flex-wrap: wrap;
  row-gap: 0.35em;
}

/* newsletter section: the Lumistry widget carries its own title, the
   template heading was removed at build time; center the widget in the band */
.blockContent.lumistryNewsletter {
  display: block !important;
}
.blockContent.lumistryNewsletter .blockImg.blockForm {
  float: none !important;
  width: 100% !important;
  max-width: 640px;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex;
  justify-content: center;
}
.blockContent.lumistryNewsletter .blockImg.blockForm > [data-lumistry-capture] {
  width: 100%;
}

/* our-pharmacy history section: three storefront photos in a row beneath the
   history text, matching the original medsaverxlexlegends.com about page */
.historyPhotoRow {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: center;
}
.historyPhotoRow img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: 33.333%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}
@media (max-width: 640px) {
  .historyPhotoRow {
    flex-direction: column;
  }
  .historyPhotoRow img {
    max-width: 100%;
  }
}

/* header logo sizing: subpages use div.logo (single-h1 fix); mirror the
   theme's .headerContent h1.logo img sizing so both render identically */
.headerContent div.logo img {
  width: 100% !important;
  max-width: 220px !important;
}
/* our-pharmacy history section: left-justify the text column */
.historyBlock .maxWidth--content {
  margin-left: 0;
  margin-right: auto;
}
/* our-pharmacy team cards: keep the portrait circles modest */
.items_staffphotos .itemImg .contentImg.imgShape.circleImg {
  max-width: 260px;
  margin: 0;
}
/* our-pharmacy intro photo: modest centered circle like the La Grange site */
.introPhoto .blockImg .contentImg.imgShape {
  max-width: 340px;
  margin: 0 auto;
}
.introPhoto .blockImg .contentImg.imgShape img {
  width: 100%;
}
@media (max-width: 767px) {
  .secondaryNavContent .blockInnerContent {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .headerAndNavContainer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
  }
  /* eyebrow (secondary nav) collapses on scroll to reclaim space */
  .secondaryNav {
    overflow: hidden;
    max-height: 300px;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .secondaryNav.eyebrow-collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
  }
}
