/**
 * Rapident - Sección Aniversario
 */

.ra-aniv {
	--ra-primary: #088e8f;
	--ra-primary-dark: #036e72;
	--ra-primary-deep: #0b5c60;
	--ra-accent: #fa4b4f;
	--ra-ink: #0d4f56;
	--ra-muted: #646870;
	--ra-mint: #e4f7f7;
	--ra-mint-soft: #f1fdfe;
	--ra-green-light: #40e1ab; /* Verde claro de marca (tomado del logo Rapident). */
	--ra-border: #dceef0;
	--ra-radius: 18px;
	--ra-shadow: 0 6px 22px rgba(8, 92, 96, .08);

	box-sizing: border-box;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 16px 40px;
	color: var(--ra-ink);
	font-family: inherit;
}

.ra-aniv *,
.ra-aniv *::before,
.ra-aniv *::after {
	box-sizing: border-box;
}

.ra-aniv img {
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------- Hero --- */

.ra-hero {
	margin: 0 0 22px;
	border-radius: var(--ra-radius);
	overflow: hidden;
}

.ra-hero__link {
	display: block;
	text-decoration: none;
}

.ra-hero__picture,
.ra-hero__img {
	display: block;
	width: 100%;
}

.ra-hero__fallback {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 28px;
	min-height: 260px;
	padding: 26px 34px;
	background:
		radial-gradient(120% 140% at 12% 20%, #ffffff 0%, rgba(255, 255, 255, 0) 55%),
		linear-gradient(120deg, #cdf3f3 0%, #eafafa 45%, #f6feff 100%);
}

.ra-hero__years {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: .85;
	color: var(--ra-primary-dark);
}

.ra-hero__number {
	font-size: clamp(64px, 9vw, 116px);
	font-weight: 800;
	letter-spacing: -2px;
	text-shadow: 0 6px 18px rgba(3, 110, 114, .18);
}

.ra-hero__word {
	font-size: clamp(16px, 2vw, 26px);
	font-weight: 700;
	letter-spacing: 6px;
}

.ra-hero__claim {
	display: flex;
	flex-direction: column;
	line-height: 1.02;
	color: var(--ra-primary-deep);
}

.ra-hero__claim-top {
	font-size: clamp(26px, 3.4vw, 44px);
	font-weight: 700;
	font-style: italic;
	color: var(--ra-primary);
}

.ra-hero__claim-main {
	font-size: clamp(22px, 2.8vw, 38px);
	font-weight: 700;
}

.ra-hero__perks-title {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.25;
	color: var(--ra-ink);
}

.ra-hero__perks-title strong {
	display: block;
	font-size: 19px;
	color: var(--ra-primary-deep);
}

.ra-hero__perks-list {
	display: flex;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ra-hero__perk {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 86px;
	text-align: center;
}

.ra-hero__perk-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--ra-primary);
	box-shadow: 0 4px 12px rgba(8, 92, 96, .12);
}

.ra-hero__perk-icon svg {
	width: 24px;
	height: 24px;
}

.ra-hero__perk-text {
	font-size: 12px;
	line-height: 1.25;
	color: var(--ra-ink);
}

/* ----------------------------------------------------------- Countdown --- */

.ra-countdown {
	margin: 0 0 30px;
	padding: 14px 18px;
	border-radius: var(--ra-radius);
	/* Verde claro de marca con transparencia, para un tono más suave. */
	background: rgba(64, 225, 171, .35);
}

.ra-countdown__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
}

.ra-countdown__side {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 190px;
}

.ra-countdown__side--range {
	justify-content: flex-end;
}

.ra-countdown__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	border-radius: 10px;
	background: #ffffff;
	color: var(--ra-primary);
}

.ra-countdown__icon svg {
	width: 20px;
	height: 20px;
}

.ra-countdown__text {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ra-ink);
}

.ra-countdown__timer {
	display: flex;
	gap: 10px;
	margin: 0 auto;
}

.ra-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	width: 62px;
}

.ra-countdown__value {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 46px;
	border-radius: 12px;
	background: var(--ra-primary-dark);
	color: #ffffff;
	font-size: 22px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: .5px;
}

.ra-countdown__unit-label {
	font-family: Inter, sans-serif; /* Tipografía de los párrafos del sitio (el resto de la sección hereda la de los títulos). */
	font-size: 11px;
	font-weight: 600;
	color: var(--ra-ink);
}

.ra-countdown__finished {
	flex: 1 1 260px;
	margin: 0;
	padding: 10px 14px;
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ra-primary-dark);
}

.ra-countdown__finished[hidden] {
	display: none;
}

.ra-countdown.is-finished .ra-countdown__timer {
	display: none;
}

/* ------------------------------------------------- Marcas participantes --- */

