/* AAVF Slider */
.aavf-slider { position: relative; width: 100%; max-width: 100%; margin: 0 0 20px; background: #000; overflow: hidden; }
.aavf-stage { position: relative; width: 100%; padding-bottom: var(--aavf-ratio, 57.3%); }

.aavf-slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: 0; opacity: 0; visibility: hidden;
	transition: opacity var(--aavf-fade, 1500ms) ease, visibility 0s linear var(--aavf-fade, 1500ms); }
.aavf-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity var(--aavf-fade, 1500ms) ease, visibility 0s; }
.aavf-img, .aavf-img img { display: block; width: 100%; height: 100%; }
.aavf-img img { object-fit: cover; max-width: none; }

/* Título al pie, sobre un degradé suave */
.aavf-caption { position: absolute; left: 0; bottom: 0; width: 100%; box-sizing: border-box; padding: 90px 30px 28px;
	background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.5) 50%, rgba(0,0,0,0) 100%); color: #fff; text-align: left; pointer-events: none; }
.aavf-caption a { pointer-events: auto; }
.aavf-caption h3 { margin: 0 0 6px; padding: 0; font-size: 26px; line-height: 1.15; font-weight: 500; letter-spacing: -0.3px; text-transform: none; }
.aavf-caption h3 a, .aavf-caption h3 a:visited { color: #fff; text-decoration: none; }
.aavf-caption h3 a:hover { text-decoration: underline; }
.aavf-meta { margin: 0; font-size: 13px; line-height: 1.3; letter-spacing: -0.2px; color: #f2f2f2; }
.aavf-meta span + span { margin-left: 14px; }
.aavf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botones: cuadrados oscuros pegados a los bordes */
.aavf-btn { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
	border: 0; border-radius: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; transition: opacity .2s, background .2s; }
.aavf-btn svg { width: 26px; height: 26px; display: block; }
.aavf-btn:hover, .aavf-btn:focus-visible { background: rgba(0,0,0,.85); outline: 2px solid #fff; outline-offset: -2px; }
.aavf-prev { left: 0; top: calc(50% - 20px); }
.aavf-next { right: 0; top: calc(50% - 20px); }
.aavf-playpause { right: 41px; top: calc(50% - 20px); }
.aavf-playpause-edge { right: 0; }
.aavf-playpause svg { width: 20px; height: 20px; }
.aavf-btn .aavf-ico-play { display: none; }
.aavf-slider.is-paused .aavf-btn .aavf-ico-play { display: block; }
.aavf-slider.is-paused .aavf-btn .aavf-ico-pause { display: none; }

/* Controles solo al pasar el mouse (en pantallas táctiles quedan siempre a la vista) */
@media (hover: hover) {
	.aavf-prev, .aavf-next, .aavf-playpause { opacity: 0; }
	.aavf-slider:hover .aavf-btn, .aavf-slider:focus-within .aavf-btn { opacity: 1; }
}

/* Reloj de avance: anillo sin relleno */
.aavf-pie { position: absolute; z-index: 3; top: 5px; right: 5px; width: 30px; height: 30px; transform: rotate(-90deg); pointer-events: none; }
.aavf-pie circle { fill: none; stroke-width: 3; }
.aavf-pie-bg { stroke: rgba(255,255,255,.35); }
.aavf-pie-run { stroke: #fff; stroke-dasharray: 100; stroke-dashoffset: 100; }
@keyframes aavf-pie { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

@media (max-width: 767px) {
	.aavf-caption { padding: 50px 14px 12px; }
	.aavf-caption h3 { font-size: 17px; margin-bottom: 3px; }
	.aavf-meta { font-size: 12px; }
	.aavf-btn { width: 34px; height: 34px; }
	.aavf-prev, .aavf-next, .aavf-playpause { top: calc(50% - 17px); }
	.aavf-playpause { right: 35px; }
	.aavf-pie { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.aavf-slide, .aavf-slide.is-active { transition: none; }
}
