/*
  Autor: Ing. Walter Rodríguez
  Fecha: 2026-08-04
  Propósito: Hoja de estilos del menú Linktree para "Mirlanda Distribuidor" en subdominio Fuxion.
  Estilo: Fondo original nítido de la marca (Fuxion) visible, con animaciones SVG sutiles y efectos interactivos.
  Modificación: 2026-08-04 - Se agregaron animaciones SVG flotantes de fondo (hojas, moléculas y brillos), animación de respiración y destello (shimmer) en el botón de catálogo, y se ajustó el orden de apilamiento z-index.
  Versión: 1.0.4 (Cache-busting y animaciones premium)
*/

/* --- 1. Variables Globales y Reset --- */
:root {
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  
  /* Paleta de Colores de Marca y Redes */
  --color-whatsapp: #25D366;
  --color-tiktok: #010101;
  --color-instagram: #E1306C;
  --color-facebook: #1877F2;
  --color-youtube: #FF0000;
  --color-catalog: #0ea5e9;
  
  /* Variables de Transparencia de Tarjetas */
  --card-bg: rgba(15, 23, 42, 0.75); /* Tarjetas oscuras legibles sobre fondo blanco/verde */
  --card-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  background-color: #0b0f19;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* --- 2. Fondo del Monitor (Escritorio) --- */
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center;
  z-index: -2;
  filter: blur(12px) brightness(0.25); /* Desenfocado de fondo exterior en PC */
  transform: scale(1.05);
}

.background-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.4) 0%, rgba(11, 15, 25, 0.9) 100%);
  z-index: -1;
  pointer-events: none;
}

/* --- 3. Contenedor Celular (9:16) con Fondo Original Nítido --- */
.container {
  width: 100%;
  max-width: 430px;
  min-height: 860px; /* Proporción 9:18 típica */
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  animation: fadeIn 0.8s ease-out forwards;
  
  /* Carga del fondo original 100% nítido */
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  border-radius: 40px;
  padding: 0 24px 30px 24px;
  overflow: hidden;
}

/* Espaciador dinámico para el Logo Integrado en el Fondo */
.header-spacer {
  height: 275px; /* Empuja las tarjetas justo debajo de los iconos de Ciencia/Naturaleza en PC */
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Responsividad para Celulares (Fondo nítido a pantalla completa) */
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: flex-start;
  }
  
  .container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    min-height: 100vh;
    padding: 0 16px 20px 16px;
  }
  
  .header-spacer {
    height: 32.5vh; /* Ajuste dinámico de altura del logo en pantallas móviles reales */
  }
}

/* --- 4. Lista de Enlaces --- */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

/* Tarjeta de enlace oscura de alta legibilidad sobre el fondo blanco/gris de en medio */
.link-card {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px); /* Desenfoque sutil solo detrás de la tarjeta para legibilidad del texto */
  -webkit-backdrop-filter: blur(5px);
}

.link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  margin-right: 14px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.link-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  transition: all 0.3s ease;
}

.link-info {
  flex-grow: 1;
}

.link-info h2 {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  transition: color 0.3s ease;
}

.link-info p {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.3;
}

.link-arrow {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

/* --- 5. Hover y Efectos de Redes --- */
.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  background: rgba(15, 23, 42, 0.85);
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #fff;
}

/* WhatsApp */
.whatsapp-featured {
  border-color: rgba(37, 211, 102, 0.35);
  animation: breatheWhatsApp 3s infinite ease-in-out;
}

.whatsapp-featured:hover {
  border-color: var(--color-whatsapp);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.whatsapp-featured .link-icon {
  background: rgba(37, 211, 102, 0.15);
}

.whatsapp-featured:hover .link-icon {
  background: var(--color-whatsapp);
}

.whatsapp-featured:hover h2 {
  color: var(--color-whatsapp);
}

/* Catálogo Virtual - Modificado por Ing. Walter Rodríguez el 2026-08-04 con animación de respiración y shimmer */
.catalog-featured {
  border-color: rgba(14, 165, 233, 0.3);
  animation: pulseCatalog 2.5s infinite ease-in-out;
  position: relative;
  overflow: hidden;
}

.catalog-featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  animation: catalogShimmer 6s infinite ease-in-out;
}

.catalog-featured:hover {
  border-color: var(--color-catalog);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.45);
}

.catalog-featured .link-icon {
  background: rgba(14, 165, 233, 0.15);
}

