/* ================================================
   DIGI - INDEX CSS - VERSIÓN MODERNA Y ELEGANTE
   ================================================ */

/* Variables de Colores */
:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --primary-light: #a29bfe;
  --accent: #74b9ff;
  --accent-light: #81ecec;
  --text-dark: #2d3436;
  --text-gray: #636e72;
  --text-light: #b2bec3;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
    sans-serif;
  background: radial-gradient(
      ellipse at top,
      rgba(99, 102, 241, 0.3) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at bottom,
      rgba(139, 92, 246, 0.25) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, #1a1534 0%, #2d1b4e 30%, #3d2463 60%, #2d1b4e 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Fondo estático con patrón sutil mejorado */
.particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(
      circle at 15% 25%,
      rgba(139, 92, 246, 0.2) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(168, 85, 247, 0.15) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(99, 102, 241, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      1.5px 1.5px at 30% 20%,
      rgba(255, 255, 255, 0.8),
      transparent
    ),
    radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 50% 70%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(
      1.5px 1.5px at 20% 80%,
      rgba(255, 255, 255, 0.5),
      transparent
    ),
    radial-gradient(1px 1px at 85% 30%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 40% 90%, rgba(255, 255, 255, 0.5), transparent);
  background-size: 100% 100%, 100% 100%, 100% 100%, 400px 400px, 350px 350px,
    300px 300px, 450px 450px, 380px 380px, 320px 320px;
  opacity: 0.7;
}

/* Estrellas con parpadeo muy sutil */
.particles-bg::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      1px 1px at 45% 35%,
      rgba(255, 255, 255, 0.9),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 60% 60%,
      rgba(255, 255, 255, 0.7),
      transparent
    ),
    radial-gradient(1px 1px at 25% 55%, rgba(255, 255, 255, 0.6), transparent);
  background-size: 380px 380px;
  animation: gentleTwinkle 5s ease-in-out infinite;
}

/* Animación super ligera - solo opacidad */
@keyframes gentleTwinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

/* Brillo sutil en la parte inferior */
body::before {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(
    to top,
    rgba(139, 92, 246, 0.15) 0%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* Textura muy sutil de puntos */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px
  );
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
}

/* Logo Municipalidad Flotante */
.muni-logo {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: white;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  max-width: 200px;
}

.muni-logo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.muni-logo img {
  height: 45px;
  width: auto;
  display: block;
  max-width: 100%;
}

/* Header con Acceso */
.header {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 250px;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.login-btn i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Container Principal */
.main-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 80px;
  position: relative;
  z-index: 1;
}

.content-area {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  margin-bottom: 30px;
}

.logo-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4);
  animation: logoFloat 4s ease-in-out infinite;
  position: relative;
}

/* Animación super ligera - solo translateY */
@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.logo-circle::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.3);
}

.logo-circle i {
  font-size: 3.5rem;
  color: white;
}

.main-title {
  font-size: 5.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  letter-spacing: 3px;
}

.title-letter {
  display: inline-block;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
    0 0 30px rgba(139, 92, 246, 0.7), 0 3px 10px rgba(0, 0, 0, 0.4);
  animation: letterBounce 3s ease-in-out infinite;
  will-change: transform;
}

/* Delays individuales para efecto cascada */
.title-letter:nth-child(1) {
  animation-delay: 0s;
}
.title-letter:nth-child(2) {
  animation-delay: 0.1s;
}
.title-letter:nth-child(3) {
  animation-delay: 0.2s;
}
.title-letter:nth-child(4) {
  animation-delay: 0.3s;
}
.title-letter:nth-child(6) {
  animation-delay: 0.4s;
}
.title-letter:nth-child(7) {
  animation-delay: 0.5s;
}
.title-letter:nth-child(8) {
  animation-delay: 0.6s;
}

.title-separator {
  display: inline-block;
  color: #ffffff;
  font-weight: 200;
  margin: 0 10px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 3px 8px rgba(0, 0, 0, 0.4);
  animation: separatorGlow 2s ease-in-out infinite;
}

