/* ==========================================================================
   PIE Builders & Developers — Awards & Recognition section
   Centred editorial header above two horizontal recognition cards
   (visual left, text right), on a warm background with faint architectural
   line art and an oversized vertical watermark.

   Elementor widget copy of html/css/awards.css. Every selector is prefixed
   with the widget root .buildero-awards (the <section>), so Elementor Site
   Settings (h2/h3/p typography) cannot restyle it and these rules never
   reach other widgets. Additions for the widget are at the end.
   ========================================================================== */

.buildero-awards {
  /* Colour tokens */
  --pie-gold: #D99A00;
  --pie-deep-gold: #A96C08;
  --pie-brown: #3F2916;
  --pie-charcoal: #17191C;
  --pie-body: #626873;
  --pie-background: #FBFAF7;
  --pie-cream: #F5EFE3;
  --pie-white: #FFFFFF;
  --pie-border: #E8E3DB;
  --pie-eyebrow: #5B6472;           /* muted grey-blue, as in the reference */

  /* Typography */
  --pie-awards-font-display: "Playfair Display", "DM Serif Display", Georgia, "Times New Roman", serif;
  --pie-awards-font-body: "Manrope", "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Layout */
  --pie-awards-max: 1450px;
  --pie-awards-gutter: clamp(18px, 4.5vw, 72px);
  --pie-awards-pad-block: clamp(64px, 6.5vw, 104px);
  --pie-awards-radius: 14px;

  /* Motion */
  --pie-awards-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --pie-awards-dur: 0.45s;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--pie-awards-pad-block);
  background:
    radial-gradient(ellipse 60% 55% at 12% 40%, rgba(245, 239, 227, 0.9), transparent 70%),
    var(--pie-background);
  color: var(--pie-body);
  font-family: var(--pie-awards-font-body);
  -webkit-font-smoothing: antialiased;
}

.buildero-awards *,
.buildero-awards *::before,
.buildero-awards *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Background decorations (purely visual, never interactive)
   -------------------------------------------------------------------------- */
