/* ============================================
   COLTEC ISP - Estilos Personalizados
   Tema: Fibra óptica, tecnología, confianza
   ============================================ */

/* Variables de color (paleta del logo COLTEC: rojo, caqui/dorado, negro, acentos cian) */
:root {
  --color-primary-50: #fdf3f3;
  --color-primary-100: #fae4e4;
  --color-primary-200: #f5c9c9;
  --color-primary-300: #eda3a3;
  --color-primary-400: #e06b6b;
  --color-primary-500: #cc3a3a;
  --color-primary-600: #a01010;
  --color-primary-700: #850d0d;
  --color-primary-800: #6e0f0f;
  --color-primary-900: #5c0f0f;
  --color-gold-300: #cdc69e;
  --color-gold-400: #b0a67c;
  --color-gold-500: #968b5e;
  --color-gold-600: #7a7048;
  --color-fiber-400: #22d3ee;
  --color-fiber-500: #06b6d4;
  --color-fiber-600: #0891b2;
  --color-dark-900: #0f172a;
  --color-dark-800: #1e293b;
  --color-dark-700: #334155;
  --color-light: #f8fafc;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-light);
  color: var(--color-dark-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* Utilidades de tipografía */
.font-display {
  font-family: var(--font-main);
  letter-spacing: -0.02em;
}

/* Gradientes */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-primary-700) 0%, var(--color-primary-500) 50%, var(--color-gold-500) 100%);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-dark {
  background: linear-gradient(180deg, var(--color-dark-900) 0%, var(--color-dark-800) 100%);
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-light {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
  }
  50% {
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.45);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s ease-out forwards;
}

.animate-pulse-glow {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Utilidades de delay */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Estados hover */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.18);
}

.hover-glow {
  transition: box-shadow 0.25s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 24px rgba(160, 16, 16, 0.35);
}

/* Botón WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(18, 140, 126, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(18, 140, 126, 0.45);
}

@media (min-width: 768px) {
  .whatsapp-float {
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
  }
}

/* Header sticky */
.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* Acordeón */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.accordion-item.active .accordion-content {
  max-height: 500px;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

/* Tarjetas de planes */
.plan-card {
  position: relative;
  border-radius: 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.15);
  border-color: var(--color-primary-300);
}

.plan-card.featured {
  border-color: var(--color-fiber-500);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15);
}

.plan-card.featured:hover {
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18), 0 0 0 2px rgba(6, 182, 212, 0.25);
}

.plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--color-fiber-500), var(--color-primary-500));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-bottom-left-radius: 0.75rem;
}

/* Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background: white;
  border-radius: 1rem;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-backdrop.active .modal-panel {
  transform: scale(1);
}

/* Navegación mobile */
.mobile-menu {
  position: fixed;
  inset: 0;
  top: 72px;
  background: white;
  z-index: 35;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Speedtest container */
.speedtest-container {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

/* Sección de bloqueo */
.blocked-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

/* Enlaces legales */
.legal-link {
  color: var(--color-primary-600);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.legal-link:hover {
  color: var(--color-primary-800);
}

/* Utilidades de visibilidad para animaciones */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mapa de cobertura (Leaflet) */
.leaflet-container {
  position: relative;
  z-index: 0;
  font-family: var(--font-main);
}

.map-label {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.map-label::before {
  display: none; /* sin flecha del tooltip */
}

.map-label--sede {
  background: var(--color-primary-600);
  border-color: var(--color-primary-700);
  color: #ffffff;
}
