/* =========================================================
   Te Conectamos — Mejoras Fase 2
   CTAs mejorados, casos de éxito, testimonios expandidos
   ========================================================= */

/* ========== CTAs INLINE Y ESTRATÉGICOS ========== */

.cta-inline {
  background: rgba(31, 116, 208, 0.08);
  border: 1px solid rgba(31, 116, 208, 0.15);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  margin: 3rem auto 0;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-inline p {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.cta-inline .btn {
  min-width: 240px;
}

@media (max-width: 768px) {
  .cta-inline {
    padding: 2rem;
    margin-top: 2rem;
  }
}

/* ========== CTA DESPUÉS DE TESTIMONIOS ========== */

.cta-testimonial {
  background: linear-gradient(135deg, #1f74d0 0%, #0d47a1 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: center;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-testimonial h3 {
  color: white;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  margin: 0;
  font-weight: 600;
}

.cta-testimonial .btn {
  background: white;
  color: #1f74d0;
  font-weight: 600;
  border: 2px solid white;
  min-width: 200px;
}

.cta-testimonial .btn:hover {
  background: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
  .cta-testimonial {
    padding: 2rem;
    gap: 1.25rem;
  }

  .cta-testimonial h3 {
    font-size: 1.3rem;
  }

  .cta-testimonial .btn {
    min-width: auto;
    padding: 12px 20px;
  }
}

/* ========== CTA FINAL SECCIÓN ========== */

.cta-final {
  background: linear-gradient(135deg, #1f74d0 0%, #0d47a1 100%);
  color: white;
  padding: 4rem 2rem;
  border-radius: 16px;
  text-align: center;
  margin: 4rem 0 3rem 0;
}

.cta-final h2 {
  color: white;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-final p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-final .btn-cta-primary {
  background: white;
  color: #1f74d0;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

.cta-final .btn-cta-primary:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 768px) {
  .cta-final {
    padding: 2.5rem 1.5rem;
    margin: 3rem 0 2rem 0;
  }

  .cta-final h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .cta-final p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* ========== CASOS DE ÉXITO ========== */

.case-studies {
  padding: 4rem 0;
  margin: 3rem 0;
}

.case-studies .section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.case-studies .section-lead {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.case-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.case-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.case-badge {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.case-card h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.case-sector {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.case-content {
  text-align: left;
  width: 100%;
}

.case-content p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.case-content strong {
  color: var(--accent);
  font-weight: 600;
}

.case-content span {
  color: var(--text);
}

.case-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .case-studies {
    padding: 3rem 0;
    margin: 2rem 0;
  }

  .cases-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .case-card {
    padding: 1.5rem;
  }

  .case-badge {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  .case-card h3 {
    font-size: 1.1rem;
  }
}

/* ========== EXPANSIÓN TESTIMONIOS ========== */

/* Grid ajustado para 8 testimonios */
.testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }
}

/* ========== MEJORAS GENERALES ========== */

/* Botón primario con animación pulse */
.btn-cta-primary {
  position: relative;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(31, 116, 208, 0.3);
  transition: all 0.3s ease;
}

.btn-cta-primary:hover {
  box-shadow: 0 8px 20px rgba(31, 116, 208, 0.4);
  transform: translateY(-2px);
}

/* Botón secundario mejorado */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--text);
  color: var(--text);
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--text);
  color: white;
  transform: translateY(-2px);
}

/* Formulario mejorado */
.contact-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .contact-form .field-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.contact-form select {
  padding: 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--text);
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 116, 208, 0.1);
}

/* ========== SECCIÓN FAQ EXPANDIDA ========== */

.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(31, 116, 208, 0.1);
}

.faq-item summary {
  padding: 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  background-color: #f8fafc;
}

.faq-item summary:hover {
  background-color: #f1f5f9;
  color: var(--accent);
}

.faq-item[open] summary {
  background-color: rgba(31, 116, 208, 0.05);
  color: var(--accent);
  border-bottom: 1px solid #e2e8f0;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item summary::after {
  content: "⌄";
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.faq-item p {
  padding: 1.5rem;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  background-color: white;
}

@media (max-width: 768px) {
  .faq-item summary {
    padding: 1.25rem;
    font-size: 0.95rem;
  }

  .faq-item p {
    padding: 1.25rem;
    font-size: 0.9rem;
  }
}

/* ========== ANIMACIONES REVEAL ADICIONALES ========== */

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

.reveal {
  animation: revealFadeIn 0.6s ease-out forwards;
}

/* Stagger effect para elementos nuevos */
.case-card:nth-child(1) { animation-delay: 0.1s; }
.case-card:nth-child(2) { animation-delay: 0.2s; }
.case-card:nth-child(3) { animation-delay: 0.3s; }

.testimonial:nth-child(4) { animation-delay: 0.1s; }
.testimonial:nth-child(5) { animation-delay: 0.2s; }
.testimonial:nth-child(6) { animation-delay: 0.3s; }
.testimonial:nth-child(7) { animation-delay: 0.4s; }
.testimonial:nth-child(8) { animation-delay: 0.5s; }

/* ========== RESPONSIVE AJUSTES ========== */

@media (max-width: 640px) {
  .cta-inline {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  .cta-inline p {
    font-size: 1rem;
  }

  .cta-inline .btn {
    min-width: auto;
    padding: 12px 20px;
  }

  .cta-final {
    padding: 2rem 1.5rem;
    margin: 2rem 0 1.5rem 0;
  }

  .cta-final h2 {
    font-size: 1.3rem;
  }

  .cta-final p {
    font-size: 0.95rem;
  }
}