/* Animación SUPER simplificada - solo translateY */
@keyframes letterBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* Solo opacidad para el separador */
@keyframes separatorGlow {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

.title-highlight {
  position: relative;
  display: inline-block;
}

.main-subtitle {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 25px;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.main-description {
  font-size: 1.1rem;
  color: #1f2937;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.97);
  padding: 20px 30px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

/* Botones de Acción */
.action-section {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* Efecto brillo */
.action-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
}

.action-btn:hover::before {
  left: 100%;
}

.btn-primary-action {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: 2px solid transparent;
}

.btn-primary-action:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-action {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline-action:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.action-btn i {
  font-size: 1.4rem;
}

/* Botón principal de Seguimiento: versión azul */
.action-btn-main {
  cursor: pointer;
  border-radius: 999px;
  padding-inline: 42px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 2px solid #60a5fa;
  text-align: center;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.45);
}

/* Icono del botón */
.action-btn-main i {
  color: #bfdbfe; /* azul clarito para el icono */
}

/* Hover / focus (más clarito, pero sin glow exagerado) */
.action-btn-main:hover,
.action-btn-main:focus-visible {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.55);
}

/* Cómo Funciona */
.how-it-works {
  margin-bottom: 80px;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.section-title i {
  color: var(--accent-light);
  font-size: 2rem;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.step-item {
  background: rgba(255, 255, 255, 0.9);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.step-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.step-icon i {
  font-size: 2.5rem;
  color: white;
}

.step-number {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.step-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.step-description {
  color: var(--text-gray);
  line-height: 1.7;
  font-size: 1rem;
}

/* Cards de Información */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.info-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 35px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  text-align: center;
  border-top: 4px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.5);
}

.card-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent-light)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon i {
  font-size: 2rem;
  color: var(--primary);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.card-text {
  color: var(--text-gray);
  line-height: 1.7;
}

/* Sección de Ayuda */
.help-section {
  margin-bottom: 60px;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.help-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 50px 40px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.help-box i {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.help-box h3 {
  font-size: 2rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.help-box p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

.contact-info {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cuadritos de contacto (teléfono y correo) */
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-wrap: wrap; /* permite que el texto haga salto de línea */
  word-break: break-word; /* por si el correo es muy largo */
  text-align: left;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.contact-link i {
  font-size: 1.2rem;
  min-width: 20px;
  text-align: center;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--text-dark), #1e272e);
  color: white;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}

.footer-section h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.footer-section p {
  opacity: 0.9;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-section i {
  color: var(--accent-light);
}

/* Responsive */
@media (max-width: 768px) {
  .muni-logo {
    top: 10px;
    left: 10px;
    padding: 8px 12px;
  }

  .muni-logo img {
    height: 35px;
  }

  .header {
    top: 10px;
    right: 10px;
  }

  .login-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .login-btn span {
    display: none;
  }

  .main-title {
    font-size: 3.2rem;
    gap: 8px;
    letter-spacing: 2px;
  }

  .main-subtitle {
    font-size: 1.1rem;
  }

  .main-description {
    font-size: 0.95rem;
    padding: 16px 22px;
  }

  .action-section {
    flex-direction: column;
    align-items: stretch;
  }

  .action-btn {
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
    flex-direction: column;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 80px 15px 60px;
  }

  .logo-circle {
    width: 100px;
    height: 100px;
  }

  .logo-circle i {
    font-size: 3rem;
  }

  .main-title {
    font-size: 2.3rem;
    gap: 5px;
    letter-spacing: 1px;
  }

  .title-letter {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(139, 92, 246, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .main-subtitle {
    font-size: 0.95rem;
  }

  .main-description {
    font-size: 0.85rem;
    padding: 14px 18px;
  }

  .help-box {
    padding: 35px 25px;
  }

  /* En pantallas muy chicas ocultamos el tooltip para que no estorbe */
  .action-btn-main::after {
    display: none;
  }
}

/* Ajustes finos para móviles muy pequeños (320–375px) */
@media (max-width: 400px) {
  .help-box {
    padding: 32px 18px;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .contact-link {
    width: 100%;
    max-width: 270px;
    margin: 0 auto;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .contact-link i {
    font-size: 1.05rem;
  }
}
