/* Home page only (body#Multicares). Split out of index.html so the rules can be
   reviewed in one place; nothing here is shared with other templates. */

/* ---------------------------------------------------------------- */
/* 1. Category cards (#portfolio)                                    */
/*    Was: a full-bleed rgba(254,209,54,.9) overlay with a plus icon. */
/*    Now: the same white card as /products/ - hairline border, 12px  */
/*    radius, and a lift plus soft shadow on hover. The caption block */
/*    keeps its fixed 90px height so the two rows stay aligned.       */
/* ---------------------------------------------------------------- */
body#Multicares #portfolio .portfolio-item {
  /* Positioned so a hovered card can outrank the row below it: the lift and
     its shadow would otherwise be painted under the next row's cards. */
  position: relative;
  z-index: 2;
  transition: transform .26s cubic-bezier(.2, .7, .3, 1),
              filter .26s ease;
}
body#Multicares #portfolio .portfolio-link {
  display: block;
  max-width: none;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #9EBAD7;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
body#Multicares #portfolio .portfolio-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
body#Multicares #portfolio .portfolio-caption {
  max-width: none;
  margin: 0;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #9EBAD7;
  border-top: 1px solid #e3ebf4;
  border-radius: 0 0 12px 12px;
  position: relative;
}
/* The caption link only wrapped the words, so the blank space around the
   title did nothing on click. Stretching it over the whole caption makes the
   bottom half of the card behave like the photo half. */
body#Multicares #portfolio .portfolio-caption > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* Caption links carry an inline 20px size in the markup; the styled span
   inside them already sets the dark ink, so only the size is normalised. */
body#Multicares #portfolio .portfolio-caption a {
  font-size: 1rem !important;
  line-height: 1.35;
}

@media (hover: hover) {
  body#Multicares #portfolio .portfolio-item:hover,
  body#Multicares #portfolio .portfolio-item:focus-within {
    z-index: 5;
    transform: translateY(-8px);
    /* drop-shadow instead of box-shadow: the photo and caption are two
       sibling boxes and a single shadow has to wrap both. */
    filter: drop-shadow(0 18px 24px rgba(3, 18, 36, .38));
  }
  body#Multicares #portfolio .portfolio-item:hover .portfolio-link,
  body#Multicares #portfolio .portfolio-item:focus-within .portfolio-link,
  body#Multicares #portfolio .portfolio-item:hover .portfolio-caption,
  body#Multicares #portfolio .portfolio-item:focus-within .portfolio-caption {
    border-color: #0054a5;
  }
}

@media (prefers-reduced-motion: reduce) {
  body#Multicares #portfolio .portfolio-item,
  body#Multicares #portfolio .portfolio-item:hover,
  body#Multicares #portfolio .portfolio-item:focus-within {
    transition: none;
    transform: none;
  }
}

/* ---------------------------------------------------------------- */
/* 2. Markets We Serve (white band)                                  */
/*    Same card as /products/#applications: the photo fills the left */
/*    half, the icon and market name stack on the right, and one     */
/*    stretched link covers the whole card.                          */
/* ---------------------------------------------------------------- */
body#Multicares #MulticaresIndustries .mtc-p-ind {
  display: grid;
  /* Two across: eight markets read as four wide bands, not a grid of
     thumbnails, so the block carries the same weight as the six cards above. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
body#Multicares #MulticaresIndustries .c {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #9EBAD7;
  border-radius: 10px;
  transition: transform .24s cubic-bezier(.2, .7, .3, 1),
              border-color .24s ease,
              box-shadow .24s ease;
}
body#Multicares #MulticaresIndustries .ph {
  /* 233px square = 1.5x the old 156px thumbnail. Fixed rather than a
     percentage: two-across would otherwise blow the photo up to 325px. */
  flex: 0 0 233px;
  width: 233px;
  height: 233px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: #eef2f7;
}
body#Multicares #MulticaresIndustries .ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body#Multicares #MulticaresIndustries .tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Three lines of copy (icon, market name, descriptor) sit as one left-aligned
     column; centring only works for a single line, which is what this was. */
  align-items: flex-start;
  text-align: left;
  gap: 12px;
  padding: 20px 24px 20px 26px;
}
body#Multicares #MulticaresIndustries .lg {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}
body#Multicares #MulticaresIndustries .n {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  color:var(--brand-deep);
}
body#Multicares #MulticaresIndustries .n a {
  color:var(--brand-deep);
  text-decoration: none;
}
/* Stretched hit area: the market name is the anchor text, its ::after covers
   the card so the photo half is clickable too. */
