/* 
  Agencia InfoVD - Sistema de Diseño 
  Estilo: Moderno, Tecnológico, Premium
*/

:root {
  /* Paleta de Colores */
  --fondo-profundo: #050811;
  --fondo-tarjeta: rgba(255, 255, 255, 0.03);
  --primario: #00E5FF;
  --secundario: #7928CA;
  --texto-principal: #FFFFFF;
  --texto-secundario: #94A3B8;
  --gradiente-acentos: linear-gradient(135deg, #00E5FF 0%, #7928CA 100%);

  /* Tipografía */
  --fuente-base: 'Inter', system-ui, -apple-system, sans-serif;

  /* Tema Claro (Premium) */
  --fondo-claro: #F8FAFC;
  --texto-oscuro-puro: #0F172A;
  --texto-oscuro-suave: #475569;
  --borde-claro: rgba(15, 23, 42, 0.1);
}

.seccion-clara {
  background-color: var(--fondo-claro);
  color: var(--texto-oscuro-puro);
}

.seccion-clara h2 {
  color: var(--texto-oscuro-puro);
}

.seccion-clara .tarjeta-servicio {
  background: white;
  border: 1px solid var(--borde-claro);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.seccion-clara .tarjeta-servicio:hover {
  background: white;
  border-color: var(--primario);
  box-shadow: 0 20px 40px rgba(0, 229, 255, 0.15);
}

.seccion-clara .tarjeta-servicio h3,
.seccion-clara .tarjeta-servicio h4 {
  color: var(--texto-oscuro-puro);
}

.seccion-clara .tarjeta-servicio p {
  color: var(--texto-oscuro-suave);
}

.seccion-clara .tarjeta-servicio::after {
  color: var(--secundario);
}

.seccion-clara input,
.seccion-clara textarea {
  background: white !important;
  border-color: var(--borde-claro) !important;
  color: var(--texto-oscuro-puro) !important;
}

.seccion-clara input::placeholder,
.seccion-clara textarea::placeholder {
  color: var(--texto-oscuro-suave);
  opacity: 0.7;
}

.seccion-clara p {
  color: var(--texto-oscuro-suave);
}

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

body {
  background-color: var(--fondo-profundo);
  color: var(--texto-principal);
  font-family: var(--fuente-base);
  line-height: 1.6;
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: var(--fondo-profundo);
}

::-webkit-scrollbar-thumb {
  background: var(--secundario);
  border-radius: 4px;
}

/* Navegación */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s ease;
  background: rgba(5, 8, 17, 0.85);
  backdrop-filter: blur(10px);
}

.header-top {
  padding: 0.5rem 10%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--texto-secundario);
}

.contact-info-header i {
  color: var(--primario);
}

.contact-info-header b {
  color: white;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 10%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 80px;
  width: auto;
}

.logo span {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradiente-acentos);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--texto-secundario);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primario);
}

/* Hero Section - Estilo Digital Soul */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 140px 10% 100px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(121, 40, 202, 0.05) 0%, transparent 40%);
}

.hero-content {
  flex: 1;
  z-index: 10;
  max-width: 650px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.2rem;
  color: var(--texto-secundario);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

/* Sistema Orbital */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100%;
}

.orbital-container {
  position: relative;
  width: 450px;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbita {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: border 0.3s ease;
}

.orbita-1 {
  width: 220px;
  height: 220px;
  animation: rotate 20s linear infinite;
}

.orbita-2 {
  width: 340px;
  height: 340px;
  animation: rotate 35s linear infinite reverse;
}

.orbita-3 {
  width: 480px;
  height: 480px;
  animation: rotate 50s linear infinite;
}

.orbita-4 {
  width: 620px;
  height: 620px;
  animation: rotate 65s linear infinite reverse;
}

.icono-orbita {
  position: absolute;
  width: 50px;
  height: 50px;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
  transition: all 0.3s ease;
}

.icono-orbita img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icono-orbita:hover {
  transform: scale(1.2) !important;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

/* Contra-rotación para que el icono siempre esté derecho */
.orbita-1 .icono-orbita {
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  animation: counter-rotate 20s linear infinite;
}

.orbita-2 .icono-orbita:nth-child(1) {
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  animation: counter-rotate 35s linear infinite reverse;
}

.orbita-2 .icono-orbita:nth-child(2) {
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  animation: counter-rotate 35s linear infinite reverse;
}

.orbita-3 .icono-orbita:nth-child(1) {
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  animation: counter-rotate 50s linear infinite;
}

.orbita-3 .icono-orbita:nth-child(2) {
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  animation: counter-rotate 50s linear infinite;
}

.orbita-4 .icono-orbita {
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  animation: counter-rotate 65s linear infinite reverse;
  color: #ff4b2b;
  /* Color distintivo para seguridad */
  font-size: 1.5rem;
}

.nucleo {
  width: 100px;
  height: 100px;
  background: white;
  /* Cambiado a blanco para que resalte el logo si tiene transparencia */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.3);
  z-index: 5;
  animation: pulse 4s ease-in-out infinite;
  overflow: hidden;
  /* Asegura que la imagen no se salga del círculo */
  border: 4px solid var(--primario);
  /* Añadimos un anillo de color primario */
}

.nucleo i {
  font-size: 3rem;
  color: white;
}

/* Fondo de Estrellas */
#contenedor-estrellas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.estrella {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--duration, 3s) infinite alternate;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes counter-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 70px rgba(0, 229, 255, 0.5);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }

  100% {
    opacity: 0.2;
    transform: scale(0.5);
  }
}

