/**
 * Estilos personalizados y utilidades de Plataforma Exalumnos Maristas
 */

:root {
  --color-marista-primary: #0B2545;
  --color-marista-secondary: #134074;
  --color-marista-gold: #D4AF37;
  --color-marista-gold-light: #F3C64F;
  --color-marista-gold-dark: #996515;
  --color-marista-accent: #EE6C4D;
  --color-marista-bg-light: #F8FAFC;
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Fuentes y ajustes globales */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1E293B;
  background-color: #F8FAFC;
}

/* Tipografía de títulos */
h1, h2, h3, .font-serif-title {
  font-family: 'Montserrat', 'Inter', sans-serif;
}

/* Navbar con efecto glassmorphism */
.navbar-glass {
  background: rgba(11, 37, 69, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar-scrolled {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
}

/* =====================================================================
   MÓDULO DE ETIQUETADO INTERACTIVO (FOTO_TAGS)
   ===================================================================== */

.photo-tagger-container {
  position: relative;
  display: inline-block;
  overflow: hidden;
  user-select: none;
  max-width: 100%;
}

.photo-tagger-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* Pin interactivo sobre la foto */
.tag-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.9);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 0 4px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 20;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}

.tag-pin::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1.5px solid #F3C64F;
  animation: pulsePin 2s infinite;
}

@keyframes pulsePin {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.tag-pin:hover {
  transform: translate(-50%, -50%) scale(1.35);
  background: #EE6C4D;
  z-index: 30;
}

/* Tooltip con nombre del alumno */
.tag-tooltip {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(11, 37, 69, 0.95);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  border: 1px solid rgba(212, 175, 55, 0.4);
  z-index: 40;
}

.tag-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(11, 37, 69, 0.95) transparent transparent transparent;
}

.tag-pin:hover .tag-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Modo creación de etiqueta activo */
.photo-tagger-active {
  cursor: crosshair !important;
}

.tag-temp-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EE6C4D;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 15px rgba(238, 108, 77, 0.8);
  z-index: 25;
  animation: bounceMarker 0.4s ease;
}

@keyframes bounceMarker {
  0% { transform: translate(-50%, -50%) scale(0.3); }
  60% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Marcadores y popover de etiquetado administrativo */
.etiquetado-marcador {
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.etiquetado-marcador:hover {
  transform: translate(-50%, -50%) scale(1.4) !important;
  background-color: #ef4444 !important;
}

.etiquetado-popover {
  animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ===================================================================== */
.btn-whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
  color: white;
}

/* Badge de notificación en WhatsApp */
.btn-whatsapp-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #EF4444;
  border: 2px solid white;
  border-radius: 50%;
}

/* =====================================================================
   MODALES Y OVERLAYS
   ===================================================================== */
.modal-overlay {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease;
}

/* Transiciones de tarjetas */
.card-hover-effect {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-hover-effect:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(11, 37, 69, 0.12);
}

/* Estilos para timeline de promociones */
.promo-badge {
  background: linear-gradient(135deg, #0B2545, #134074);
  color: #F3C64F;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Estilos de impresión */
@media print {
  .no-print, .btn-whatsapp-float, header, footer, .admin-sidebar {
    display: none !important;
  }
}