body#Multicares #MulticaresIndustries .n a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  z-index: 1;
}
body#Multicares #MulticaresIndustries .n a:hover,
body#Multicares #MulticaresIndustries .c:hover .n a {
  color:var(--brand);
}
body#Multicares #MulticaresIndustries .n a:focus-visible {
  outline: 2px solid #0054a5;
  outline-offset: 4px;
}
body#Multicares #MulticaresIndustries .d {
  margin: 0;
  /* No ch cap: the panel is 368px wide, and capping it to 34ch pushed the
     copy to three lines inside a 233px-tall photo slot. */
  font-size: .95rem;
  line-height: 1.45;
  font-weight: 400;
  color:var(--muted);
}
body#Multicares #MulticaresIndustries .arw {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 22px;
  height: 22px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6e3f1;
  border-radius: 50%;
  background: #fff;
  color:var(--brand);
  transition: border-color .18s ease, background .18s ease;
}
body#Multicares #MulticaresIndustries .arw::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: -2px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: margin-left .18s ease;
}
@media (hover: hover) {
  body#Multicares #MulticaresIndustries .c:hover,
  body#Multicares #MulticaresIndustries .c:focus-within {
    border-color: #0054a5;
    transform: translateY(-7px);
    box-shadow: 0 22px 44px rgba(0, 84, 165, .24),
                0 8px 16px rgba(0, 84, 165, .12);
  }
  body#Multicares #MulticaresIndustries .c:hover .arw,
  body#Multicares #MulticaresIndustries .c:focus-within .arw {
    border-color: #0054a5;
    background: #eef4fb;
  }
  body#Multicares #MulticaresIndustries .c:hover .arw::before,
  body#Multicares #MulticaresIndustries .c:focus-within .arw::before {
    margin-left: 1px;
  }
}
@media (max-width: 991.98px) {
  /* One per row: at tablet width a 233px photo would leave the name ~100px. */
  body#Multicares #MulticaresIndustries .mtc-p-ind {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}
@media (max-width: 575.98px) {
  body#Multicares #MulticaresIndustries .mtc-p-ind {
    grid-template-columns: minmax(0, 1fr);
  }
  /* A phone card is 364px wide. Stacked it runs 422px tall and eight rows
     cost 3838px of page; with a 150px photo on the left the card is 263px
     and the block is 2542px, which is what the page needed. The copy panel
     keeps 214px, so the descriptor wraps to four lines -- that is the
     accepted trade against a 1296px shorter page. */
  body#Multicares #MulticaresIndustries .ph {
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    aspect-ratio: 1 / 1;
  }
  /* extra bottom padding clears the corner arrow */
  body#Multicares #MulticaresIndustries .tx {
    padding: 14px 10px 34px 14px;
    gap: 9px;
  }
  /* one step down: at .95rem the copy ran to four short lines, and the name
     wrapped onto two, which is what made the card feel tall and cramped. */
  body#Multicares #MulticaresIndustries .d {
    font-size: .9rem;
    line-height: 1.45;
  }
}

/* ---------------------------------------------------------------- */
/* 3. OEM/ODM band - now on brand blue                               */
/*    The three yellow tile icons stay as they are; the heading and  */
/*    the three blurbs sit straight on the band and need light ink.  */
/*    The card titles themselves were flipped to white in the markup */
/*    because they carried an inline rgb(33,37,41) span.             */
/* ---------------------------------------------------------------- */
body#Multicares #MulticaresOEMODM {
  background-color: #0054a5;
}
body#Multicares #MulticaresOEMODM h2,
body#Multicares #MulticaresOEMODM h2 a {
  color:var(--accent);
}
/* The band title is a link too. Its own color rule outweighs the generic
   `h2 a:hover`, so the hover tint has to be declared at the same depth.
   S536: the title already rests on gold, so the old gold hover was a no-op.
   It now steps to white - the same move Products and FAQ make on their own
   blue bands. */