.catalog-featured:hover .link-icon {
  background: var(--color-catalog);
}

.catalog-featured:hover h2 {
  color: var(--color-catalog);
}

.badge {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

/* TikTok Card */
.tiktok-card:hover {
  border-color: #ff0050;
  box-shadow: 0 8px 25px rgba(255, 0, 80, 0.2);
}

.tiktok-card:hover .link-icon {
  background: #000;
}

.tiktok-card:hover h2 {
  color: #ff0050;
}

/* Instagram Card */
.instagram-card:hover {
  border-color: var(--color-instagram);
  box-shadow: 0 8px 25px rgba(225, 48, 108, 0.25);
}

.instagram-card:hover .link-icon {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-card:hover h2 {
  color: var(--color-instagram);
}

/* Facebook Card */
.facebook-card:hover {
  border-color: var(--color-facebook);
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.25);
}

.facebook-card:hover .link-icon {
  background: var(--color-facebook);
}

.facebook-card:hover h2 {
  color: var(--color-facebook);
}

/* YouTube Card */
.youtube-card:hover {
  border-color: var(--color-youtube);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.25);
}

.youtube-card:hover .link-icon {
  background: var(--color-youtube);
}

.youtube-card:hover h2 {
  color: var(--color-youtube);
}

/* --- 6. Footer Corporativo --- */
.profile-footer {
  text-align: center;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: auto; /* Empuja el footer siempre al final */
  position: relative;
  z-index: 2;
}

.profile-footer p {
  margin-bottom: 4px;
}

.disclaimer {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
}

/* --- 7. Animaciones Keyframes --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breatheWhatsApp {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.45);
  }
}

/* --- 8. Contenedor y Animaciones de Fondo SVG ---
   Agregado por Ing. Walter Rodríguez el 2026-08-04 para crear ambiente premium y dinámico */
.menu-bg-svg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bg-svg-shape {
  position: absolute;
  pointer-events: none;
}

/* Brillo Cian */
.glow-cyan {
  top: 10%;
  left: -15%;
  width: 250px;
  height: 250px;
  filter: blur(8px);
  animation: pulseGlow 14s infinite ease-in-out;
}

/* Brillo Verde */
.glow-green {
  bottom: 5%;
  right: -20%;
  width: 300px;
  height: 300px;
  filter: blur(10px);
  animation: pulseGlow 18s infinite ease-in-out alternate;
}

/* Hoja flotante 1 */
.floating-leaf-1 {
  top: 38%;
  left: 5%;
  width: 32px;
  height: 32px;
  opacity: 0.35;
  transform-origin: center;
  animation: driftSlow1 24s infinite linear;
}

/* Hoja flotante 2 */
.floating-leaf-2 {
  bottom: 28%;
  right: 8%;
  width: 26px;
  height: 26px;
  opacity: 0.3;
  transform-origin: center;
  animation: driftSlow2 20s infinite linear;
}

/* Molécula de biotecnología */
.floating-molecule {
  top: 60%;
  right: -5%;
  width: 75px;
  height: 75px;
  opacity: 0.4;
  transform-origin: center;
  animation: driftSlow3 28s infinite linear;
}

/* --- 9. Keyframes Adicionales --- */

/* Animación de pulso para el brillo del fondo */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1) translate(0, 0);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.15) translate(10px, -10px);
  }
}

/* Rotación y traslación lenta 1 */
@keyframes driftSlow1 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(15px, -25px) rotate(180deg) scale(1.15);
  }
  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
  }
}

/* Rotación y traslación lenta 2 */
@keyframes driftSlow2 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1.1);
  }
  50% {
    transform: translate(-18px, 20px) rotate(-120deg) scale(0.9);
  }
  100% {
    transform: translate(0, 0) rotate(-360deg) scale(1.1);
  }
}

/* Rotación y traslación lenta 3 */
@keyframes driftSlow3 {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(10px, 30px) rotate(90deg);
  }
  100% {
    transform: translate(0, 0) rotate(180deg);
  }
}

/* Animación de respiración / pulso para el botón Catálogo */
@keyframes pulseCatalog {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: scale(1);
    border-color: rgba(14, 165, 233, 0.35);
  }
  50% {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    transform: scale(1.02);
    border-color: var(--color-catalog);
  }
}

/* Animación del shimmer / destello para el botón Catálogo */
@keyframes catalogShimmer {
  0% {
    left: -150%;
  }
  15%, 100% {
    left: 150%;
  }
}
