/* --- VARIABLES & RESET --- */
:root {
  --color-primary: #0f172a; /* Azul Oxford Oscuro (Autoridad) */
  --color-secondary: #c5a059; /* Dorado Mate (Estatus/Premium) */
  --color-bg-light: #f8f9fa; /* Gris muy claro (Limpieza) */
  --color-text-main: #334155;
  --color-text-light: #94a3b8;
  --font-serif: "Playfair Display", serif;
  --font-sans: "Inter", sans-serif;
  --spacing-section: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  line-height: 1.6;
  background-color: #fff;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  color: var(--color-primary);
}
a {
  text-decoration: none;
  transition: 0.3s;
}
ul {
  list-style: none;
}

/* --- UTILIDADES --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.text-center {
  text-align: center;
}
.highlight {
  color: var(--color-secondary);
  font-style: italic;
}
.btn {
  display: inline-block;
  background-color: var(--color-secondary);
  color: #fff;
  padding: 16px 32px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  border: 1px solid var(--color-secondary);
  cursor: pointer;
}
.btn:hover {
  background-color: #fff;
  color: var(--color-secondary);
}
.btn-outline {
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
}
header .btn-outline{
    display: none; padding: 10px 20px; font-size: 0.8rem;
}
.btn-outline:hover {
  background-color: #fff;
  color: var(--color-primary);
}

/* --- HEADER --- */
header {
  padding: 20px 0;
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 10;
}
.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff; /* Blanco sobre fondo oscuro del hero */
}
.logo span {
  color: var(--color-secondary);
}

/* --- HERO SECTION --- */
/* --- HERO SECTION MODIFICADO (SEO FRIENDLY) --- */
.hero {
  position: relative; /* Necesario para contener la imagen absoluta */
  background-color: var(--color-primary); /* Color de respaldo */
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden; /* Evita que la imagen se salga si hay error de carga */
}

/* La imagen real actuando como fondo */
.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* CLAVE: Hace que la imagen se comporte como background-size: cover */
  object-position: center;
  z-index: 1; /* Capa más baja */
}

/* El filtro oscuro (Overlay) creado con CSS */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* El mismo gradiente que tenías antes */
  background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8));
  z-index: 2; /* Capa media (encima de la imagen) */
}

/* Contenedor del texto para que quede encima de todo */
.relative-content {
  position: relative;
  z-index: 3; /* Capa superior (encima del filtro oscuro) */
  width: 100%; /* Asegura ancho completo */
}

.hero-content {
  max-width: 800px;
  /* Eliminamos estilos de alineación aquí, ya los maneja el flex padre o media queries */
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 40px;
  max-width: 600px;
}

/* Ajuste Mobile para el Hero actualizado */
@media (max-width: 767px) {
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
}
@media (min-width: 768px) {
  .hero {
    justify-content: flex-start;
  }
  .hero-content {
    text-align: left;
  }
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 40px;
  max-width: 600px;
}

/* --- DOLORES (PAIN POINTS) --- */
.pain-points {
  padding: var(--spacing-section) 0;
  background: #fff;
}
.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}
.card {
  padding: 30px;
  border-left: 3px solid var(--color-secondary);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}
.card p {
  font-size: 0.95rem;
  color: #64748b;
}

/* --- SOLUCIÓN (HIGH TICKET) --- */
.solution {
  padding: var(--spacing-section) 0;
  background-color: var(--color-bg-light);
}
.solution-flex {
  display: flex;
  flex-direction: column;
  gap: 50px;
}
.solution-text h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.feature-list li {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
}
.feature-icon {
  min-width: 24px;
  height: 24px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  margin-right: 15px;
  margin-top: 5px;
  position: relative;
}
.feature-icon::after {
  content: "✓";
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}
.feature-content h4 {
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--color-primary);
}

/* --- EXCLUSIVIDAD (CIERRE) --- */
.exclusivity {
  background-color: var(--color-primary);
  color: #fff;
  padding: 60px 0;
  border-top: 4px solid var(--color-secondary);
  text-align: center;
}
.lock-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}
.exclusivity h2 {
  color: #fff;
  margin-bottom: 20px;
}
.exclusivity p {
  max-width: 700px;
  margin: 0 auto 30px auto;
  color: #cbd5e1;
}

/* --- CONTACTO --- */
.contact {
  padding: var(--spacing-section) 0;
}
.form-box {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  font-family: var(--font-sans);
  font-size: 1rem;
}
.form-control:focus {
  outline: 2px solid var(--color-primary);
  border-color: transparent;
}

/* --- FOOTER --- */
footer {
  background: #0f172a;
  color: #64748b;
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid #1e293b;
}

/* --- TESTIMONIOS / CASOS DE ÉXITO --- */
.testimonials {
  padding: var(--spacing-section) 0;
  background-color: #fff;
}

/* Contenedor del Caso de Estudio */
.case-study {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  margin-top: 40px;
}

