/* ==========================================================================
   Ecuavoley Elementor Widgets — cajas laterales y panel
   Radio · Vídeos · Patrocinadores · Servicios jurídicos · Panel completo
   ========================================================================== */

/* ── Caja genérica ──────────────────────────────────────────────────────── */
.ecw-box {
	position: relative;
	background: var(--ecw-bg);
	border: 1px solid var(--ecw-line);
	border-radius: var(--ecw-radius);
	padding: 15px 18px 16px;
	overflow: hidden;
}

.ecw-box__head {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 11px;
}

.ecw-box__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ecw-accent);
	color: #041321;
	flex: 0 0 auto;
}

.ecw-box__icon .ecw-svg {
	width: 19px;
	height: 19px;
	stroke-width: 2;
}

.ecw-box__icon--plain {
	background: transparent;
	color: var(--ecw-accent);
	border-radius: 0;
	width: 26px;
	height: 26px;
}

.ecw-box__icon--plain .ecw-svg {
	width: 24px;
	height: 24px;
}

.ecw-box__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-family: var(--ecw-font-head);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: 0.015em;
	text-transform: uppercase;
	color: var(--ecw-text);
}

.ecw-box__link {
	font-family: var(--ecw-font-body);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: #9fb0c2;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.ecw-box__link:hover {
	color: var(--ecw-accent);
}

.ecw-box__text {
	position: relative;
	z-index: 2;
	margin: 0 0 14px;
	font-size: 12px;
	line-height: 1.55;
	color: var(--ecw-muted);
}

/* ── Radio ──────────────────────────────────────────────────────────────── */
.ecw-radio .ecw-box__head {
	padding-right: 0;
}

.ecw-radio__top {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 14px;
}

.ecw-radio__top .ecw-box__text {
	flex: 1 1 auto;
	margin: 0;
}

.ecw-radio__media {
	flex: 0 0 auto;
	width: 64px;
	margin-top: -6px;
}

.ecw-radio__logo {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

.ecw-radio__player {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 16px;
}

.ecw-btn-play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ecw-accent);
	color: #041321;
	cursor: pointer;
	flex: 0 0 auto;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.ecw-btn-play .ecw-svg {
	width: 20px;
	height: 20px;
}

.ecw-btn-play__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.ecw-btn-play__icon.is-play {
	margin-left: 2px;
}

.ecw-btn-play__icon.is-pause {
	display: none;
}

.ecw-btn-play:hover {
	transform: scale(1.06);
	box-shadow: 0 0 0 6px rgba(255, 235, 23, 0.14);
}

.ecw-btn-play:focus-visible {
	outline: 2px solid var(--ecw-accent);
	outline-offset: 3px;
}

.ecw-radio.is-playing .ecw-btn-play__icon.is-play {
	display: none;
}

.ecw-radio.is-playing .ecw-btn-play__icon.is-pause {
	display: flex;
}

.ecw-wave {
	display: flex;
	align-items: center;
	gap: 3px;
	height: 36px;
	overflow: hidden;
	flex: 1 1 auto;
	min-width: 0;
}

.ecw-wave i {
	display: block;
	width: 2.5px;
	height: 6px;
	background: var(--ecw-accent);
	border-radius: 2px;
	opacity: 0.5;
	transition: opacity 0.2s ease;
}

.ecw-radio.is-playing .ecw-wave i {
	opacity: 1;
	animation: ecw-wave 0.9s ease-in-out infinite alternate;
}

.ecw-radio.is-playing .ecw-wave i:nth-child(2n) { animation-duration: 0.7s; }
.ecw-radio.is-playing .ecw-wave i:nth-child(3n) { animation-duration: 1.1s; }
.ecw-radio.is-playing .ecw-wave i:nth-child(5n) { animation-duration: 0.55s; }

@keyframes ecw-wave {
	0% { height: 5px; }
	100% { height: var(--h, 24px); }
}

.ecw-radio__audio {
	display: none;
}

