/* ==========================================================================
   MKTDMX - Estilos Principales V2
   Estricto cumplimiento de especificaciones y diseño moderno
   ========================================================================== */

:root {
  --primary-navy: #0a192f;
  --secondary-navy: #112240;
  --light-navy: #233554;
  --accent-blue: #0284c7;
  --accent-cyan: #38bdf8;
  --accent-orange: #ff6b35;
  --accent-orange-hover: #fa5214;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --card-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.08);
  --card-shadow-hover: 0 20px 35px -10px rgba(2, 12, 27, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background-color: var(--primary-navy);
  color: var(--text-light);
}

.section-title-wrap {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.badge-orange {
  background-color: rgba(255, 107, 53, 0.15);
  color: var(--accent-orange);
}

.badge-blue {
  background-color: rgba(2, 132, 199, 0.15);
  color: var(--accent-blue);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.section-dark .section-title {
  color: var(--text-light);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.39);
}

.btn-primary:hover {
  background-color: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

/* ==========================================================================
   HEADER (Logo: Icono profesional y abajo texto exacto Marketing Digital MX)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.brand-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.brand-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary-navy);
  line-height: 1.1;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--accent-orange);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION (5 SLIDERS)
   - Título: EXACTAMENTE 2 renglones
   - Párrafo: EXACTAMENTE 2 renglones
   ========================================================================== */
.hero-slider-section {
  position: relative;
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0d213f 100%);
  color: #ffffff;
  overflow: hidden;
  padding: 6rem 0 5rem 0;
  min-height: 520px;
}

.slider-wrapper {
  position: relative;
}

.slide-item {
  display: none;
  animation: fadeIn 0.6s ease-in-out;
}

.slide-item.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-slide-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

/* TÍTULO EXACTAMENTE 2 RENGLONES */
.hero-2line-title {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.25;
  height: 2.5em; /* 2 renglones exactos */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

/* PÁRRAFO EXACTAMENTE 2 RENGLONES */
.hero-2line-desc {
  font-size: 1.15rem;
  color: #94a3b8;
  line-height: 1.55;
  height: 3.3em; /* 2 renglones exactos */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 2rem;
  max-width: 600px;
}

.slider-dots {
  display: flex;
  gap: 0.6rem;
  margin-top: 2rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  width: 32px;
  border-radius: 6px;
  background: var(--accent-orange);
}

/* ==========================================================================
   NUESTROS SERVICIOS (TARJETAS ALINEADAS)
   - Título: EXACTAMENTE 2 renglones
   - Descripción: MISMO NÚMERO DE RENGLONES (3 renglones exactos)
   ========================================================================== */
.services-grid-aligned {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card-strict {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card-strict:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: #cbd5e1;
}

.service-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* TÍTULO EXACTAMENTE 2 RENGLONES */
.service-title-2lines {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  height: 2.7em; /* Exactamente 2 renglones */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.85rem;
  color: var(--primary-navy);
}

/* DESCRIPCIÓN MISMO NÚMERO DE RENGLONES (3 RENGLONES EXACTOS) */
.service-desc-fixed {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  height: 4.5em; /* Exactamente 3 renglones */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card-btn {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.service-card-btn:hover {
  color: var(--accent-orange);
}

/* ==========================================================================
   MÓDULO INTERACTIVO: CALCULADORA DE ROI
   ========================================================================== */
.calculator-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.calc-slider-group {
  margin-bottom: 1.5rem;
}

.calc-slider-label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  accent-color: var(--accent-orange);
}

.calc-result-panel {
  background: var(--primary-navy);
  color: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}

.calc-result-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1;
  margin: 1rem 0 0.5rem 0;
}

/* ==========================================================================
   LOGROS / STATS
   ========================================================================== */
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-num-box {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-orange);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   TESTIMONIOS (ALINEADOS AL MISMO NÚMERO DE RENGLONES)
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card-strict {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

/* DESCRIPCIÓN EXACTAMENTE 4 RENGLONES */
.testimonial-desc-4lines {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  height: 6em; /* 4 renglones exactos */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-navy);
}

/* ==========================================================================
   PREGUNTAS FRECUENTES (10 FAQs CON RESPUESTAS DE 100 PALABRAS)
   ========================================================================== */
.faq-accordion-box {
  max-width: 860px;
  margin: 0 auto;
}

.faq-item-strict {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-btn {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-btn:hover {
  color: var(--accent-orange);
}

.faq-btn-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.faq-item-strict.active .faq-btn-icon {
  transform: rotate(45deg);
  color: var(--accent-orange);
}

.faq-answer-strict {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item-strict.active .faq-answer-strict {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* ==========================================================================
   BLOG (6 ALEATORIOS + BOTÓN VER MÁS)
   - Títulos: MISMO NÚMERO DE RENGLONES (2 renglones)
   - Párrafos: MISMO NÚMERO DE RENGLONES (3 renglones)
   ========================================================================== */
.blog-grid-strict {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card-strict {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.blog-card-strict:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.blog-tag-badge {
  display: inline-block;
  background: #f1f5f9;
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-decoration: none;
}

.blog-tag-badge:hover {
  background: var(--accent-blue);
  color: #ffffff;
}

/* TÍTULOS BLOG EXACTAMENTE 2 RENGLONES */
.blog-title-2lines {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.75rem;
  color: var(--primary-navy);
}

/* PÁRRAFOS BLOG EXACTAMENTE 3 RENGLONES */
.blog-desc-3lines {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  height: 4.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* ==========================================================================
   FOOTER (3 COLUMNAS)
   ========================================================================== */
.site-footer {
  background-color: var(--primary-navy);
  color: #94a3b8;
  padding: 4.5rem 0 2rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-3col-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.3fr;
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}

.footer-left-cta {
  font-size: 0.925rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.footer-social-icons {
  display: flex;
  gap: 0.75rem;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social-btn:hover {
  background: var(--accent-orange);
  transform: translateY(-3px);
}

.footer-col-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-nav-clean {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-nav-clean a {
  color: #94a3b8;
  font-size: 0.95rem;
}

.footer-nav-clean a:hover {
  color: var(--accent-orange);
}

.footer-contact-block p {
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-link-highlight {
  color: #cbd5e1;
}

.footer-link-highlight:hover {
  color: var(--accent-orange);
}

.subfooter-wrap {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}

.subfooter-privacy-link {
  color: #94a3b8;
  text-decoration: underline;
}

.subfooter-privacy-link:hover {
  color: var(--accent-orange);
}

/* ==========================================================================
   BOTONES FLOTANTES ESTRICTOS
   1. WhatsApp (Izquierdo): bottom: 30px; left: 30px; 60x60px; pulso infinito.
   2. Asistente (Derecho): bottom: 30px; right: 30px; 60x60px; mujer latina.
   ========================================================================== */
.floating-whatsapp-left {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  z-index: 9999;
  text-decoration: none;
  cursor: pointer;
  animation: pulseInfinite 2s infinite;
}

@keyframes pulseInfinite {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    transform: scale(1);
  }
}

.floating-assistant-right {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(10, 25, 47, 0.35);
  z-index: 9999;
  cursor: pointer;
  background: none;
  transition: var(--transition);
}

.floating-assistant-right:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
  border-color: var(--accent-orange);
}

.floating-assistant-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-slide-grid, .calc-grid, .footer-3col-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .services-grid-aligned, .testimonials-grid, .blog-grid-strict {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  .nav-menu.open {
    transform: translateX(0);
  }
  .header-actions {
    display: none;
  }
  .services-grid-aligned, .testimonials-grid, .blog-grid-strict, .stats-grid-4 {
    grid-template-columns: 1fr;
  }
  .hero-2line-title {
    font-size: 2rem;
  }
  .floating-whatsapp-left {
    bottom: 20px;
    left: 20px;
    width: 52px;
    height: 52px;
  }
  .floating-assistant-right {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }
}