/* Lado Izquierdo: Texto */
.case-content {
  padding: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-icon {
  font-size: 4rem;
  color: var(--color-secondary);
  opacity: 0.3;
  font-family: serif;
  line-height: 1;
  margin-bottom: -20px;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text-main);
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.client-info {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}

.client-avatar {
  width: 65px; /* Un poco más grande para que se luzca */
  height: 65px;
  border-radius: 50%; /* Esto hace el círculo perfecto */
  overflow: hidden; /* Esto recorta lo que sobre de la imagen */
  border: 2px solid var(--color-secondary); /* Borde dorado elegante */
  margin-right: 15px;
  flex-shrink: 0; /* Evita que se aplaste si hay poco espacio */
  background: #fff; /* Fondo por si la imagen es transparente */
}

/* Esta es la clave para que la foto no se deforme */
.client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recorta la imagen para llenar el círculo sin estirarla */
  object-position: center; /* Centra la cara o el logo */
  display: block;
}

.client-name {
  font-weight: 700;
  color: var(--color-primary);
}
.client-firm {
  font-size: 0.9rem;
  color: #64748b;
}

/* Métricas pequeñas */
.case-metrics {
  display: flex;
  gap: 20px;
}
.metric {
  border-left: 2px solid var(--color-secondary);
  padding-left: 10px;
}
.metric span {
  display: block;
  font-weight: 700;
  color: var(--color-primary);
}
.metric small {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Lado Derecho: Visual del sitio */
.case-visual {
  flex: 1;
  background-color: var(--color-bg-light);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mockup de Navegador */
.browser-mockup {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.browser-header {
  background: #e2e8f0;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.red {
  background: #ff5f56;
}
.yellow {
  background: #ffbd2e;
}
.green {
  background: #27c93f;
}
.url-bar {
  background: #fff;
  flex: 1;
  margin-left: 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 2px 8px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-body {
  position: relative;
  height: 300px; /* Altura de la ventanita */
  width: 100%;
}

.browser-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Escalar el contenido del iframe para que quepa mejor si es necesario */
  transform-origin: 0 0;
}

.overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
}
.browser-body:hover .overlay-link {
  opacity: 1;
}

.btn-small {
  background: #fff;
  color: var(--color-primary);
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
}

/* --- ESTILOS PARA LOS NUEVOS CTAS INTERMEDIOS --- */

.cta-spacer {
  margin-top: 60px; /* Esto da el "aire" necesario */
}

/* Ajuste específico para el botón de la solución en móviles */
@media (max-width: 767px) {
  .solution .cta-spacer {
    text-align: center !important; /* En celular lo centramos */
    margin-top: 40px;
  }
  /* Hacemos los botones intermedios un poco más anchos en móvil */
  .cta-spacer .btn {
    width: 100%;
    max-width: 350px;
  }
}

/* Responsive */
@media (min-width: 900px) {
  .case-study {
    flex-direction: row;
  }
  header .btn-outline{
    display: block;
}
}

/* --- MEDIA QUERIES --- */
@media (min-width: 768px) {
  .solution-flex {
    flex-direction: row;
    align-items: center;
  }
  .solution-text {
    flex: 1;
  }
  .solution-img {
    flex: 1;
    height: 400px;
    background: #ddd;
  } /* Placeholder img */
  .hero {
    justify-content: flex-start;
  }
  .hero-content {
    text-align: left;
  }
}
@media (max-width: 767px) {
  .hero-content {
    text-align: center;
  }
  .btn {
    width: 100%;
  }
}

/* Animaciones Simples al hacer scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* --- ESTILO PARA LA CAPTURA DE PANTALLA --- */

.browser-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Rellena el espacio sin deformar la imagen */
    object-position: left top; /* CLAVE: Muestra siempre la parte de arriba de la web */
    display: block;
}

/* Opcional: Una transición suave si quieres que la imagen haga un mini zoom al pasar el mouse */
.browser-body:hover .browser-screenshot {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

/* Aseguramos que la imagen no se salga de los bordes al hacer zoom */
.browser-body {
    overflow: hidden; 
    position: relative;
    height: 300px; /* Mantenemos la altura fija */
}


/* Estilo para el mensaje de error Del formulario */
    .error-message {
        color: #e74c3c;
        font-size: 0.85rem;
        font-weight: 600;
        margin-top: 6px;
        margin-left: 2px;
    }

    /* Estilo para el botón deshabilitado */
    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Animación del spinner para el botón de envío */
    .spinner {
        animation: rotate 2s linear infinite;
        width: 20px;
        height: 20px;
    }
    .spinner .path {
        stroke: var(--color-primary);
        stroke-linecap: round;
        animation: dash 1.5s ease-in-out infinite;
    }
    @keyframes rotate { 100% { transform: rotate(360deg); } }
    @keyframes dash {
        0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
        50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
        100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
    }

    /* Estilo para el mensaje de éxito */
    .form-success {
        border: 2px solid var(--color-accent);
        background-color: #f8f9fa;
        padding: 2rem;
        text-align: center;
        border-radius: 8px;
    }
    .form-success h3 {
        color: var(--color-primary);
        margin-bottom: 1rem;
    }