body#Multicares #MulticaresOEMODM h2 a:hover,
body#Multicares #MulticaresOEMODM h2 a:focus-visible {
  color:var(--on-dark);
  text-decoration: none;
}
body#Multicares #MulticaresOEMODM .text-muted {
  color:var(--on-dark) !important;
}

/* ---------------------------------------------------------------- */
/* 3. Band spacing: one rhythm for every band                        */
/*    D = 75px, the gap the Products band already had between the    */
/*    subtitle and the first card. Every band now keeps 1.5 x D of   */
/*    its own padding above and below, and exactly D between its     */
/*    heading and its content.                                       */
/* ---------------------------------------------------------------- */
body#Multicares #portfolio {
  padding-top: 112.5px;
  /* The last card row keeps a 30px bottom margin of its own, so the
     visual gap is padding + 30. 82.5 + 30 = 112.5 = 1.5D. */
  padding-bottom: 82.5px;
}
body#Multicares #MulticaresIndustries .section-heading {
  margin-bottom: 75px;
}
@media (max-width: 767px) {
  /* Below 768 the last card row carries 15.5px of its own instead of 30,
     so the padding shrinks to keep the same 112.5px visual gap. */
  body#Multicares #portfolio {
    padding-bottom: 97px;
  }
}

/* ---------------------------------------------------------------- */
/* 3b. Bands 3-5 on the same rhythm                                  */
/*    OEM/ODM, About and FAQ were still on the template's default    */
/*    section{padding:150px 0}, i.e. 2 x D on both sides. They now   */
/*    keep 1.5 x D like the two bands above, and exactly D between   */
/*    the band title and the first element underneath it.            */
/* ---------------------------------------------------------------- */
body#Multicares #MulticaresOEMODM,
body#Multicares #MulticaresAbout,
body#Multicares #MulticaresFAQ {
  padding-top: 112.5px;
  padding-bottom: 112.5px;
}
body#Multicares #MulticaresOEMODM h2.section-heading,
body#Multicares #MulticaresAbout > h2.section-heading,
body#Multicares #MulticaresFAQ h2 {
  margin-bottom: 75px;
}
/* 3e. The About band now opens with its own kicker + h1, so its band
   title only needs D of air before that block, not a full 75px. */
body#Multicares #MulticaresAbout > h2.section-heading {
  margin-bottom: 40px;
}
/* Each OEM blurb is the last box in its column; its 1rem margin would be
   added to the band padding and read as 128.5px instead of 112.5px. */
body#Multicares #MulticaresOEMODM .text-muted {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- */
/* 3c. Optical bottom padding                                        */
/*    OEM/ODM and About are the only bands that end on a line of     */
/*    text. A 15-16px font in a 1.5 line box paints ~6-12px above    */
/*    the box bottom, which read as 119/125px of air instead of the  */
/*    113px the card-ending bands show. The trim is that leading.    */
/* ---------------------------------------------------------------- */
body#Multicares #MulticaresOEMODM {
  padding-bottom: 106.5px;
}

/* ---------------------------------------------------------------- */
/* 3d. OEM blurb links                                               */
/*    The whole blurb opens the same process modal as the tile icon, */
/*    so it has to read as body copy, not as a blue anchor.          */
/*    Hover cue is the gold accent plus the pointer cursor - no rule */
/*    is drawn under the text, same as the section titles.           */
/* ---------------------------------------------------------------- */
body#Multicares #MulticaresOEMODM .mtc-oem-word {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: color .22s ease;
}
body#Multicares #MulticaresOEMODM .mtc-oem-word:hover,
body#Multicares #MulticaresOEMODM .mtc-oem-word:focus-visible {
  text-decoration: none;
  color:var(--accent);
}
body#Multicares #MulticaresOEMODM .mtc-oem-word:focus-visible {
  outline: 2px solid #ffc107;
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- */
/* 3e. Phone: band title on one line                                 */
/*    40px wraps "Markets We Serve" onto two lines under 390.        */
/* ---------------------------------------------------------------- */
@media (max-width: 575.98px) {
  body#Multicares #MulticaresIndustries .section-heading {
    font-size: 32px;
  }
}