.buildero-awards .pie-awards__background {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

.buildero-awards .pie-awards__lineart {
  position: absolute;
  top: 50%;
  left: clamp(-120px, -4vw, -24px);
  width: clamp(320px, 31vw, 560px);
  height: auto;
  opacity: 0.09;
  transform: translateY(-50%);
}

.buildero-awards .pie-awards__watermark {
  position: absolute;
  top: 50%;
  right: clamp(-48px, -1.6vw, -16px);
  color: var(--pie-brown);
  font-family: var(--pie-awards-font-display);
  font-size: clamp(120px, 12vw, 210px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.04;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.buildero-awards .pie-awards__container {
  position: relative;
  width: 100%;
  max-width: calc(var(--pie-awards-max) + 2 * var(--pie-awards-gutter));
  margin-inline: auto;
  padding-inline: var(--pie-awards-gutter);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.buildero-awards .pie-awards__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto clamp(40px, 4.2vw, 60px);
  text-align: center;
}

.buildero-awards .pie-awards__header-line {
  display: block;
  width: 66px;
  height: 3px;
  margin-bottom: 26px;
  background: var(--pie-gold);
  border-radius: 2px;
}

.buildero-awards .pie-awards__eyebrow {
  margin: 0 0 clamp(14px, 1.4vw, 20px);
  color: var(--pie-eyebrow);
  font-size: clamp(13px, 0.4rem + 0.5vw, 15px);
  font-weight: 500;
  letter-spacing: 0.3em;
  line-height: 1.4;
  /* letter-spacing adds trailing space; offset it so the label stays centred */
  padding-left: 0.3em;
  text-transform: uppercase;
}

.buildero-awards .pie-awards__title {
  margin: 0;
  color: var(--pie-charcoal);
  font-family: var(--pie-awards-font-display);
  /* font-size: clamp(2.25rem, 1.1rem + 3.6vw, 4.25rem); */
  font-size: clamp(2.25rem, 1.1rem + 3.6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-wrap: balance;
}

.buildero-awards .pie-awards__title-line {
  display: block;
}

.buildero-awards .pie-awards__title-accent {
  color: var(--pie-deep-gold);
  background: linear-gradient(180deg, #C38E1C 0%, var(--pie-deep-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.buildero-awards .pie-awards__intro {
  max-width: 650px;
  margin: clamp(14px, 1.4vw, 18px) 0 0;
  color: var(--pie-body);
  font-size: clamp(16px, 0.75rem + 0.55vw, 20px);
  line-height: 1.45;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Recognition cards
   -------------------------------------------------------------------------- */
.buildero-awards .pie-awards__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.buildero-awards .pie-awards__card {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  min-width: 0;
  min-height: 370px;
  overflow: hidden;
  background: var(--pie-white);
  border: 1px solid rgba(63, 41, 22, 0.06);
  border-radius: var(--pie-awards-radius);
  box-shadow: 0 8px 28px rgba(35, 28, 18, 0.04);
  transition:
    transform var(--pie-awards-dur) var(--pie-awards-ease),
    box-shadow var(--pie-awards-dur) var(--pie-awards-ease);
}

.buildero-awards .pie-awards__visual {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--pie-cream);
}

.buildero-awards .pie-awards__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transition: transform 0.8s var(--pie-awards-ease);
}

.buildero-awards .pie-awards__visual--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 2.6vw, 44px);
  background: linear-gradient(160deg, #F7F2E8 0%, var(--pie-cream) 100%);
}

.buildero-awards .pie-awards__logo {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.buildero-awards .pie-awards__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(28px, 2.6vw, 42px) clamp(26px, 2.6vw, 42px);
}

.buildero-awards .pie-awards__accent-line {
  display: block;
  flex: 0 0 auto;
  width: 58px;
  height: 2px;
  margin-bottom: clamp(18px, 1.8vw, 26px);
  background: var(--pie-deep-gold);
}

.buildero-awards .pie-awards__card-title {
  margin: 0 0 clamp(14px, 1.3vw, 20px);
  color: var(--pie-charcoal);
  font-family: var(--pie-awards-font-display);
  font-size: clamp(22px, 0.8rem + 1vw, 29px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.buildero-awards .pie-awards__description {
  margin: 0;
  color: var(--pie-body);
  font-size: clamp(15px, 0.65rem + 0.45vw, 18px);
  line-height: 1.55;
  text-wrap: pretty;
}

/* Hover — desktop pointers only, deliberately restrained */
@media (hover: hover) and (pointer: fine) {
  .buildero-awards .pie-awards__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(35, 28, 18, 0.07);
  }

  .buildero-awards .pie-awards__card:hover .pie-awards__image {
    transform: scale(1.03);
  }
}

/* --------------------------------------------------------------------------
   Entrance-animation guard
   Hidden only while JS is running (html.pie-js) until awards.js marks the
   section as set up. The failsafe reveals content if the script never runs.
   -------------------------------------------------------------------------- */
.pie-js .buildero-awards:not(.is-animated) [data-pie-awards-reveal] {
  opacity: 0;
  animation: pie-awards-failsafe 0.4s ease 2.5s forwards;
}

@keyframes pie-awards-failsafe {
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Laptops: give the text column a little more room */
@media (max-width: 1439.98px) {
  .buildero-awards .pie-awards__card {
    grid-template-columns: 37% minmax(0, 1fr);
  }
}

/* iPad landscape: two cards side by side, tighter */
@media (max-width: 1199.98px) {
  .buildero-awards .pie-awards__grid {
    gap: 20px;
  }

  .buildero-awards .pie-awards__card {
    grid-template-columns: 35% minmax(0, 1fr);
    min-height: 340px;
  }

  .buildero-awards .pie-awards__content {
    padding: 28px 26px;
  }

  .buildero-awards .pie-awards__card-title {
    font-size: 22px;
  }

  .buildero-awards .pie-awards__description {
    font-size: 15px;
  }

  .buildero-awards .pie-awards__visual--logo {
    padding: 16px;
  }
}

/* iPad portrait: stack the cards, keep each one horizontal */
@media (max-width: 1023.98px) {
  .buildero-awards .pie-awards__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
    margin-inline: auto;
  }

  .buildero-awards .pie-awards__card {
    grid-template-columns: 36% minmax(0, 1fr);
    min-height: 300px;
  }

  .buildero-awards .pie-awards__content {
    padding: 32px 36px;
  }

  .buildero-awards .pie-awards__card-title {
    font-size: 25px;
  }

  .buildero-awards .pie-awards__description {
    font-size: 16px;
  }

  .buildero-awards .pie-awards__visual--logo {
    padding: 30px;
  }

  .buildero-awards .pie-awards__logo {
    max-width: 210px;
  }

  .buildero-awards .pie-awards__lineart {
    opacity: 0.06;
  }

  .buildero-awards .pie-awards__watermark {
    opacity: 0.035;
  }
}

/* Mobile landscape: still horizontal, more compact */
@media (max-width: 767.98px) {
  .buildero-awards .pie-awards__card {
    grid-template-columns: 38% minmax(0, 1fr);
    min-height: 260px;
  }

  .buildero-awards .pie-awards__content {
    padding: 26px 24px;
  }

  .buildero-awards .pie-awards__card-title {
    font-size: 22px;
  }

  .buildero-awards .pie-awards__description {
    font-size: 15px;
  }

  .buildero-awards .pie-awards__visual--logo {
    padding: 22px;
  }

  .buildero-awards .pie-awards__watermark {
    display: none;
  }

  .buildero-awards .pie-awards__lineart {
    top: auto;
    bottom: 0;
    width: 300px;
    opacity: 0.05;
    transform: none;
  }
}

/* Mobile portrait: visual above text */
@media (max-width: 575.98px) {
  .buildero-awards .pie-awards__header-line {
    width: 56px;
    margin-bottom: 20px;
  }

  .buildero-awards .pie-awards__eyebrow {
    letter-spacing: 0.22em;
    padding-left: 0.22em;
  }

  .buildero-awards .pie-awards__title {
    font-size: clamp(2.125rem, 1.2rem + 4.2vw, 2.6rem);
    line-height: 1.1;
  }

  .buildero-awards .pie-awards__grid {
    gap: 18px;
  }

  .buildero-awards .pie-awards__card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .buildero-awards .pie-awards__visual {
    min-height: 0;
    height: 240px;
  }

  .buildero-awards .pie-awards__visual--logo {
    height: 210px;
    padding: 24px;
  }

  .buildero-awards .pie-awards__logo {
    width: auto;
    height: 100%;
    max-width: 100%;
  }

  .buildero-awards .pie-awards__content {
    padding: 24px 20px 28px;
  }

  .buildero-awards .pie-awards__card-title {
    font-size: clamp(23px, 1rem + 1.6vw, 26px);
  }

  .buildero-awards .pie-awards__lineart {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .buildero-awards *,
  .buildero-awards *::before,
  .buildero-awards *::after {
    transition-duration: 0.01ms !important;
  }

  .buildero-awards .pie-awards__card:hover,
  .buildero-awards .pie-awards__card:hover .pie-awards__image {
    transform: none;
  }

  .pie-js .buildero-awards:not(.is-animated) [data-pie-awards-reveal] {
    opacity: 1;
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Buildero Theme additions (Elementor widget)
   -------------------------------------------------------------------------- */

/* A recognition whose image was removed: the text spans the whole card. */
.buildero-awards .pie-awards__card--no-visual {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

/* Kit or theme image styles (radius, border, shadow) must not reach the cards. */
.buildero-awards .pie-awards__image,
.buildero-awards .pie-awards__logo,
.buildero-awards .pie-awards__lineart {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
