/* ============================================================
   MODAL DE GANADORES + BOTÓN FLOTANTE - HACKATÓN INNOVA360
   Archivo nuevo e independiente: no modifica estilos existentes.
   ============================================================ */

.hk360-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hk360-overlay.hk360-show {
  opacity: 1;
  visibility: visible;
}

.hk360-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  max-height: min(88vh, 680px);
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.32s ease;
}

.hk360-overlay.hk360-show .hk360-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.hk360-modal-header {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 26px 28px 56px;
  color: #fff;
  background: linear-gradient(135deg, #303844 0%, #1d2530 100%);
}

.hk360-modal-header::after {
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 170px;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(191, 208, 225, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(191, 208, 225, 0.07), 0 0 0 36px rgba(191, 208, 225, 0.04);
}

.hk360-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hk360-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

.hk360-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #bfd0e1;
  background: rgba(191, 208, 225, 0.16);
  border-radius: 30px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hk360-modal-header h2 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.hk360-modal-header h2 span {
  color: #bfd0e1;
}

.hk360-modal-header p {
  margin: 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13.5px;
  line-height: 1.6;
}

.hk360-modal-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin-top: -40px;
  padding: 0 24px 24px;
  overflow-y: auto;
}

.hk360-winners {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.hk360-winner-card {
  position: relative;
  display: flex;
  overflow: hidden;
  gap: 12px;
  padding: 14px 16px 14px 14px;
  text-align: left;
  background: #fff;
  border: 1px solid #e1e5eb;
  border-left: 4px solid #f5b700;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 44, 54, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hk360-winner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(37, 44, 54, 0.18);
}

.hk360-winner-card::before {
  position: absolute;
  inset: 0 0 auto auto;
  width: 90px;
  height: 90px;
  content: "";
  background: radial-gradient(circle at 100% 0%, rgba(245, 183, 0, 0.22), transparent 70%);
  pointer-events: none;
}

.hk360-winner-card .hk360-trophy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #ffd166, #ff8a00);
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(255, 138, 0, 0.4);
}

.hk360-winner-card-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.hk360-winner-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.hk360-winner-card-top strong {
  color: #252c36;
  font-size: 14.5px;
  font-weight: 800;
}

.hk360-winner-badge {
  display: inline-block;
  padding: 2px 9px;
  color: #916000;
  background: #fff3cf;
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hk360-winner-idea {
  margin: 0 0 6px;
  color: #3c4654;
  font-size: 12px;
  line-height: 1.55;
}

.hk360-winner-idea strong {
  color: #1d2530;
}

.hk360-winner-members {
  margin: 0;
  color: #76828f;
  font-size: 11px;
  line-height: 1.55;
}

.hk360-winner-members b {
  color: #44505f;
  font-weight: 700;
}

.hk360-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
  color: #66717f;
  font-size: 12px;
}

.hk360-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hk360-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hk360-btn-primary,
.hk360-btn-ghost {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hk360-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #303844, #1d2530);
  border: none;
  box-shadow: 0 10px 24px rgba(29, 37, 48, 0.35);
}

.hk360-btn-primary:hover {
  box-shadow: 0 14px 30px rgba(29, 37, 48, 0.45);
  transform: translateY(-2px);
}

.hk360-btn-ghost {
  flex: 0 0 auto;
  color: #44505f;
  background: #fff;
  border: 1px solid #e1e5eb;
}

.hk360-btn-ghost:hover {
  background: #f5f6f8;
  border-color: #cdd6df;
}

/* ---------------- BOTÓN FLOTANTE ---------------- */
/* Apilado sobre el botón de noticias (bottom:65px; right:24px; 60x60) para quedar accesible del lado derecho */
.hk360-fab {
  position: fixed;
  right: 24px;
  bottom: 140px;
  z-index: 9500;
  display: none;
  flex-direction: row-reverse;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hk360-fab.hk360-fab-visible {
  display: inline-flex;
  animation: hk360-fab-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.hk360-fab-circle-wrap {
  position: relative;
  flex: 0 0 auto;
}

.hk360-fab-tag {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 3;
  padding: 6px 14px;
  color: #fff;
  background: linear-gradient(135deg, #ff5a5f, #c81d3b);
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(200, 29, 59, 0.55);
  transform: translateX(-50%) rotate(-6deg);
  animation: hk360-tag-wiggle 2.6s ease-in-out infinite;
}

.hk360-fab-spark {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 3;
  width: 22px;
  height: 22px;
  background: #ff3b3b;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 59, 59, 0.9);
  animation: hk360-spark-pulse 1.4s ease-in-out infinite;
}

.hk360-fab-ring {
  position: absolute;
  inset: -12px;
  z-index: 0;
  border: 3px dashed rgba(255, 138, 0, 0.75);
  border-radius: 50%;
  animation: hk360-ring-spin 7s linear infinite;
}

.hk360-fab-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ffd166, #ff8a00 55%, #ff5a00);
  border: 5px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  font-size: 54px;
  box-shadow: 0 18px 46px rgba(255, 106, 0, 0.65), 0 0 0 8px rgba(255, 138, 0, 0.2);
  cursor: pointer;
  animation: hk360-bounce 2.6s ease-in-out infinite, hk360-glow 1.8s ease-in-out infinite;
}

.hk360-fab-circle > span {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.25));
}

.hk360-fab-circle::before,
.hk360-fab-circle::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 3px solid rgba(255, 170, 60, 0.8);
  border-radius: 50%;
  animation: hk360-ping 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hk360-fab-circle::after {
  animation-delay: 0.95s;
}

.hk360-fab-shine {
  position: absolute;
  top: -60%;
  left: -60%;
  z-index: 2;
  width: 45%;
  height: 220%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
  transform: rotate(20deg);
  animation: hk360-shine 2.6s ease-in-out infinite;
  pointer-events: none;
}

.hk360-fab-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 24px;
  color: #fff;
  background: linear-gradient(135deg, #ff8a00, #c81d3b);
  border-radius: 28px;
  font-size: 16.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(200, 29, 59, 0.45);
  animation: hk360-label-nudge 2.6s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hk360-fab:hover .hk360-fab-label,
.hk360-fab:focus-visible .hk360-fab-label {
  box-shadow: 0 14px 30px rgba(200, 29, 59, 0.55);
  transform: scale(1.06);
}

.hk360-fab:hover .hk360-fab-circle,
.hk360-fab:focus-visible .hk360-fab-circle {
  box-shadow: 0 20px 46px rgba(255, 106, 0, 0.75), 0 0 0 8px rgba(255, 138, 0, 0.22);
  transform: scale(1.1) rotate(-4deg);
}

@keyframes hk360-fab-in {
  from { transform: translateY(30px) scale(0.6); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes hk360-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  10% { transform: translateY(-14px) scale(1.04); }
  20% { transform: translateY(0) scale(1); }
  26% { transform: translateY(-6px) scale(1.02); }
  32% { transform: translateY(0) scale(1); }
}

@keyframes hk360-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes hk360-shine {
  0% { transform: translateX(-120%) rotate(20deg); }
  45%, 100% { transform: translateX(220%) rotate(20deg); }
}

@keyframes hk360-tag-wiggle {
  0%, 100% { transform: translateX(-50%) rotate(-6deg); }
  50% { transform: translateX(-50%) rotate(4deg); }
}

@keyframes hk360-spark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

@keyframes hk360-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hk360-label-nudge {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-4px); }
  20% { transform: translateX(0); }
}

@keyframes hk360-ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 560px) {
  .hk360-winner-card { flex-direction: column; }
  .hk360-cta-row { flex-direction: column; }
  .hk360-btn-ghost { width: 100%; }
  .hk360-fab-label { display: none; }
  .hk360-fab { right: 16px; bottom: 128px; }
  .hk360-fab-circle { width: 96px; height: 96px; font-size: 44px; }
  .hk360-fab-ring { inset: -10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hk360-fab-circle,
  .hk360-fab-circle::before,
  .hk360-fab-circle::after,
  .hk360-fab-shine,
  .hk360-fab-ring,
  .hk360-fab-label,
  .hk360-fab-spark,
  .hk360-fab-tag {
    animation: none !important;
  }
}