.ra-brands {
	margin: 0 0 26px;
	text-align: center;
}

.ra-brands__title {
	margin: 0 0 4px;
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 800;
	color: #565d67;
}

.ra-brands__subtitle {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--ra-muted);
}

.ra-brands__carousel {
	position: relative;
	padding: 0 40px;
}

.ra-brands__track {
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 4px 2px 8px;
	list-style: none;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.ra-brands__track::-webkit-scrollbar {
	display: none;
}

.ra-brands__item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.ra-brand-chip {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 132px;
	height: auto;
	padding: 10px 14px;
	border: 1px solid var(--ra-border);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(8, 92, 96, .05);
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.ra-brand-chip:hover,
.ra-brand-chip:focus-visible {
	transform: translateY(-3px);
	border-color: var(--ra-primary);
	box-shadow: 0 8px 18px rgba(8, 92, 96, .14);
}

.ra-brand-chip.is-active {
	border-color: var(--ra-primary);
	box-shadow: 0 0 0 2px rgba(8, 142, 143, .18);
}

/* Logos de "Marcas participantes": 120px de alto, ancho proporcional. */
.ra-aniv .ra-brand-chip__logo {
	display: block;
	width: auto;
	max-width: none;
	height: 120px;
	max-height: none;
	object-fit: contain;
}

.ra-brand-chip__name {
	font-size: 13px;
	font-weight: 700;
	color: var(--ra-ink);
}

.ra-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--ra-border);
	border-radius: 50%;
	background: #ffffff;
	color: var(--ra-primary);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(8, 92, 96, .1);
	transition: background .2s ease, color .2s ease, opacity .2s ease;
	z-index: 2;
}

.ra-nav-arrow svg {
	width: 16px;
	height: 16px;
}

.ra-nav-arrow:hover {
	background: var(--ra-primary);
	color: #ffffff;
}

.ra-nav-arrow[disabled] {
	opacity: .35;
	cursor: default;
}

.ra-nav-arrow--prev {
	left: 0;
}

.ra-nav-arrow--next {
	right: 0;
}

/* Si todos los logos caben, no hay nada que desplazar. */
.ra-brands__carousel.is-static .ra-nav-arrow {
	display: none;
}

/* ---------------------------------------------------- Bloque de marca --- */

.ra-brand {
	margin: 0 0 26px;
	border-radius: var(--ra-radius);
	background: #ffffff;
	box-shadow: var(--ra-shadow);
	overflow: hidden;
	scroll-margin-top: 120px;
	content-visibility: auto;
	contain-intrinsic-size: 1px 520px;
}

.ra-brand.is-highlight {
	animation: ra-highlight 1.4s ease;
}

@keyframes ra-highlight {
	0%   { box-shadow: 0 0 0 0 rgba(8, 142, 143, .55); }
	60%  { box-shadow: 0 0 0 8px rgba(8, 142, 143, 0); }
	100% { box-shadow: var(--ra-shadow); }
}

