body.kayem-site {
  overflow-x: hidden;
}

.kayem-contact-page {
  --kayem-blue: #002d74;
  --kayem-light-blue: #457ec6;
  --kayem-gold: #b28a64;
  --kayem-red: #df3a15;
  --kayem-cream: #fefbf7;
  --kayem-soft: #efede8;
  --kayem-white: #ffffff;
  color: var(--kayem-blue);
  background: var(--kayem-cream);
  font-family: "Lora", Georgia, serif;
  overflow: hidden;
}

.kayem-contact-page *,
.kayem-contact-page *::before,
.kayem-contact-page *::after {
  box-sizing: border-box;
}

.kayem-contact-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.kayem-contact-page h1,
.kayem-contact-page h2,
.kayem-contact-page h3,
.kayem-contact-page p {
  margin-top: 0;
}

.kayem-contact-page h1,
.kayem-contact-page h2 {
  letter-spacing: 0;
}

.kayem-contact-page h1 {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--kayem-white);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
}

.kayem-contact-page h2 {
  margin-bottom: 24px;
  color: var(--kayem-blue);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.08;
}

.kayem-contact-page p {
  font-size: 16px;
  line-height: 1.65;
}

.kayem-contact-eyebrow {
  margin-bottom: 16px;
  color: var(--kayem-gold);
  font-family: refrigerator-deluxe, "Oswald", sans-serif;
  font-size: 18px !important;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.2 !important;
  text-transform: uppercase;
}

.kayem-contact-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 2px solid var(--kayem-blue);
  border-radius: 999px;
  background: var(--kayem-blue);
  color: var(--kayem-white) !important;
  font-family: refrigerator-deluxe, "Oswald", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.kayem-contact-button:hover,
.kayem-contact-button:focus-visible {
  border-color: var(--kayem-light-blue);
  background: var(--kayem-light-blue);
  color: var(--kayem-white) !important;
  transform: translateY(-2px);
}

.kayem-contact-button--light {
  border-color: var(--kayem-white);
  background: var(--kayem-white);
  color: var(--kayem-blue) !important;
}

.kayem-contact-button--light:hover,
.kayem-contact-button--light:focus-visible {
  border-color: var(--kayem-white);
  background: transparent;
  color: var(--kayem-white) !important;
}

.kayem-contact-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.kayem-contact-hero__image,
.kayem-contact-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kayem-contact-page .kayem-contact-hero__image {
  z-index: 0;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}

.kayem-contact-hero__overlay {
  z-index: 1;
  background: rgba(0, 45, 116, 0.58);
}

.kayem-contact-hero__content {
  position: relative;
  z-index: 2;
  padding-top: 104px;
  padding-bottom: 104px;
}

.kayem-contact-hero__content > p:not(.kayem-contact-eyebrow) {
  max-width: 660px;
  margin-bottom: 32px;
  color: var(--kayem-white);
  font-size: 18px;
}

.kayem-contact-intro {
  padding: 100px 0;
  background: var(--kayem-soft);
}

.kayem-contact-intro__inner {
  max-width: 920px;
  text-align: center;
}

.kayem-contact-intro__inner > p:last-child {
  max-width: 820px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
}

.kayem-contact-form-section {
  padding: 100px 0;
  background: var(--kayem-white);
  scroll-margin-top: 100px;
}

.kayem-contact-form-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1.36fr);
  gap: 88px;
  align-items: start;
}

.kayem-contact-form-intro {
  position: sticky;
  top: 48px;
}

.kayem-contact-form-intro h2 {
  font-size: 36px;
}

.kayem-contact-form-intro__rule {
  width: 72px;
  height: 3px;
  margin: 32px 0;
  background: var(--kayem-red);
}

.kayem-contact-form-intro__aside {
  margin-bottom: 4px;
  color: var(--kayem-gold);
  font-family: refrigerator-deluxe, "Oswald", sans-serif;
  font-size: 16px !important;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.kayem-contact-phone-link {
  color: var(--kayem-blue) !important;
  font-size: 27px;
  font-weight: 600;
  text-decoration: none !important;
}

.kayem-contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 24px;
}

.kayem-contact-field {
  min-width: 0;
}

.kayem-contact-field--wide {
  grid-column: 1 / -1;
}

.kayem-contact-field label {
  display: block;
  margin-bottom: 9px;
  color: var(--kayem-blue);
  font-family: refrigerator-deluxe, "Oswald", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.25;
  text-transform: uppercase;
}