/* ---------------------------------------------------------------- */
/* 4a. Small phones: a 150px photo is too wide for the copy          */
/*    At 360 the text panel drops to 144px and the descriptor runs   */
/*    to five lines. 110px + tighter padding holds it at four.       */
/* ---------------------------------------------------------------- */
@media (max-width: 389.98px) {
  body#Multicares #MulticaresIndustries .ph {
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
  }
  body#Multicares #MulticaresIndustries .tx {
    padding: 14px 10px 34px 12px;
    gap: 9px;
  }
}

/* ---------------------------------------------------------------- */
/* 3c. Contact band: same rhythm as Products / Markets / OEM / About  */
/*    The band still sat on Bootstrap's section{padding:150px 0}       */
/*    (100px under 768) and its h2 kept the UA 8px margin, so the     */
/*    heading hugged the form while the band itself was looser than   */
/*    its neighbours. Bottom is 98.5 because the commitment columns   */
/*    carry a 14px bottom margin when stacked and the card border is  */
/*    the last visible edge: 98.5 + 14 = 112.5 optical.               */
/* ---------------------------------------------------------------- */
body#Multicares #contact {
  padding-top: 112.5px;
  padding-bottom: 98.5px;
}
body#Multicares #contact > .container > h2 {
  margin-bottom: 75px;
}

/* ---------------------------------------------------------------- */

/* ---------------------------------------------------------------- */

/* ---------------------------------------------------------------- */

/* ---------------------------------------------------------------- */
/* 9. Footer                                                         */
/*    Restored to the live baseline (0d529a band, now 0054a5 since S548, */
/*    40px padding, 194px logo, copyright 0.8rem). Two changes only:   */
/*    the contact copy is set at the same 0.8rem as the copyright line, */
/*    and the three social chips now close the middle column instead of */
/*    the About column. The middle block is pinned to its measured      */
/*    height (236px) so the footer totals the same 316px, and the     */
/*    chips are pushed to its bottom edge by the auto margin.         */
/* ---------------------------------------------------------------- */
body#Multicares footer {
  margin-top: 0;   /* the template leaves an 80px gap above the footer */
}
/* SYGELIN lockup: the wordmark and the line under it are both set at the
   contact-copy size (0.8rem); "A Multicares Brand" sits one step
   lower at 0.6rem, which is what the middle line used to be. */
body#Multicares footer .mtc-bm-name {
  margin: 0;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
  color:var(--on-dark);
}
body#Multicares footer .mtc-bm-name sup {
  position: relative;
  top: -.62em;
  font-size: .52em;
}
body#Multicares footer .mtc-bm-line {
  margin: 4px 0 0;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.35;
  color:var(--on-dark);
}
body#Multicares footer .mtc-bm-sub {
  margin: 3px 0 0;
  font-size: .6rem;
  font-weight: 400;
  line-height: 1.35;
  color:var(--on-dark-muted);
}
/* chips: the S367 styling - translucent white squares, not solid green */
body#Multicares footer .mtc-f-mid-soc {
  gap: 10px;
}
body#Multicares footer .mtc-soc {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color:var(--on-dark);
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
body#Multicares footer .mtc-soc:hover,
body#Multicares footer .mtc-soc:focus-visible {
  background: #fff;
  border-color: #fff;
  color:var(--brand);
}
@media (prefers-reduced-motion: reduce) {
  body#Multicares footer .mtc-soc {
    transition: none;
  }
}
body#Multicares footer .mtc-f-mid-soc {
  margin-top: 16px;
}
@media (min-width: 768px) {
  body#Multicares footer .mtc-f-mid {
    display: flex;
    min-height: 236px;   /* baseline height of this column */
  }
  body#Multicares footer .mtc-f-mid-in {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  body#Multicares footer .mtc-f-mid-soc {
    margin-top: auto;    /* chips sit on the bottom edge */
  }
}
/* 768-991: the baseline contact block wraps onto more lines, so its column
   measured 264px there; keep the rebuild on the same height. */
@media (min-width: 768px) and (max-width: 991.98px) {
  body#Multicares footer .mtc-f-mid {
    min-height: 264px;
  }
}