.ecw-radio__status {
	margin: 8px 0 0;
	font-size: 10.5px;
	color: var(--ecw-muted);
	line-height: 1.3;
}

.ecw-radio__status:empty {
	display: none;
}

/* ── Vídeos ─────────────────────────────────────────────────────────────── */
.ecw-video {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
	border-radius: var(--ecw-radius);
	margin-bottom: 10px;
}

.ecw-video--vertical {
	aspect-ratio: 9 / 16;
	max-width: 260px;
	margin-left: auto;
	margin-right: auto;
}

.ecw-video iframe,
.ecw-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.ecw-video__thumb {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
	overflow: hidden;
}

.ecw-video__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: brightness(0.72);
	transition: transform 0.4s ease, filter 0.3s ease;
}

.ecw-video__thumb:hover img {
	transform: scale(1.03);
	filter: brightness(0.85);
}

.ecw-video__thumb--static {
	position: static;
	cursor: default;
}

.ecw-video__thumb--static:hover img {
	transform: none;
	filter: brightness(0.8);
}

.ecw-video__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--ecw-accent);
	color: #041321;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-left: 2px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
	transition: transform 0.2s ease;
}

.ecw-video__play .ecw-svg {
	width: 18px;
	height: 18px;
}

.ecw-video__thumb:hover .ecw-video__play {
	transform: scale(1.08);
}