.kayem-contact-field input,
.kayem-contact-field select,
.kayem-contact-field textarea {
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  border: 1px solid #b9c3d0;
  border-radius: 3px;
  background: #fff;
  color: #12356f;
  font: 16px/1.45 "Lora", Georgia, serif;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.kayem-contact-field textarea {
  min-height: 168px;
  resize: vertical;
}

.kayem-contact-field input:focus,
.kayem-contact-field select:focus,
.kayem-contact-field textarea:focus {
  border-color: var(--kayem-light-blue);
  box-shadow: 0 0 0 3px rgba(69, 126, 198, 0.18);
  outline: 0;
}

.kayem-contact-field textarea::placeholder {
  color: #68758a;
  opacity: 1;
}

.kayem-contact-submit-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.kayem-contact-submit-row p {
  max-width: 440px;
  margin-bottom: 0;
  color: #596b83;
  font-size: 13px;
  line-height: 1.5;
}

.kayem-contact-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

.kayem-contact-notice {
  margin-bottom: 28px;
  padding: 16px 18px;
  border-left: 4px solid var(--kayem-light-blue);
  background: #edf4fc;
  color: var(--kayem-blue);
  font-size: 16px;
  line-height: 1.55;
}

.kayem-contact-notice--error {
  border-left-color: var(--kayem-red);
  background: #fff0ec;
}

.kayem-contact-call {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 560px;
  background: var(--kayem-light-blue);
}

.kayem-contact-call__media,
.kayem-contact-call__media img {
  width: 100%;
  height: 100%;
}

.kayem-contact-call__media img {
  display: block;
  object-fit: cover;
  object-position: center;
}

.kayem-contact-call__content {
  align-self: center;
  max-width: 610px;
  padding: 80px 72px;
  color: var(--kayem-white);
}

.kayem-contact-call__content h2,
.kayem-contact-call__content .kayem-contact-eyebrow {
  color: var(--kayem-white);
}

.kayem-contact-call__content > p:not(.kayem-contact-eyebrow):not(.kayem-contact-call__number) {
  margin-bottom: 28px;
}

.kayem-contact-call__number {
  margin: 18px 0 0;
  font-size: 20px !important;
  font-weight: 600;
}

.kayem-contact-products {
  padding: 100px 0;
  background: var(--kayem-soft);
}

.kayem-contact-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 72px;
  align-items: end;
  margin-bottom: 48px;
}

.kayem-contact-section-heading h2,
.kayem-contact-section-heading > p {
  margin-bottom: 0;
}

.kayem-contact-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.kayem-contact-product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--kayem-white);
  box-shadow: 0 8px 24px rgba(0, 45, 116, 0.08);
  color: var(--kayem-blue) !important;
  text-decoration: none !important;
}

.kayem-contact-product-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.kayem-contact-product-card span {
  display: block;
  padding: 22px 64px 24px 22px;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.15;
}

.kayem-contact-product-card strong {
  position: absolute;
  right: 22px;
  bottom: 22px;
  color: var(--kayem-red);
  font-size: 26px;
  line-height: 1;
}

.kayem-contact-product-card:hover img,
.kayem-contact-product-card:focus-visible img {
  transform: scale(1.04);
}

.kayem-contact-products__cta {
  margin-top: 42px;
  text-align: center;
}

.kayem-contact-about {
  padding: 100px 0;
  background: var(--kayem-cream);
}

.kayem-contact-about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 80px;
  align-items: center;
}

.kayem-contact-about__media {
  transform: rotate(-1.5deg);
}

.kayem-contact-about__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 14px solid var(--kayem-white);
  box-shadow: 0 10px 28px rgba(0, 45, 116, 0.14);
}

.kayem-contact-about__content > p:not(.kayem-contact-eyebrow) {
  margin-bottom: 30px;
}

.kayem-contact-location {
  padding: 100px 0;
  background: var(--kayem-white);
}

.kayem-contact-location__inner {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 72px;
  align-items: stretch;
}

.kayem-contact-location__content {
  padding: 26px 0;
}

.kayem-contact-location address {
  margin: 4px 0 30px;
  color: var(--kayem-blue);
  font-size: 19px;
  font-style: normal;
  line-height: 1.65;
}

.kayem-contact-location dl,
.kayem-contact-location dl div {
  margin: 0;
}

.kayem-contact-location dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin-bottom: 9px;
}

.kayem-contact-location dt {
  color: var(--kayem-gold);
  font-family: refrigerator-deluxe, "Oswald", sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.kayem-contact-location dd {
  margin: 0;
}

.kayem-contact-location dd a {
  color: var(--kayem-blue) !important;
  font-weight: 600;
  text-decoration: none !important;
}

.kayem-contact-location__map {
  min-height: 460px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--kayem-soft);
}

.kayem-contact-location__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
}

