/**
 * =====================================================================================================================
 * Archivo   : /cms/assets/css/cms-tematicas.css
 * Sistema   : CMS del Periódico Oficial del Estado de Hidalgo (POEH)
 * Propósito : Estilos de las TEMÁTICAS DE FECHAS ESPECIALES: capas a pantalla completa que dejan pasar los clics,
 *             serie de foquitos navideños en el contorno (con cable y brillo intermitente), presentación central del
 *             aniversario / año nuevo / independencia y botón flotante de música.
 *             Con «reducir movimiento» del sistema no se anima nada (además el JavaScript no dibuja las capas).
 *
 * BITÁCORA DE CAMBIOS
 *   2026-11-24 | v1.0.0 | Creación del archivo (fase 5).
 *   2026-11-24 | v1.0.1 | Los fuegos se dibujan dentro de la presentación, detrás de la tarjeta (una sola capa fija).
 * =====================================================================================================================
 */

/* Capas ------------------------------------------------------------------------------------------------------------ */
.tm-capa { position: fixed; inset: 0; z-index: 880; pointer-events: none; }
.tm-capa canvas { display: block; }
.tm-presentacion .tm-fuegos { position: absolute; inset: 0; z-index: 0; } /* Dentro de la presentación, detrás de la tarjeta. */
.tm-presentacion .tm-tarjeta { position: relative; z-index: 1; }
.tm-saliendo { opacity: 0 !important; }

/* Navidad: serie de foquitos ------------------------------------------------------------------------------------- */
.tm-luces { z-index: 885; }
.tm-serie { position: absolute; display: flex; justify-content: space-around; align-items: center; }
.tm-serie::before { content: ''; position: absolute; background: #233523; border-radius: 2px; }
.tm-arriba, .tm-abajo { left: 0; right: 0; height: 22px; }
.tm-arriba { top: 0; } .tm-abajo { bottom: 0; }
.tm-arriba::before, .tm-abajo::before { left: 0; right: 0; height: 2px; top: 4px; }
.tm-abajo::before { top: auto; bottom: 4px; }
.tm-izquierda, .tm-derecha { top: 22px; bottom: 22px; width: 22px; flex-direction: column; }
.tm-izquierda { left: 0; } .tm-derecha { right: 0; }
.tm-izquierda::before, .tm-derecha::before { top: 0; bottom: 0; width: 2px; left: 4px; }
.tm-derecha::before { left: auto; right: 4px; }
.tm-foco { position: relative; width: 10px; height: 15px; border-radius: 50% 50% 45% 45%; background: var(--tm-color); opacity: .35;
    animation: tm-brillo var(--tm-velocidad, 1.4s) ease-in-out infinite alternate; }
.tm-foco::before { content: ''; position: absolute; left: 2px; top: -4px; width: 6px; height: 5px; background: #4b5a4b; border-radius: 2px; }
.tm-arriba .tm-foco { top: 6px; } .tm-abajo .tm-foco { bottom: 6px; transform: rotate(180deg); }
.tm-izquierda .tm-foco { left: 6px; transform: rotate(-90deg); } .tm-derecha .tm-foco { right: 6px; transform: rotate(90deg); }
.tm-rojo { --tm-color: #ff2d3f; } .tm-verde { --tm-color: #23d160; } .tm-amarillo { --tm-color: #ffe14d; } .tm-azul { --tm-color: #3fa7ff; } .tm-dorado { --tm-color: #ffb347; }
@keyframes tm-brillo {
    0% { opacity: .3; box-shadow: none; }
    100% { opacity: 1; box-shadow: 0 0 8px 3px var(--tm-color), 0 0 16px 6px color-mix(in srgb, var(--tm-color) 40%, transparent); }
}
.tm-nieve { z-index: 884; }

/* Presentación central -------------------------------------------------------------------------------------------- */
.tm-presentacion { position: fixed; inset: 0; z-index: 970; display: flex; align-items: center; justify-content: center; padding: 1rem;
    background: radial-gradient(ellipse at 50% 35%, rgba(40, 12, 30, .78), rgba(6, 3, 14, .93)); /* Cielo nocturno: los fuegos resaltan. */ animation: tm-entrar .6s ease-out both; transition: opacity .6s; cursor: pointer; }
.tm-tarjeta { cursor: default; text-align: center; max-width: 92vw; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.tm-ondeando { max-width: 80vw; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); }
.tm-texto { margin: 0; font-size: clamp(1.4rem, 4.2vw, 2.6rem); font-weight: 800; color: #fff; text-shadow: 0 3px 14px rgba(0, 0, 0, .7), 0 0 30px rgba(188, 149, 91, .6); line-height: 1.2; }
.tm-acciones { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.tm-boton { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1.2rem; border-radius: 30px; border: 2px solid #BC955B; background: #691b31; color: #fff;
    font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.tm-boton:hover, .tm-boton:focus-visible { background: #A02142; }
.tm-boton-sec { background: rgba(255, 255, 255, .92); color: #691b31; }
.tm-boton-sec:hover, .tm-boton-sec:focus-visible { background: #fff; }
@keyframes tm-entrar { from { opacity: 0; } to { opacity: 1; } }

/* Botón de música --------------------------------------------------------------------------------------------------- */
.tm-musica { position: fixed; left: 18px; bottom: 74px; z-index: 900; display: inline-flex; align-items: center; gap: .5rem; max-width: 260px; padding: .5rem .9rem;
    border-radius: 30px; border: 2px solid var(--pub-dorado, #BC955B); background: #fff; color: var(--pub-guinda, #691b31); font: inherit; font-size: .85rem; font-weight: 700;
    cursor: pointer; box-shadow: 0 8px 22px rgba(40, 20, 28, .25); }
.tm-musica span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-musica.sonando { background: var(--pub-guinda, #691b31); color: #fff; }
.tm-musica.sonando i { animation: tm-pulso 1s ease-in-out infinite; }
@keyframes tm-pulso { 50% { transform: scale(1.25); } }

@media (max-width: 575.98px) {
    .tm-arriba, .tm-abajo { height: 18px; }
    .tm-foco { width: 8px; height: 12px; }
    .tm-musica span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .tm-foco, .tm-musica.sonando i, .tm-presentacion { animation: none; opacity: 1; }
}
@media print { .tm-capa, .tm-presentacion, .tm-musica { display: none !important; } }