.ra-brand__banner {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ra-brand__banner-picture,
.ra-brand__banner-img {
	display: block;
	width: 100%;
}

.ra-brand__banner-mobile {
	display: none;
}

.ra-brand__carousel {
	padding: 14px 10px 6px;
}

/* Placeholder de carga diferida. */

.ra-brand__placeholder {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	padding: 6px;
}

.ra-skeleton {
	display: block;
	height: 220px;
	border-radius: 12px;
	background: linear-gradient(90deg, #f2f6f7 25%, #e8eff0 37%, #f2f6f7 63%);
	background-size: 400% 100%;
	animation: ra-skeleton 1.4s ease infinite;
}

@keyframes ra-skeleton {
	0%   { background-position: 100% 50%; }
	100% { background-position: 0 50%; }
}

/* Respaldo cuando la categoría de productos de una marca está vacía. */

.ra-brand__empty {
	display: block;
}

.ra-brand__empty-banner-picture,
.ra-brand__empty-banner-img {
	display: block;
	width: 100%;
	border-radius: 12px;
}

.ra-brand__empty-notice {
	margin: 12px 6px 6px;
	padding: 10px 14px;
	border: 1px dashed var(--ra-border);
	border-radius: 12px;
	background: var(--ra-mint-soft);
	color: var(--ra-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

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

/* Escritorio: la sección ocupa el 90% del ancho de SU CONTENEDOR (no de toda
   la pantalla: con vw se salía del contenedor angosto del tema y quedaba
   descentrada/desbordada), con un tope de 1440px, siempre centrada. */
@media (min-width: 1025px) {
	.ra-aniv {
		width: 90%;
		max-width: 1440px;
		margin-right: auto;
		margin-left: auto;
		padding-right: 0;
		padding-left: 0;
	}
}

/* Marcas participantes (tablet horizontal y PC): los 8 logos caben en una sola
   fila, se reparten el ancho y quedan centrados. Si la pantalla es demasiado
   angosta vuelve el scroll con flechas. */
@media (min-width: 861px) {
	.ra-brands__track {
		gap: 10px;
	}

	.ra-brands__item {
		flex: 1 1 0;
		min-width: 84px;
		max-width: 170px;
	}

	.ra-brands__item:first-child {
		margin-left: auto;
	}

	.ra-brands__item:last-child {
		margin-right: auto;
	}

	.ra-brand-chip {
		width: 100%;
		min-width: 0;
		padding: 8px;
	}

	.ra-aniv .ra-brand-chip__logo {
		width: 100%;
	}
}

/* Por debajo de 861px no caben las 8 marcas en una fila. En vez de un
   carrusel deslizable, se muestran todas de una vez en una cuadrícula fija
   de 2 columnas x 4 filas, a todo el ancho de la pantalla. */
@media (max-width: 860px) {
	/* En móvil ya no se desliza: se ven las 8 marcas de una vez en una
	   cuadrícula fija de 2 columnas x 4 filas, sin carrusel ni flechas. */
	.ra-brands__carousel {
		width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 0 16px;
	}

	.ra-brands__track {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		overflow: visible;
		scroll-snap-type: none;
	}

	.ra-brands__item {
		flex: none;
		scroll-snap-align: none;
	}

	.ra-brand-chip {
		width: 100%;
		min-width: 0;
		height: 96px;
	}

	.ra-aniv .ra-brand-chip__logo {
		width: 100%;
		height: 100%;
	}

	/* Sin nada que desplazar, las flechas de navegación no hacen falta. */
	.ra-nav-arrow {
		display: none;
	}
}

/* Tarjeta de marca (banner + carrusel de productos de otro plugin) a todo el
   ancho de la pantalla en móvil/tablet: el carrusel de productos calcula el
   tamaño de sus tarjetas según el ancho disponible, así que darle más ancho
   hace que los productos se vean más grandes. */
@media (max-width: 860px) {
	.ra-brand {
		width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		border-radius: 0;
	}

	.ra-brand__carousel {
		padding: 14px 4px 6px;
	}
}

@media (max-width: 1024px) {
	.ra-countdown__side {
		min-width: 0;
	}

	.ra-countdown__text {
		font-size: 13px;
	}
}

@media (max-width: 860px) {
	.ra-hero__fallback {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
		gap: 18px;
		padding: 24px 18px;
	}

	.ra-countdown__inner {
		justify-content: center;
		gap: 14px;
	}

	.ra-countdown__timer {
		order: -1;
		width: 100%;
		justify-content: center;
	}

	.ra-countdown__side {
		flex: 1 1 46%;
	}

	.ra-countdown__side--range {
		justify-content: flex-start;
	}
}

@media (max-width: 600px) {
	.ra-aniv {
		padding: 0 12px 30px;
	}

	.ra-countdown__unit {
		width: 58px;
	}

	.ra-countdown__value {
		height: 42px;
		font-size: 19px;
	}

	.ra-brand__banner-img--desktop {
		display: none;
	}

	.ra-brand__banner-mobile {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		padding: 16px 16px 18px;
		background: linear-gradient(120deg, #d9f5f6 0%, #eefcfd 60%, #f6feff 100%);
	}

	.ra-brand__banner-logo {
		max-height: 38px;
		width: auto;
	}

	.ra-brand__banner-name {
		font-size: 17px;
		font-weight: 800;
		color: var(--ra-ink);
	}

	.ra-brand__banner-copy {
		display: block;
		line-height: 1.12;
	}

	.ra-brand__banner-title-a,
	.ra-brand__banner-title-b {
		display: block;
		font-size: 21px;
		font-weight: 800;
	}

	.ra-brand__banner-title-a {
		color: var(--ra-accent);
	}

	.ra-brand__banner-title-b {
		color: var(--ra-primary-deep);
	}

	.ra-brand__banner-tagline {
		display: block;
		margin-top: 6px;
		font-size: 13px;
		color: var(--ra-muted);
	}

	.ra-brand__banner-cta {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 9px 16px;
		border-radius: 999px;
		background: var(--ra-primary-dark);
		color: #ffffff;
		font-size: 13px;
		font-weight: 600;
	}

	.ra-brand__banner-cta svg {
		width: 16px;
		height: 16px;
	}

	.ra-brand__placeholder {
		grid-template-columns: repeat(2, 1fr);
	}

	.ra-skeleton {
		height: 170px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ra-brands__track {
		scroll-behavior: auto;
	}

	.ra-brand.is-highlight {
		animation: none;
	}

	.ra-skeleton {
		animation: none;
	}
}
