/* =============================================
   ANIMACIÓN EDUCATIVA DE TEJO
   Estilo: Vectorial moderno, flat/2.5D
   Duración: 6 segundos en loop
   ============================================= */

.tejo-educativo {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 420px;
    margin: var(--spacing-2xl) auto;
    background: linear-gradient(165deg, #0a1628 0%, #142440 40%, #1a3050 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* =============================================
   CANCHA - Vista lateral
   ============================================= */

.cancha-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
}

/* Piso base */
.cancha-piso {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, #3d3d3d 0%, #2a2a2a 100%);
    border-top: 3px solid #4a4a4a;
}

/* Línea de cancha */
.cancha-linea {
    position: absolute;
    bottom: 100px;
    left: 80px;
    right: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
}

/* =============================================
   ZONA DE LANZAMIENTO (izquierda)
   ============================================= */

.zona-lanzamiento {
    position: absolute;
    left: 60px;
    bottom: 100px;
    width: 80px;
    height: 4px;
    background: #FCD116;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(252, 209, 22, 0.4);
}

.zona-lanzamiento::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -60px;
    width: 2px;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, rgba(252, 209, 22, 0.3) 100%);
}

/* =============================================
   TABLERO DE GREDA (derecha)
   ============================================= */

.tablero-container {
    position: absolute;
    right: 50px;
    bottom: 95px;
    width: 130px;
    height: 100px;
}

/* Marco de madera */
.tablero-marco {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #6b4423 0%, #5a3a1d 50%, #4a2c12 100%);
    border-radius: 6px;
    border: 2px solid #7a5030;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Greda (arcilla) */
.tablero-greda {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: linear-gradient(160deg, #a67c52 0%, #8b6340 40%, #6d4c2a 100%);
    border-radius: 4px;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.35);
}

/* Textura de greda */
.tablero-greda::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 25%);
    border-radius: 4px;
}

/* =============================================
   BOCÍN
   ============================================= */

.bocin-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
}

.bocin {
    width: 100%;
    height: 100%;
    border: 4px solid #8a9aa8;
    border-radius: 50%;
    background: linear-gradient(145deg, #9aabb8 0%, #7a8a98 50%, #5a6a78 100%);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.4),
        inset 0 2px 6px rgba(255, 255, 255, 0.25),
        inset 0 -2px 6px rgba(0, 0, 0, 0.25);
}

.bocin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: linear-gradient(145deg, #6a7a88 0%, #4a5a68 100%);
    border-radius: 50%;
}

/* =============================================
   MECHA (1 sola - Reglamentario)
   ============================================= */

.mecha {
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%) rotate(90deg);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid #CE1126;
    filter: drop-shadow(0 2px 5px rgba(206, 17, 38, 0.5));
    animation: mechaGlow 0.8s ease-in-out infinite alternate;
}

.mecha::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -5px;
    width: 10px;
    height: 6px;
    background: #8B0000;
    border-radius: 2px;
}

/* =============================================
   INDICADOR DE DISTANCIA
   ============================================= */

.distancia-container {
    position: absolute;
    bottom: 130px;
    left: 140px;
    right: 180px;
    height: 40px;
}

.distancia-linea {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        rgba(252, 209, 22, 0.6) 0px,
        rgba(252, 209, 22, 0.6) 8px,
        transparent 8px,
        transparent 16px
    );
}