.btn-principal {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  background: var(--gradiente-acentos);
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-principal:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 229, 255, 0.3);
}

.btn-secundario {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  background: transparent;
  color: white;
  transition: all 0.3s ease;
}

.btn-secundario:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primario);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Secciones Generales */
section {
  padding: 100px 10%;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 4rem;
}

/* Grid de Servicios */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.tarjeta-servicio {
  background: var(--fondo-tarjeta);
  padding: 0;
  /* Quitamos el padding para la imagen */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.tarjeta-servicio:hover {
  transform: translateY(-10px);
  border-color: var(--primario);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.1);
}

.img-tarjeta {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.img-tarjeta img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tarjeta-servicio:hover .img-tarjeta img {
  transform: scale(1.1);
}

.tarjeta-cuerpo {
  padding: 2rem;
}

.tarjeta-servicio::after {
  content: 'Ver detalles';
  position: absolute;
  bottom: 1.2rem;
  right: 1.5rem;
  font-size: 0.8rem;
  color: var(--primario);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tarjeta-servicio:hover::after {
  opacity: 1;
}

/* Eliminamos estilos de iconos de tarjeta ya que usaremos imágenes */
.tarjeta-servicio i {
  display: none;
}

.tarjeta-servicio h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Modal de Detalles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 17, 0.9);
  backdrop-filter: blur(15px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.visible {
  display: flex !important;
  opacity: 1;
}

.modal-content {
  background: var(--fondo-profundo);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem;
  border-radius: 30px;
  max-width: 800px;
  width: 90%;
  position: relative;
  animation: modal-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-in {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--texto-secundario);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--primario);
}

.modal-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.img-modal {
  width: 100%;
  height: 250px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.img-modal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-header h3 {
  font-size: 2rem;
}

.modal-body ul {
  list-style: none;
  margin-top: 1.5rem;
}

.modal-body li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-body li::before {
  content: '→';
  color: var(--primario);
  font-weight: bold;
}

/* Imágenes de la Landing */
.img-contenedor {
  width: 100%;
  height: 400px;
  border-radius: 30px;
  margin-bottom: 4rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.img-contenedor img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  filter: brightness(0.7);
}

.img-contenedor:hover img {
  transform: scale(1.1);
  filter: brightness(0.9);
}

/* Parallax Video Container */
.parallax-contenedor {
  position: relative;
  width: 80%;
  max-width: 1200px;
  height: 450px;
  margin: -50px auto 100px;
  border-radius: 30px;
  overflow: hidden;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.parallax-imagen {
  position: absolute;
  top: -20%;
  /* Margen extra para el movimiento */
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  pointer-events: none;
  filter: brightness(0.6) contrast(1.1);
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(5, 8, 17, 0.4) 100%);
  pointer-events: none;
}

/* Footer Moderno */
footer {
  padding: 80px 10% 40px;
  background: #02040a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 60px;
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-col h4 i {
  background: var(--secundario);
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
}

.footer-col p {
  color: var(--texto-secundario);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--texto-secundario);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primario);
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--texto-secundario);
  text-decoration: none;
  font-size: 0.85rem;
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Responsividad */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    height: auto;
    padding: 140px 10% 60px;
    text-align: center;
  }

  .hero-content {
    margin-bottom: 4rem;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .orbital-container {
    transform: scale(0.8);
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  section {
    padding: 60px 5%;
  }

  .orbital-container {
    transform: scale(0.6);
  }

  .hero-visual {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .orbital-container {
    transform: scale(0.45);
  }

  .hero-visual {
    height: 300px;
  }
}

/* Botón WhatsApp Flotante */
.btn-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-whatsapp:hover {
  transform: scale(1.1);
  background-color: #20b858;
}

/* Botón Volver Arriba */
.btn-scroll-top {
  position: fixed;
  bottom: 105px;
  /* Por encima del botón de WhatsApp */
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--gradiente-acentos);
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  transform: translateY(20px);
}

.btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 229, 255, 0.4);
}

@media (max-width: 480px) {
  .btn-whatsapp {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 25px;
  }

  .btn-scroll-top {
    bottom: 85px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

/* Preloader estilo Digital Soul */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.loader-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.5%;
  background: #050811;
  transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader-top {
  top: 0;
}

.loader-bottom {
  bottom: 0;
}

.loader-content {
  position: relative;
  z-index: 10001;
  text-align: center;
  opacity: 0;
  transform: scale(0.8);
  animation: fade-in-loader 0.8s ease forwards 0.3s;
}

.loader-logo {
  height: 100px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.3));
}

.loader-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 10px;
  color: white;
  margin-top: 10px;
}

@keyframes fade-in-loader {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Clases de salida al cargar */
#preloader.loaded .loader-top {
  transform: translateY(-100%);
}

#preloader.loaded .loader-bottom {
  transform: translateY(100%);
}

#preloader.loaded .loader-content {
  opacity: 0;
  transform: scale(1.2);
  transition: all 0.6s ease;
}

/* Bloqueo de scroll mientras carga */
body.loading {
  overflow: hidden;
}