/* ==================================================
   Portada: franja de valores
   ================================================== */

/* Hover decorativo, no interactivo: la tarjeta no se eleva, no proyecta sombra ni cambia de color
   (esas señales la harían parecer un botón). Solo cruza un destello de luz y el icono se mueve. */
.rh-value {
  position: relative;
  overflow: hidden;
  cursor: default;
}
/* Destello diagonal que atraviesa la tarjeta */
.rh-value::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.rh-value > * { position: relative; z-index: 1; }
.rh-value-icon {
  display: inline-block;
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes rh-shine {
  0%   { left: -60%; opacity: 0; }
  15%  { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

@media (hover: hover) {
  .rh-value:hover::before { animation: rh-shine .9s ease-out; }
  .rh-value:hover .rh-value-icon { transform: translateY(-3px) rotate(-8deg); }
}

/* ==================================================
   Portada: frases de compromiso (carrusel sobre imagen)
   ================================================== */

.rh-promise {
  font-size: clamp(20px, 2.2vw + 10px, 36px);
  line-height: 1.3;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
@media (max-width: 575.98px) {
  .rh-promise { font-size: 21px; line-height: 1.4; }
}

/* ==================================================
   Portada: carrusel "Últimos proyectos"
   ================================================== */

/* Escritorio: exactamente 3 tarjetas dentro del contenedor. En móvil la siguiente asoma gracias a stagePadding. */
.rh-projects .owl-stage-outer { overflow: hidden; }

/* Tarjeta */
.rh-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--brand-navy);
  isolation: isolate;
  transform: translateZ(0);
}
.rh-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.rh-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--brand-navy-rgb), .92) 0%, rgba(var(--brand-navy-rgb), .35) 38%, rgba(var(--brand-navy-rgb), 0) 62%);
  z-index: 1;
  transition: opacity .4s ease;
}
.rh-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px 84px 24px 24px;
  white-space: normal;
}
.rh-card-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 30px;
  background: var(--brand-gold);
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rh-card-title {
  color: #ffffff;
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}
.rh-card-go {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .3s ease, color .3s ease, transform .3s ease, border-color .3s ease;
}
.rh-card-go i { transform: rotate(-45deg); transition: transform .3s ease; }

@media (hover: hover) {
  .rh-card:hover img { transform: scale(1.06); }
  .rh-card:hover .rh-card-go {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-navy);
  }
  .rh-card:hover .rh-card-go i { transform: rotate(0); }
}
.rh-card:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 3px;
}

/* Flechas (escritorio) */
.rh-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(var(--brand-navy-rgb), .2);
  background: transparent;
  color: var(--brand-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.rh-arrow:hover,
.rh-arrow:focus-visible {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #ffffff;
}

/* Enlace "Ver todos" */
.rh-link {
  color: var(--brand-navy);
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid var(--brand-gold);
  padding-bottom: 2px;
  margin-right: 8px;
  transition: color .3s ease;
}
.rh-link:hover { color: var(--brand-gold-text); }

/* Contador + barra de progreso */
.rh-counter {
  font-size: 14px;
  color: var(--brand-gray);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rh-counter strong { color: var(--brand-navy); font-weight: 700; }
.rh-progress {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(var(--brand-navy-rgb), .12);
  border-radius: 2px;
  overflow: hidden;
}
.rh-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--brand-gold);
  transition: width .5s cubic-bezier(.2, .7, .2, 1);
}

/* Móvil: la tarjeta siguiente asoma para invitar a deslizar */
@media (max-width: 767.98px) {
  .rh-projects-track { padding-left: 0; padding-right: 0; }
  .rh-card { border-radius: 16px; }
  .rh-card-overlay { padding: 20px 72px 20px 20px; }
  .rh-card-title { font-size: 19px; }
  .rh-card-go { right: 18px; bottom: 18px; width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .rh-value,
  .rh-value::before,
  .rh-value-icon,
  .rh-card img,
  .rh-card-go,
  .rh-card-go i,
  .rh-progress span { transition: none; }
  .rh-value:hover::before { animation: none; }
}
