/**
 * Toro Notas (funciones/toro_notas.php): la publicación breve tipo timeline, el bloque de recientes (portada, Flash) y
 * la página toro-notas.html. La imagen es siempre la foto de perfil del jugador.
 * @version 1.0
 * @date 2026-11-17
 */
.tn-nota {
    --tn-naranja: #fd3f00;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #1d1d1b;
    font-family: var(--fuente-texto, "Inter", Arial, sans-serif);
    text-align: left;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
    scroll-margin-top: 140px;
}
.tn-nota:target { border-color: var(--tn-naranja); box-shadow: 0 0 0 3px rgba(253, 63, 0, .18), 0 10px 26px rgba(0, 0, 0, .08); }
.tn-cabeza { display: flex; align-items: center; gap: 12px; }
.tn-cara { flex: none; display: block; width: 50px; height: 50px; overflow: hidden; border-radius: 50%; border: 2px solid var(--tn-naranja); background: #f1f1f1; box-shadow: 0 0 0 3px rgba(253, 63, 0, .12); }
.tn-cara img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tn-cara img.tn-silueta { object-fit: contain; object-position: bottom; padding-top: 4px; }
.tn-quien { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tn-nombre { overflow: hidden; color: #1d1d1b !important; font-weight: 800; font-size: 15.5px; white-space: nowrap; text-overflow: ellipsis; text-decoration: none !important; }
a.tn-nombre:hover { color: var(--tn-naranja) !important; }
.tn-meta { color: #7a7a7a; font-size: 13px; }
.tn-marca { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(253, 63, 0, .1); color: var(--tn-naranja); font-size: 13px; }
.tn-cabeza-sola { justify-content: space-between; }
.tn-titular { margin: 2px 0 0; padding: 0; border: 0; background: none; color: var(--tn-naranja); font-family: var(--fuente-titulo, "Saira Condensed", sans-serif); font-weight: 800; font-size: 23px; line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; }
.tn-texto { color: #333; font-size: 15px; line-height: 1.55; }
.tn-texto p { margin: 0 0 .7em; }
.tn-texto p:last-child { margin-bottom: 0; }
.tn-leer { display: none; align-self: flex-start; color: var(--tn-naranja) !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }
.tn-leer .fa-solid { margin-left: 3px; transition: transform .2s; }
.tn-leer:hover .fa-solid { transform: translateX(3px); }

/* Compacta (bloques de recientes): el texto se recorta a 6 líneas. El degradado y «Seguir leyendo» solo salen si de verdad
   no cabe: js/toro-notas.js marca .tn-desborda midiendo cada tarjeta (sin JavaScript, el texto se ve completo) */
.tn-compacta .tn-texto { position: relative; }
.tn-js .tn-compacta .tn-texto { max-height: 9.3em; overflow: hidden; }
.tn-compacta.tn-desborda .tn-texto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.4em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.tn-compacta.tn-desborda .tn-leer { display: inline-block; margin-top: auto; }

/* Bloque de recientes: banda oscura con brillo naranja y las notas en carrusel */
.tn-bloque {
    position: relative;
    margin: 26px 0;
    padding: 22px 22px 24px;
    overflow: hidden;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(60% 120% at 100% 0%, rgba(253, 63, 0, .45), transparent 60%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 12px),
        #141414;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}
.tn-bloque-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tn-bloque-titulo { margin: 0; padding: 0; border: 0; background: none; color: #fff; font-family: var(--fuente-titulo, "Saira Condensed", sans-serif); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.tn-bloque-titulo .fa-solid { color: #fd3f00; }
.tn-bloque-mas { color: #ffb08c !important; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none !important; }
.tn-bloque-mas:hover { color: #fff !important; }
.tn-carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 4px; }
.tn-carrusel > .tn-nota { scroll-snap-align: start; border-color: transparent; }
.tn-angosto .tn-carrusel { grid-auto-columns: calc((100% - 16px) / 2); }
@media (max-width: 991px) {
    .tn-carrusel { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 600px) {
    .tn-bloque { padding: 18px 16px 20px; }
    .tn-bloque-titulo { font-size: 24px; }
    .tn-carrusel { grid-auto-columns: 86%; gap: 12px; }
    .tn-nota { padding: 16px; }
    .tn-titular { font-size: 21px; }
}

/* En la rejilla del Flash: a todo el ancho y sin margen propio (el espacio lo da el gap) */
.ib-grid > .tn-bloque { grid-column: 1 / -1; margin: 0; }

/* Timeline (ficha del jugador y toro-notas.html): una columna con la línea del tiempo a la izquierda */
.tn-timeline { position: relative; display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0 0 0 26px; }
.tn-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 7px; width: 2px; border-radius: 2px; background: linear-gradient(#fd3f00, rgba(253, 63, 0, .12)); }
.tn-timeline > .tn-nota::before { content: ""; position: absolute; top: 26px; left: -25px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #fd3f00; box-shadow: 0 0 0 2px rgba(253, 63, 0, .3); }
.tn-mas-ficha { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: #fd3f00 !important; font-weight: 700; text-decoration: none !important; }

/* Página toro-notas.html */
.tn-pagina { max-width: 760px; margin: 0 auto; padding: 0 0 40px; }
.tn-portada { position: relative; margin: 24px 0 22px; padding: 30px 28px; overflow: hidden; border-radius: 18px; color: #fff;
    background: radial-gradient(70% 140% at 100% 0%, rgba(253, 63, 0, .55), transparent 60%), repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 12px), #141414; }
.tn-portada h1 { margin: 0; padding: 0; border: 0; background: none; color: #fff; font-family: var(--fuente-titulo, "Saira Condensed", sans-serif); font-weight: 800; font-size: 46px; line-height: 1; text-transform: uppercase; }
.tn-portada h1 .fa-solid { color: #fd3f00; font-size: .8em; }
.tn-portada p { margin: 8px 0 0; max-width: 560px; color: rgba(255, 255, 255, .78); font-size: 15px; line-height: 1.5; }
.tn-filtros { display: flex; gap: 8px; margin: 0 0 20px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.tn-filtro { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: .45em 1em; border-radius: 2em; border: 1px solid #e1e1e1; background: #fff; color: #1d1d1b !important; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none !important; }
.tn-filtro small { color: #999; font-weight: 600; }
.tn-filtro:hover { border-color: #fd3f00; }
.tn-filtro.activo { border-color: #fd3f00; background: #fd3f00; color: #fff !important; }
.tn-filtro.activo small { color: rgba(255, 255, 255, .8); }
.tn-vacio { padding: 40px 20px; border-radius: 16px; border: 1px dashed #ddd; color: #777; text-align: center; }
.tn-paginas { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.tn-paginas a, .tn-paginas span { padding: .5em 1em; border-radius: 2em; border: 1px solid #e1e1e1; color: #1d1d1b !important; font-weight: 700; text-decoration: none !important; }
.tn-paginas span { border-color: #fd3f00; background: #fd3f00; color: #fff !important; }
@media (max-width: 600px) {
    .tn-portada { margin-top: 16px; padding: 24px 18px; }
    .tn-portada h1 { font-size: 36px; }
    .tn-timeline { padding-left: 20px; }
    .tn-timeline::before { left: 4px; }
    .tn-timeline > .tn-nota::before { left: -21px; }
}

/* Compartir cada nota (tn_compartir y js/toro-notas.js): en escritorio, las redes aparecen al pasar el puntero en lugar del
   rayo; en el móvil, el botón de compartir siempre visible */
.tn-cabeza { position: relative; }
.tn-compartir { flex: none; display: flex; align-items: center; }
.tn-compartir-abrir { display: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(253, 63, 0, .1); color: #fd3f00; font-size: 14px; cursor: pointer; }
.tn-compartir-opciones { display: flex; align-items: center; gap: 4px; }
.tn-red { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f2f2f2; color: #444 !important; font-size: 14px; text-decoration: none !important; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.tn-red:hover, .tn-red:focus-visible { transform: translateY(-2px); color: #fff !important; }
.tn-red-whatsapp:hover, .tn-red-whatsapp:focus-visible { background: #25d366; }
.tn-red-x:hover, .tn-red-x:focus-visible { background: #000; }
.tn-red-facebook:hover, .tn-red-facebook:focus-visible { background: #1877f2; }
.tn-red-copiar:hover, .tn-red-copiar:focus-visible { background: #fd3f00; }
.tn-red.tn-copiado { background: #1e9e4a !important; color: #fff !important; }
.tn-red-copiar.tn-copiado .fa-copy::before { content: "\f00c"; font-weight: 900; }
.tn-red.tn-copiado::after { content: attr(data-aviso); position: absolute; top: -30px; right: 0; padding: 3px 8px; border-radius: 6px; background: #1d1d1b; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.tn-red { position: relative; }

@media (hover: hover) {
    /* Escondidas hasta pasar el puntero (o llegar con el teclado): ocupan el sitio del rayo */
    .tn-compartir-opciones { position: absolute; top: 50%; right: 0; transform: translate(8px, -50%); padding: 3px; border-radius: 2em; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; }
    .tn-nota:hover .tn-compartir-opciones, .tn-nota:focus-within .tn-compartir-opciones { opacity: 1; visibility: visible; transform: translate(0, -50%); }
    .tn-nota:hover .tn-marca, .tn-nota:focus-within .tn-marca { opacity: 0; }
    .tn-marca { transition: opacity .18s; }
}
@media (hover: none) {
    .tn-marca { display: none; }
    .tn-compartir-abrir { display: grid; }
    .tn-compartir-opciones { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; padding: 4px; border-radius: 2em; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s; }
    .tn-compartir.abierto .tn-compartir-opciones { opacity: 1; visibility: visible; transform: none; }
}

/* Carrusel con flechas y puntos (js/toro-notas.js) */
.tn-bloque-acciones { display: flex; align-items: center; gap: 14px; }
.tn-flechas { display: inline-flex; gap: 8px; }
.tn-flechas[hidden], .tn-puntos[hidden] { display: none; }
.tn-flecha { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s, opacity .2s; }
.tn-flecha:hover:not(:disabled), .tn-flecha:focus-visible { border-color: #fd3f00; background: #fd3f00; transform: scale(1.06); box-shadow: 0 6px 16px rgba(253, 63, 0, .45); }
.tn-flecha:disabled { opacity: .3; cursor: default; }
.tn-bloque .tn-carrusel { scroll-behavior: smooth; scrollbar-width: none; }
.tn-bloque .tn-carrusel::-webkit-scrollbar { display: none; }
.tn-bloque .tn-carrusel:focus-visible { outline: 2px solid #fd3f00; outline-offset: 4px; border-radius: 16px; }
.tn-puntos { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.tn-punto { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .3); cursor: pointer; transition: width .25s, background-color .25s; }
.tn-punto:hover { background: rgba(255, 255, 255, .6); }
.tn-punto.activo { width: 26px; background: #fd3f00; }
@media (max-width: 600px) {
    .tn-bloque-cabeza { flex-wrap: wrap; }
    .tn-flecha { width: 34px; height: 34px; }
}