.ecw-video__noimg {
	display: block;
	width: 100%;
	height: 100%;
	background-image: linear-gradient(135deg, #0b1c2c 0%, #14304a 100%);
}

.ecw-video__meta {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ecw-video__title {
	margin: 0;
	font-family: var(--ecw-font-body);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--ecw-text);
}

.ecw-video__date {
	font-size: 10.5px;
	letter-spacing: 0.04em;
	color: #9fb0c2;
}

/* ── Patrocinadores ─────────────────────────────────────────────────────── */
.ecw-sponsors__wrap {
	position: relative;
	overflow: hidden;
}

.ecw-sponsors__track {
	display: grid;
	grid-template-columns: repeat(var(--ecw-sponsor-cols, 3), minmax(0, 1fr));
	gap: 8px;
}

.ecw-sponsors__cell {
	min-width: 0;
}

/* Banner horizontal — sin aspect-ratio cuadrado */
.ecw-sponsors__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	min-height: 72px;
	padding: 10px 16px;
	background: var(--ecw-card);
	border: 1px solid var(--ecw-line);
	border-radius: var(--ecw-radius);
	text-decoration: none;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

a.ecw-sponsors__item:hover {
	border-color: var(--ecw-accent);
	background: #0b2136;
	transform: translateY(-2px);
}

.ecw-sponsors__logo {
	max-height: 44px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
	display: block;
}

.ecw-sponsors__mark {
	display: block;
	width: 20px;
	height: 20px;
	border: 1.5px solid #b9c3d1;
	border-radius: 2px;
	transform: rotate(45deg);
	opacity: 0.75;
}

.ecw-sponsors__name {
	font-size: 8.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9fb0c2;
	text-align: center;
	line-height: 1.2;
}

/* ── Carrusel ────────────────────────────────────────────────────────────── */
.ecw-sponsors__wrap.is-carousel .ecw-sponsors__track {
	display: flex;
	gap: 0;
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

/* Cada celda ocupa exactamente 1/N del ancho del track */
.ecw-sponsors__wrap.is-carousel .ecw-sponsors__cell {
	flex: 0 0 calc(100% / var(--ecw-per, 1));
	box-sizing: border-box;
	padding: 0 4px;  /* separación visual entre banners */
}

/* Banner más alto en modo carrusel para aprovechar el ancho */
.ecw-sponsors__wrap.is-carousel .ecw-sponsors__item {
	min-height: 90px;
	padding: 16px 24px;
}

/* ── Controles: flecha · puntos · flecha ─────────────────────────────────── */
.ecw-sponsors__controls {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.ecw-sponsors__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0;
	font-family: var(--ecw-font-body);
	font-size: 16px;
	line-height: 1;
	color: var(--ecw-text);
	background: var(--ecw-card);
	border: 1px solid var(--ecw-line);
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ecw-sponsors__btn:hover {
	background: var(--ecw-accent);
	border-color: var(--ecw-accent);
	color: #041321;
}

.ecw-sponsors__btn[disabled] {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ── Indicadores de puntos ───────────────────────────────────────────────── */
.ecw-sponsors__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
	flex-wrap: wrap;
}

.ecw-sponsors__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ecw-line);
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.22s ease, width 0.25s ease, border-radius 0.25s ease;
}

.ecw-sponsors__dot.is-active {
	background: var(--ecw-accent);
	width: 18px;
	border-radius: 4px;
}

.ecw-sponsors__dot:hover:not(.is-active) {
	background: var(--ecw-muted);
}

/* ── Servicios jurídicos ────────────────────────────────────────────────── */
.ecw-legal {
	padding-bottom: 18px;
}

.ecw-legal__art {
	position: absolute;
	right: -14px;
	bottom: -12px;
	width: 128px;
	max-width: 46%;
	opacity: 0.3;
	pointer-events: none;
	z-index: 1;
	line-height: 0;
}

.ecw-legal__art img {
	width: 100%;
	height: auto;
	display: block;
}

.ecw-legal .ecw-box__head {
	margin-bottom: 8px;
}

.ecw-legal .ecw-box__text {
	max-width: 82%;
	margin-bottom: 14px;
}

.ecw-legal__btn {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 26px;
	padding: 9px 14px;
	background: var(--ecw-accent);
	color: #041321;
	font-family: var(--ecw-font-head);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	text-decoration: none;
	border: 0;
	border-radius: var(--ecw-radius);
	transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.ecw-legal__btn .ecw-svg {
	width: 13px;
	height: 13px;
	stroke-width: 2.6;
}

.ecw-legal__btn:hover {
	filter: brightness(1.06);
	box-shadow: 0 6px 18px rgba(255, 235, 23, 0.22);
}

.ecw-legal__btn.is-disabled {
	opacity: 0.72;
	cursor: default;
}

/* ── Panel completo ─────────────────────────────────────────────────────── */
.ecw-panel {
	display: grid;
	gap: 18px;
	align-items: start;
}

.ecw-panel--has-side {
	grid-template-columns: minmax(0, 1fr) 32%;
}

.ecw-panel--no-side {
	grid-template-columns: minmax(0, 1fr);
}

.ecw-panel__main {
	min-width: 0;
}

.ecw-panel__side {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

/* ── Adaptabilidad ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
	.ecw-panel--has-side {
		grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
	}
}

@media (max-width: 900px) {
	.ecw-panel--has-side {
		grid-template-columns: minmax(0, 1fr);
	}
	.ecw-panel__side {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 640px) {
	.ecw-panel__side {
		grid-template-columns: minmax(0, 1fr);
	}
	.ecw-box__title { font-size: 18px; }
	.ecw-box { padding: 14px 15px 15px; }
	.ecw-legal .ecw-box__text { max-width: 100%; }
	.ecw-radio__media { width: 52px; }
	.ecw-radio__logo,
	.ecw-radio__media img { width: 100%; }
	.ecw-wave { gap: 2px; }
}

@media (max-width: 420px) {
	.ecw-sponsors__item { min-height: 58px; padding: 8px 10px; }
	.ecw-sponsors__wrap.is-carousel .ecw-sponsors__item { min-height: 72px; padding: 12px 14px; }
	.ecw-sponsors__btn { width: 24px; height: 24px; font-size: 14px; }
	.ecw-sponsors__dots { gap: 5px; }
	.ecw-sponsors__dot { width: 6px; height: 6px; }
	.ecw-sponsors__dot.is-active { width: 14px; }
}