@media (max-width: 1024px) {
  .kayem-contact-page h1 {
    font-size: 36px;
  }

  .kayem-contact-page h2 {
    font-size: 34px;
  }

  .kayem-contact-form-layout {
    grid-template-columns: 0.76fr 1.24fr;
    gap: 52px;
  }

  .kayem-contact-call {
    grid-template-columns: 1fr 1fr;
  }

  .kayem-contact-call__content {
    padding: 64px 44px;
  }

  .kayem-contact-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kayem-contact-about__inner,
  .kayem-contact-location__inner {
    gap: 48px;
  }
}

@media (max-width: 767px) {
  .kayem-contact-shell {
    width: calc(100% - 40px);
  }

  .kayem-contact-page h1 {
    font-size: 32px;
  }

  .kayem-contact-page h2,
  .kayem-contact-form-intro h2 {
    font-size: 28px;
  }

  .kayem-contact-page p {
    font-size: 16px;
  }

  .kayem-contact-hero {
    min-height: 560px;
  }

  .kayem-contact-hero__image {
    object-position: 58% center;
  }

  .kayem-contact-hero__overlay {
    background: rgba(0, 45, 116, 0.78);
  }

  .kayem-contact-hero__content {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .kayem-contact-hero__content > p:not(.kayem-contact-eyebrow) {
    font-size: 17px;
  }

  .kayem-contact-intro,
  .kayem-contact-form-section,
  .kayem-contact-products,
  .kayem-contact-about,
  .kayem-contact-location {
    padding: 56px 0;
  }

  .kayem-contact-form-layout,
  .kayem-contact-section-heading,
  .kayem-contact-about__inner,
  .kayem-contact-location__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .kayem-contact-form-intro {
    position: static;
  }

  .kayem-contact-form {
    grid-template-columns: 1fr;
  }

  .kayem-contact-field--wide {
    grid-column: auto;
  }

  .kayem-contact-submit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .kayem-contact-call {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .kayem-contact-call__media {
    min-height: 320px;
  }

  .kayem-contact-call__content {
    max-width: none;
    padding: 64px 24px 72px;
  }

  .kayem-contact-product-grid {
    grid-template-columns: 1fr;
  }

  .kayem-contact-product-card img {
    height: 240px;
  }

  .kayem-contact-about__media {
    transform: none;
  }

  .kayem-contact-about__media img {
    border-width: 9px;
  }

  .kayem-contact-location__map,
  .kayem-contact-location__map iframe {
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kayem-contact-button,
  .kayem-contact-product-card img {
    transition: none;
  }
}

@media (max-width: 767px) {
  body.tax-brand .elementor-element.elementor-element-220ada7 {
    align-items: stretch;
    background-color: #fefbf7;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-size: 100% auto !important;
    flex-direction: column;
    justify-content: flex-start;
    padding: 64vw 0 0;
  }

  body.tax-brand .elementor-element.elementor-element-220ada7::before {
    background: none;
    opacity: 0;
  }

  body.tax-brand .elementor-element.elementor-element-27b36c9 {
    background: #fefbf7;
    padding: 30px 24px 40px;
    width: 100%;
  }

  body.tax-brand .elementor-element.elementor-element-6840f2a {
    margin-bottom: 24px;
    max-width: 240px;
    width: 62%;
  }

  body.tax-brand .elementor-element.elementor-element-6840f2a img {
    display: block;
    height: auto;
    width: 100%;
  }

  body.tax-brand .elementor-element.elementor-element-62ab458 {
    left: 0;
    max-width: 100%;
    right: auto;
    width: 100%;
  }

  body.tax-brand .elementor-element.elementor-element-62ab458 img {
    height: auto;
    max-width: 100%;
    width: 100%;
  }

  body.page-id-118 .elementor-element.elementor-element-3959b0f,
  body.page-id-118 .elementor-element.elementor-element-c744e94,
  body.tax-industry .elementor-element.elementor-element-1eca8dd,
  body.tax-product-type .elementor-element.elementor-element-04d22eb {
    left: 0 !important;
    max-width: 100% !important;
    right: auto !important;
    width: 100% !important;
  }

  body.page-id-118 .elementor-element.elementor-element-3959b0f img,
  body.page-id-118 .elementor-element.elementor-element-c744e94 img,
  body.tax-industry .elementor-element.elementor-element-1eca8dd img,
  body.tax-product-type .elementor-element.elementor-element-04d22eb img {
    height: auto !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ── Layout consistency pass (2026-09-08) ────────────────────────────────── */
/* Coded blocks (contact page, product filter bar, brand directory) now share the
   Elementor content box: 1140px boxed container minus the 10px side padding = 1120px. */

@media (max-width: 767px) {
  /* Home "Explore Our Products": arrows overflowed the viewport beside a 56px heading. */
  .kayem-pc__heading-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
  }

  .kayem-pc__heading-row .kayem-pc__heading {
    order: -1;
    width: 100%;
  }

  /* Product-type hero: the second stacked photo kept its desktop -15% offset and was cut off. */
  body.tax-product-type .elementor-element.elementor-element-812ef75 {
    margin: 16px 0 0 !important;
  }

  /* Home "Our Family of Brands": 11 logos stacked full-width on phones; lay them out as rows. */
  body.kayem-homepage .elementor-element.elementor-element-18974ef,
  body.kayem-homepage .elementor-element.elementor-element-721b605 {
    --flex-direction: row;
    --flex-wrap: wrap;
    --justify-content: center;
    --align-items: center;
    width: 100%;
    gap: 20px 24px;
  }

  body.kayem-homepage .elementor-element.elementor-element-18974ef > .e-con {
    --width: 40% !important;
  }

  body.kayem-homepage .elementor-element.elementor-element-721b605 > .e-con {
    --width: 26% !important;
  }
}

/* ── Home hero carousel: hide arrows/dots while there is only one slide ─── */
.kayem-hero-carousel .elementor-image-carousel-wrapper:has(.swiper-slide:only-child) :is(.elementor-swiper-button, .swiper-pagination) {
  display: none;
}

.kayem-hero-carousel .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Stamp band on brand pages: collapse when the brand has no stamps ───── */
.kpn-stamp-band--auto:not(:has(.kp-stamps)) {
  display: none !important;
}

@media (max-width: 767px) {
  /* About page: the overlapping polaroid photos kept their desktop offsets and pushed the page wider than the phone. */
  body.page-id-1343 .elementor-element.elementor-element-693a5bc,
  body.page-id-1343 .elementor-element.elementor-element-846d7b2 {
    margin: 16px 0 0 !important;
    --e-transform-rotateZ: 0deg;
    transform: none !important;
  }

  body.page-id-1343 .elementor-element.elementor-element-ca999b2,
  body.page-id-1343 .elementor-element.elementor-element-83478c6,
  body.page-id-1343 .elementor-element.elementor-element-a3a72a4 {
    --width: 100%;
    flex-direction: column;
    --flex-direction: column;
  }

  body.page-id-1343 .elementor-element.elementor-element-ca999b2 > .elementor-widget,
  body.page-id-1343 .elementor-element.elementor-element-83478c6 > .elementor-widget {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  /* Industry hero: the kraft overlay is sized to 90% on desktop as an accent; on phones it left a bare strip down the right edge. */
  body.tax-industry .elementor-element.elementor-element-6a1de63::before {
    background-size: cover !important;
    background-position: center top !important;
  }
}

/* Mobile sweep 2026-09-08: "Get Inspired" plate image sits below the copy on phones
   instead of floating over it (absolute-positioned image on 297/303/238/118). */
@media (max-width: 767px) {
  .elementor-element-1eca8dd.elementor-absolute,
  .elementor-element-04d22eb.elementor-absolute,
  .elementor-element-62ab458.elementor-absolute,
  .elementor-element-3959b0f.elementor-absolute {
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 320px;
    margin: 28px auto 0 !important;
    align-self: center !important;
  }
}

/* Plain WordPress pages (legal pages, no Elementor): keep them inside the site's content box. */
body.page:not(.elementor-page) .site-main,
body.single-post:not(.elementor-page) .site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 20px 96px;
}
body.page:not(.elementor-page) .site-main .entry-title,
body.single-post:not(.elementor-page) .site-main .entry-title {
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 24px;
}
body.page:not(.elementor-page) .site-main h2 { font-size: 24px; margin: 32px 0 12px; }
body.page:not(.elementor-page) .site-main p,
body.page:not(.elementor-page) .site-main li { font-size: 16px; line-height: 1.6; max-width: 72ch; }
.kayem-legal-placeholder { padding: 16px 20px; border: 1px dashed #457EC6; border-radius: 8px; background: rgba(69,126,198,.06); }

/* Industry hero (template 297): single image capped at 500px; the image widget must not
   be forced square, or the tan hero band grows and leaves empty space above the stamps. */
body.tax-industry .elementor-element.elementor-element-e7ca4fd,
body.tax-industry .elementor-element.elementor-element-e7ca4fd > .elementor-widget-container {
  aspect-ratio: auto !important;
  height: auto !important;
  max-height: 500px;
}
body.tax-industry .elementor-element.elementor-element-e7ca4fd img {
  width: 100%;
  height: 500px;
  max-height: 500px;
  object-fit: cover;
  display: block;
}
@media (max-width: 1024px) { body.tax-industry .elementor-element.elementor-element-e7ca4fd img { height: 400px; } }
@media (max-width: 767px) { body.tax-industry .elementor-element.elementor-element-e7ca4fd img { height: 280px; } }
