/* ------------ BOTONES ------------ */
.btn-primario,
.btn-secundario,
.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 200px !important;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;

  &:focus-visible {
    outline: 2px solid var(--blanco);
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

.btn-primario {
  min-height: 52px;
  padding: 12px 24px;
  font-weight: 500;
  color: var(--c-blanco);
  border: 0;
  background-color: var(--c-rojo);
  background-image: linear-gradient(132deg, var(--c-rojo) 0%, var(--c-rojo-oscuro) 100%);

  &::after {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.33 8h9.34M8.67 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.33 8h9.34M8.67 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s ease;
  }

  &:hover,
  &:focus-visible {
    color: var(--blanco);
    transform: translateY(-2px);
    box-shadow: 0 0 20px 0 rgba(226, 47, 41, .2);

    &::after {
      transform: translateX(3px);
    }
  }

  /* Variante compacta (CTA "Contactar ahora", "Ver más noticias") */
  &.btn-sm {
    min-height: 48px;
    padding: 12px 22px 12px 24px;
  }

  @media (prefers-reduced-motion: reduce) {
    &::after {
      transition: none;
    }

    &:hover,
    &:focus-visible {
      transform: none;
    }

    &:hover::after,
    &:focus-visible::after {
      transform: none;
    }
  }

  @media (max-width: 767px) {
    min-height: 48px;
    padding-inline: 22px;
  }
}

.btn-secundario {
  min-height: 52px;
  padding: 12px 24px;
  font-weight: 400;
  color: var(--c-blanco);
  background-color: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .2);

  &:hover,
  &:focus-visible {
    color: var(--c-blanco);
    background-color: rgba(255, 255, 255, .12) !important;
    border-color: rgba(255, 255, 255, .4);
    transform: translateY(-2px);
    box-shadow: 0 0 20px 0 rgba(255, 255, 255, .2);
  }

  @media (max-width: 767px) {
    min-height: 48px;
    padding-inline: 22px;
  }
}

.btn-header {
  min-height: 41px;
  padding: 12px 36px 12px 24px;
  font-weight: 400;
  color: var(--c-blanco);
  background-color: rgba(255, 255, 255, .1) !important;
  border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);

  &::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background-color: var(--c-rojo);
  }

  &:hover,
  &:focus-visible {
    color: var(--c-blanco);
    background-color: rgba(255, 255, 255, .18) !important;
  }
}

.btn-compra {
  button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    line-height: 20px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 200px !important;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
    min-height: 52px;
    padding: 12px 24px;
    font-weight: 500;
    color: var(--c-blanco);
    border: 0;
    background-color: var(--c-rojo) !important;
    background-image: linear-gradient(132deg, var(--c-rojo) 0%, var(--c-rojo-oscuro) 100%) !important;

    &:hover,
    &:focus-visible {
      color: var(--blanco);
      transform: translateY(-2px);
      box-shadow: 0 0 20px 0 rgba(226, 47, 41, .2);
    }
  }
}