/* ===================================================
   DEVNOW.CL - Estilos principales
   =================================================== */

/* ══════════════════════════════════════════════════════
   RESET ANTI-WORDPRESS
   Neutraliza los estilos globales que WordPress inyecta
   cuando el sitio corre en un subdirectorio de WP.
   ══════════════════════════════════════════════════════ */

/* 1. Ocultar la barra de admin de WP si aparece */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* 2. Reset de body — WP/temas sobreescriben margin, padding, font, max-width */
html, html body {
  margin: 0 !important;
  padding: 0 !important;
  background: #0D0F1A !important;
  color: #E8EAFF !important;
  font-family: 'Inter', 'Segoe UI', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  overflow-x: hidden !important;
  max-width: none !important;
  width: 100% !important;
  -webkit-text-size-adjust: 100% !important;
}

/* 3. Neutralizar contenedores globales de Gutenberg / FSE */
.wp-site-blocks,
.entry-content,
.wp-block-template-part,
.site-content,
.site,
#page,
#content,
.wp-block-group,
.has-global-padding {
  max-width: none !important;
  padding-inline: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* 4. Reset headings — WP modifica tamaños, márgenes y colores */
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6 {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-family: 'Inter', 'Segoe UI', sans-serif !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  border: none !important;
  background: none !important;
}

/* 5. Reset links — WP añade color y text-decoration */
html body a {
  color: inherit !important;
  text-decoration: none !important;
}

/* 6. Reset párrafos, listas, imágenes */
html body p  { margin: 0 !important; padding: 0 !important; }
html body ul,
html body ol { margin: 0 !important; padding: 0 !important; list-style: none !important; }
html body img { max-width: 100%; display: block; border: none !important; box-shadow: none !important; }

/* 7. Reset inputs y botones */
html body button,
html body input,
html body textarea,
html body select {
  font-family: 'Inter', 'Segoe UI', sans-serif !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* 8. Neutralizar variables CSS de WP Global Styles que pueden filtrarse */
:root {
  --wp--style--global--content-size: none !important;
  --wp--style--global--wide-size: none !important;
}

/* ══════════════════════════════════════════════════════
   FIN RESET ANTI-WORDPRESS
   ══════════════════════════════════════════════════════ */

/* --- Variables y Reset --- */
:root {
  --blue: #1E3CEE;
  --blue-dark: #1530CC;
  --blue-light: #4F6FFF;
  --navy: #0D0F1A;
  --navy-2: #111428;
  --navy-3: #1A1E35;
  --text: #E8EAFF;
  --text-muted: #8A93C8;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #1E3CEE 0%, #5B21B6 100%);
  --gradient-dark: linear-gradient(135deg, #0D0F1A 0%, #111428 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(30,60,238,0.15);
  --shadow-lg: 0 8px 48px rgba(30,60,238,0.25);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Utilidades --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-tag {
  display: inline-block;
  background: rgba(30,60,238,0.15);
  color: var(--blue-light);
  border: 1px solid rgba(30,60,238,0.3);
  border-radius: 2rem;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 3rem;
}
.highlight { color: var(--blue-light); }

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-outline {
  border: 2px solid rgba(255,255,255,0.2);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--blue-light);
  background: rgba(30,60,238,0.1);
  transform: translateY(-2px);
}

/* ===================================================
   NAVBAR
   =================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(13,15,26,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30,60,238,0.15);
  padding: 0.6rem 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  background: #ffffff;
  border-radius: 10px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
}
.nav-logo img { height: 44px; width: auto; object-fit: contain; display: block; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { margin-left: 1rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================
   HERO
   =================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 0 4rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 80%; height: 100%;
  background: radial-gradient(ellipse, rgba(30,60,238,0.18) 0%, transparent 70%);
  animation: pulse-glow 6s ease-in-out infinite;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(ellipse, rgba(91,33,182,0.15) 0%, transparent 70%);
  animation: pulse-glow 8s ease-in-out infinite reverse;
}
/* Grid lines background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,60,238,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,60,238,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
}
.hero .container {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30,60,238,0.12);
  border: 1px solid rgba(30,60,238,0.3);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--blue-light);
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
  animation: blink 2s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #4F6FFF, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
/* Hero logo – wrapper circular blanco intencional con glow azul */
.hero-logo-wrap {
  position: relative;
  width: 320px; height: 320px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(30,60,238,0.4), 0 0 120px rgba(30,60,238,0.15);
}
.logo-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(30,60,238,0.25) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
  pointer-events: none;
}
.logo-ring {
  position: absolute;
  inset: -15px;
  border: 1px solid rgba(30,60,238,0.25);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}
.logo-ring::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
  transform: translateX(-50%);
}
.logo-ring-2 {
  position: absolute;
  inset: -40px;
  border: 1px dashed rgba(30,60,238,0.1);
  border-radius: 50%;
  animation: spin 35s linear infinite reverse;
}
.hero-logo-wrap img {
  width: 82%; height: 82%;
  object-fit: contain;
  position: relative; z-index: 1;
  animation: float 6s ease-in-out infinite;
  border-radius: 50%;
}

/* ===================================================
   SERVICIOS
   =================================================== */
.services { padding: 6rem 0; text-align: center; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.service-card {
  background: var(--navy-3);
  border: 1px solid rgba(30,60,238,0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}
.service-card:hover {
  border-color: rgba(30,60,238,0.3);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px;
  background: rgba(30,60,238,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: rgba(30,60,238,0.25);
  transform: scale(1.1);
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--white);
}
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1rem;
  transition: var(--transition);
}
.service-link:hover { gap: 0.7rem; }

/* ===================================================
   NOSOTROS
   =================================================== */
.about { padding: 6rem 0; }
.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-logo-wrap {
  background: var(--navy-3);
  border: 1px solid rgba(30,60,238,0.15);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-logo-wrap img { max-width: 220px; }
.about-stats {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  display: flex;
  gap: 0.75rem;
}
.stat-chip {
  background: var(--navy-2);
  border: 1px solid rgba(30,60,238,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  text-align: center;
}
.stat-chip .stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue-light);
  display: block;
}
.stat-chip .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.about-content h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 1.25rem; }
.about-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.about-value {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.about-value span:first-child { font-size: 1rem; }

/* ===================================================
   CONTACTO
   =================================================== */
.contact { padding: 6rem 0; }
.contact .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.contact-info p { color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.contact-item-icon {
  width: 46px; height: 46px;
  background: rgba(30,60,238,0.12);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.contact-item-text a {
  color: var(--white);
  font-weight: 600;
  transition: var(--transition);
}
.contact-item-text a:hover { color: var(--blue-light); }
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #25D366;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 1rem;
  transition: var(--transition);
}
.whatsapp-btn:hover { background: #1ebe5d; transform: translateY(-2px); }

/* Formulario */
.contact-form-wrap {
  background: var(--navy-3);
  border: 1px solid rgba(30,60,238,0.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.contact-form-wrap h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  background: rgba(30,60,238,0.05);
  box-shadow: 0 0 0 3px rgba(30,60,238,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 0.9rem;
  font-size: 1rem;
}
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  color: #34d399;
  font-weight: 600;
}

/* ===================================================
   FOOTER
   =================================================== */
footer {
  background: var(--navy-2);
  border-top: 1px solid rgba(30,60,238,0.1);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-brand img {
  height: 44px;
  width: auto;
  margin-bottom: 1rem;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 8px;
  display: block;
}

.footer-brand p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--white); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }
.footer-bottom a { color: var(--blue-light); }

/* ===================================================
   WHATSAPP FLOTANTE
   =================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  animation: bounce-in 0.6s cubic-bezier(0.68,-0.55,0.27,1.55);
}
.whatsapp-float:hover {
  background: #1ebe5d;
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
.whatsapp-float img { width: 30px; height: 30px; }
.whatsapp-float .tooltip {
  position: absolute;
  right: 70px;
  background: var(--navy-2);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.whatsapp-float:hover .tooltip { opacity: 1; }

/* ===================================================
   ANIMACIONES
   =================================================== */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes bounce-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .hero-desc { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-logo-wrap { width: 220px; height: 220px; }

  .about .container { grid-template-columns: 1fr; gap: 3rem; }
  .about-stats { position: static; margin-top: 1rem; justify-content: center; }

  .contact .container { grid-template-columns: 1fr; gap: 3rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 700px) {
  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: min(320px, 85vw);
    height: 100dvh;
    background: var(--navy-2);
    border-left: 1px solid rgba(30,60,238,0.15);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0.5rem;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
  }
  .nav-menu.open { right: 0; }
  .nav-link { font-size: 1.05rem; padding: 0.6rem 0; width: 100%; }
  .nav-cta { margin-left: 0; margin-top: 1rem; }
  .hamburger { display: flex; }

  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .about-values { grid-template-columns: 1fr; }
}
