/* ─── PILARES (SOLUÇÕES) ─── */
.pilares-section {
  width: 100%;
  padding: 80px 0;
  background: #f5f5f5;
  /* Light grey section background, showing through the notch */
  position: relative;
  overflow: visible;
  /* Borda esquerda do .pilares-card, usada para posicionar os corners do notch */
  --pilares-left-edge: calc((100% - min(calc(100% - 48px), var(--container-max))) / 2);
}

.pilares-card {
  position: relative;
  background: #1c2545;
  /* Dark blue section background */
  width: min(calc(100% - 48px), var(--container-max));
  margin: 0 auto;
  padding: 80px 80px;
  border-radius: 76px;
  corner-shape: squircle;
  overflow: visible;
  /* Bottom-left notch clip path on desktop */
  clip-path: polygon(0 0,
      100% 0,
      100% 100%,
      518px 100%,
      518px calc(100% - 185px),
      0 calc(100% - 185px));
}

.pilares-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 80px;
  align-items: flex-start;
}

/* Left column styling */
.pilares-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 20px;
  max-width: 538px;
}

.pilares-eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 62px;
  min-height: 47px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 27px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  width: fit-content;
}

.pilares-title {
  color: #fff;
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: clamp(28px, 2.8vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.pilares-desc {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  max-width: 480px;
}

/* Right column styling */
.pilares-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 633px;
  width: 100%;
}

.pilar-card {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  min-height: 192px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.pilar-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.pilar-card__thumb {
  width: 129px;
  min-height: 192px;
  background: linear-gradient(135deg, #ecdec3 0%, #c5a880 100%);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pilar-card__thumb picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.pilar-thumb-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.pilar-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px 32px;
  flex: 1;
  min-width: 0;
}

.pilar-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pilar-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #ecdec3;
  flex-shrink: 0;
}

.pilar-card__icon svg {
  width: 20px;
  height: 20px;
}

.pilar-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pilar-card__head h3 {
  color: #fff;
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.pilar-card__body p {
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

.pilar-card__link {
  display: inline-flex;
  align-items: center;
  color: #b49b78;
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  margin-top: 4px;
  width: fit-content;
}

.pilar-card__link:hover {
  color: #ecdec3;
  opacity: 0.85;
}

/* Floor compliance card positioned inside the bottom-left notch */
.pilares-floor {
  position: absolute;
  bottom: 110px;
  left: calc((100vw - min(calc(100% - 48px), var(--container-max))) / 2);
  width: 518px;
  height: 125px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 40px 0 24px;
  pointer-events: auto;
  z-index: 5;
}

.pilares-floor__circle {
  width: 119px;
  height: 115px;
  flex-shrink: 0;
  position: relative;
}

.pilares-floor__circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pilares-floor__text {
  color: #3a3a3a;
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  flex: 1;
}

/* ─── NOTCH TRANSITION CORNERS ─── */
/*
 * Os corners são filhos da .pilares-section (position: relative).
 * O card ocupa: left = (100vw - cardWidth) / 2, dentro da section = margem horizontal do card.
 * O clip-path do card recorta o canto inferior-esquerdo:
 *   vértices do recorte (relativos ao card):
 *     C1: (518px, cardBottom)      → quina externa inferior-direita do recorte
 *     C2: (518px, cardBottom-185px) → quina interna do recorte
 *     C3: (0,     cardBottom-185px) → quina externa superior-esquerda do recorte
 * O card tem padding-bottom da section = 80px → cardBottom = bottom: 80px da section.
 * leftCard = calc((100% - min(calc(100% - 48px), var(--container-max))) / 2)
 *          = 24px quando card usa calc(100%-48px), ou maior quando atinge o max.
 */

.pilares-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  background-color: #1c2545;
  -webkit-mask: url("../../images/global-384-corner-bottom-left.svg") center / contain no-repeat;
  mask: url("../../images/global-384-corner-bottom-left.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 10;
  margin: 0 !important;
  padding: 0 !important;
}

/*
 * C1 — quina externa inferior-direita do recorte:
 * Preenche o ângulo entre a borda inferior do card e a borda vertical do recorte.
 * Posição: left = leftEdge + 518px - 32px; bottom = 80px (rodapé da section = rodapé do card)
 * Rotação: 180° (corner aponta para dentro do card, à direita)
 */
.pilares-corner--1 {
  left: calc(var(--pilares-left-edge) + 547px - 30px);
  bottom: 80px;
  transform: rotate(-90deg);
  background-color: #f5f5f5;
}

/*
 * C2 — quina interna do recorte (côncava):
 * Preenche o ângulo no vértice interno do recorte.
 * Posição: left = leftEdge + 518px; bottom = 80px + 185px - 32px = 233px
 * Rotação: 90° (corner aponta para o interior do recorte)
 */
.pilares-corner--2 {
  left: calc(var(--pilares-left-edge) + 486px);
  bottom: calc(80px + 185px - 31px);
  transform: rotate(90deg);
}

/*
 * C3 — quina externa superior-esquerda do recorte:
 * Preenche o ângulo entre a borda esquerda da section e a borda horizontal do recorte.
 * Posição: left = leftEdge - 32px; bottom = 80px + 185px - 32px = 233px
 * Rotação: 0° (corner aponta para cima-direita, padrão)
 */
.pilares-corner--3 {
  left: calc(var(--pilares-left-edge) - 0px);
  bottom: calc(80px + 184px - 0px);
  transform: rotate(-90deg);
  background: #f5f5f5;
}

/* ─── RESPONSIVENESS ─── */
@media (max-width: 1180px) {
  .pilares-section {
    padding: 64px 0;
  }

  .pilares-card {
    padding: 56px 40px;
    min-height: auto;
    clip-path: none;
    /* Disable notch clip-path */
    border-radius: 32px;
    width: min(calc(100% - 32px), var(--container-max));
  }

  .pilares-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .pilares-left {
    max-width: 100%;
    padding-top: 0;
  }

  .pilares-right {
    max-width: 100%;
  }

  /* Disable absolutely positioned floor inside cutout and display as block below grid */
  .pilares-floor {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    margin-top: 48px;
    padding: 32px 24px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  }

  .pilares-corner {
    display: none;
  }
}

@media (max-width: 680px) {
  .pilares-card {
    padding: 40px 24px;
  }

  .pilar-card {
    flex-direction: column;
  }

  .pilar-card__thumb {
    width: 100%;
    height: 120px;
    min-height: 120px;
  }

  .pilar-card__body {
    padding: 24px;
  }

  .pilares-floor {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    background: none;
    box-shadow: none;
  }
}