.distancia-flecha-izq,
.distancia-flecha-der {
    position: absolute;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.distancia-flecha-izq {
    left: 0;
    border-right: 10px solid rgba(252, 209, 22, 0.8);
}

.distancia-flecha-der {
    right: 0;
    border-left: 10px solid rgba(252, 209, 22, 0.8);
}

/* =============================================
   JUGADOR - Estilo vectorial
   ============================================= */

.jugador-container {
    position: absolute;
    left: 70px;
    bottom: 105px;
    width: 55px;
    height: 120px;
}

/* Cabeza */
.jugador-cabeza {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    background: linear-gradient(180deg, #d4a574 0%, #c49464 100%);
    border-radius: 50%;
}

.jugador-cabeza::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 3px;
    right: 3px;
    height: 13px;
    background: #2c2016;
    border-radius: 50% 50% 0 0;
}

/* Torso */
.jugador-torso {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 38px;
    background: linear-gradient(180deg, #003893 0%, #002a70 100%);
    border-radius: 4px 4px 0 0;
}

/* Número en camiseta */
.jugador-torso::after {
    content: '7';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-primary, sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: #FCD116;
}

/* Brazo derecho (lanza) */
.jugador-brazo-der {
    position: absolute;
    top: 30px;
    left: 38px;
    width: 32px;
    height: 8px;
    background: linear-gradient(90deg, #003893 0%, #d4a574 70%);
    border-radius: 4px;
    transform-origin: left center;
    animation: brazoLanzar 6s ease-in-out infinite;
}

/* Mano con tejo */
.jugador-mano {
    position: absolute;
    right: -6px;
    top: -5px;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 40% 40%, #666 0%, #444 50%, #333 100%);
    border-radius: 50%;
    border: 2px solid #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    animation: tejoMano 6s ease-in-out infinite;
}

/* Brazo izquierdo */
.jugador-brazo-izq {
    position: absolute;
    top: 34px;
    right: 38px;
    width: 22px;
    height: 7px;
    background: linear-gradient(270deg, #003893 0%, #d4a574 80%);
    border-radius: 4px;
    transform: rotate(-25deg);
    transform-origin: right center;
}

/* Piernas */
.jugador-piernas {
    position: absolute;
    top: 66px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 54px;
}

.jugador-pierna {
    position: absolute;
    bottom: 0;
    width: 11px;
    height: 54px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 0 0 3px 3px;
}

.jugador-pierna-izq { left: 0; }
.jugador-pierna-der { right: 0; }

/* =============================================
   TEJO EN VUELO
   ============================================= */

.tejo-vuelo {
    position: absolute;
    left: 100px;
    bottom: 180px;
    width: 24px;
    height: 24px;
    opacity: 0;
    z-index: 20;
}

.tejo-disco {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 35% 35%, #777 0%, #555 40%, #333 100%);
    border-radius: 50%;
    border: 2px solid #666;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    animation: tejoVolar 6s ease-in-out infinite;
}

/* Brillo del tejo */
.tejo-disco::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 5px;
    width: 7px;
    height: 5px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
}

/* Trayectoria del tejo */
.tejo-trayectoria {
    position: absolute;
    bottom: 175px;
    left: 110px;
    width: 0;
    height: 0;
    border-bottom: 2px dashed rgba(252, 209, 22, 0.5);
    border-radius: 50%;
    transform-origin: left center;
    animation: trayectoriaCrecer 6s ease-in-out infinite;
    z-index: 5;
}

/* =============================================
   ETIQUETAS EDUCATIVAS
   ============================================= */

.etiqueta {
    position: absolute;
    font-family: var(--font-primary, 'Montserrat', sans-serif);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: rgba(0, 56, 147, 0.85);
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(5px);
}

.etiqueta::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
}

/* Etiqueta Bocín */
.etiqueta-bocin {
    right: 60px;
    bottom: 220px;
    animation: etiquetaAparecer 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

.etiqueta-bocin::before {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 56, 147, 0.85);
}

/* Etiqueta Mecha */
.etiqueta-mecha {
    right: 30px;
    bottom: 260px;
    background: rgba(206, 17, 38, 0.85);
    animation: etiquetaAparecer 6s ease-in-out infinite;
    animation-delay: 0.8s;
}

.etiqueta-mecha::before {
    bottom: -6px;
    left: 30%;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(206, 17, 38, 0.85);
}

/* Etiqueta Tejo */
.etiqueta-tejo {
    left: 200px;
    bottom: 280px;
    background: rgba(85, 85, 85, 0.9);
    animation: etiquetaTejo 6s ease-in-out infinite;
}

/* Etiqueta Distancia */
.etiqueta-distancia {
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    bottom: 155px;
    background: rgba(252, 209, 22, 0.9);
    color: #1a1a1a;
    font-size: 10px;
    animation: etiquetaAparecer 6s ease-in-out infinite;
    animation-delay: 0.3s;
}

/* Etiqueta Greda */
.etiqueta-greda {
    right: 50px;
    bottom: 80px;
    background: rgba(139, 99, 64, 0.9);
    animation: etiquetaAparecer 6s ease-in-out infinite;
    animation-delay: 0.6s;
}

/* =============================================
   EFECTO DE IMPACTO
   ============================================= */

.impacto-container {
    position: absolute;
    right: 90px;
    bottom: 140px;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 25;
}

.impacto-onda {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border: 2px solid #FCD116;
    border-radius: 50%;
    opacity: 0;
    animation: impactoOnda 6s ease-out infinite;
}

.impacto-onda:nth-child(2) {
    animation-delay: 0.1s;
    border-color: rgba(252, 209, 22, 0.6);
}

.impacto-destello {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, #fff 0%, #FCD116 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: impactoDestello 6s ease-out infinite;
}

/* =============================================
   TÍTULO INFERIOR
   ============================================= */

.titulo-inferior {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-primary, 'Montserrat', sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.titulo-inferior span {
    color: #FCD116;
}

/* =============================================
   KEYFRAMES
   ============================================= */

/* Brazo lanzando */
@keyframes brazoLanzar {
    0%, 15% {
        transform: rotate(-25deg);
    }
    20% {
        transform: rotate(-45deg);
    }
    30% {
        transform: rotate(35deg);
    }
    40%, 100% {
        transform: rotate(5deg);
    }
}

/* Tejo en mano */
@keyframes tejoMano {
    0%, 25% {
        opacity: 1;
        transform: scale(1);
    }
    30%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Tejo volando */
@keyframes tejoVolar {
    0%, 25% {
        left: 100px;
        bottom: 180px;
        opacity: 0;
        transform: rotate(0deg);
    }
    30% {
        left: 140px;
        bottom: 240px;
        opacity: 1;
        transform: rotate(180deg);
    }
    50% {
        left: 380px;
        bottom: 280px;
        opacity: 1;
        transform: rotate(540deg);
    }
    70% {
        left: 620px;
        bottom: 200px;
        opacity: 1;
        transform: rotate(900deg);
    }
    75% {
        left: 710px;
        bottom: 155px;
        opacity: 1;
        transform: rotate(1080deg);
    }
    76%, 100% {
        left: 720px;
        bottom: 150px;
        opacity: 0;
        transform: rotate(1080deg);
    }
}

/* Trayectoria */
@keyframes trayectoriaCrecer {
    0%, 25% {
        width: 0;
        opacity: 0;
    }
    35% {
        width: 150px;
        opacity: 0.7;
    }
    70% {
        width: 580px;
        opacity: 0.5;
    }
    76%, 100% {
        width: 600px;
        opacity: 0;
    }
}

/* Etiquetas apareciendo */
@keyframes etiquetaAparecer {
    0%, 10% {
        opacity: 0;
        transform: translateY(8px);
    }
    20%, 85% {
        opacity: 1;
        transform: translateY(0);
    }
    95%, 100% {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* Etiqueta del tejo (sigue al tejo) */
@keyframes etiquetaTejo {
    0%, 25% {
        left: 150px;
        bottom: 260px;
        opacity: 0;
    }
    35% {
        left: 200px;
        bottom: 300px;
        opacity: 1;
    }
    55% {
        left: 420px;
        bottom: 320px;
        opacity: 1;
    }
    70% {
        left: 600px;
        bottom: 250px;
        opacity: 0.8;
    }
    76%, 100% {
        left: 650px;
        bottom: 200px;
        opacity: 0;
    }
}

/* Impacto */
@keyframes impactoOnda {
    0%, 74% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    75% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    90% {
        width: 50px;
        height: 50px;
        opacity: 0.3;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

@keyframes impactoDestello {
    0%, 74% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    75% {
        width: 30px;
        height: 30px;
        opacity: 1;
    }
    85% {
        width: 20px;
        height: 20px;
        opacity: 0.5;
    }
    100% {
        width: 10px;
        height: 10px;
        opacity: 0;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
    .tejo-educativo {
        height: 380px;
        transform: scale(0.9);
        transform-origin: center center;
    }
}

@media (max-width: 768px) {
    .tejo-educativo {
        height: 340px;
        transform: scale(0.75);
        margin: var(--spacing-xl) auto;
    }
    
    .etiqueta {
        font-size: 9px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .tejo-educativo {
        height: 300px;
        transform: scale(0.6);
        border-radius: 12px;
    }
    
    .titulo-inferior {
        font-size: 10px;
        letter-spacing: 2px;
    }
}
