/* ==========================================================================
   VARIABLES, RESETS Y ESTILOS BASE
   ========================================================================== */
:root {
  --green: #1BB386;
  --dark: #1F2937;
  --text: #5F6B76;
  --light: #F8FAFC;
  --border: #E5E7EB;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: var(--dark);
  line-height: 1.7;
}

/* ==========================================================================
   COMPONENTES COMUNES Y DISEÑO DE MAQUETA
   ========================================================================== */
.container {
  max-width: 1180px;
  margin: auto;
  padding: 0 30px;
}

section {
  padding: 48px 0;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  background: #EAF9F4;
  color: #1BB386;
  font-size: 13px;
  font-weight: 700;
  border-radius: 30px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Tipografías base */
h1 {
  font-size: 54px;
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 700;
}

h2 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 22px;
  font-weight: 800;
  letter-spacing: -1px;
}

h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 20px;
}

.subtitle {
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

/* Botones */
.buttons {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 15px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: .30s;
}

.btn-primary {
  background: linear-gradient(135deg, #1BB386, #17a87d);
  color: white;
  border-radius: 12px;
  padding: 16px 34px;
}

.btn-primary:hover {
  opacity: .9;
}

.btn-outline {
  border: 2px solid #D9DEE5;
  background: white;
  color: #1F2937;
  border-radius: 12px;
  padding: 16px 34px;
}

.btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  background: white;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN (TOP BAR)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #EEF2F7;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #0F172A;
}

.topbar-btn {
  background: #1BB386;
  color: white;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: .30s;
}

.topbar-btn:hover {
  background: #149E74;
}

/* ==========================================================================
   SECCIÓN HERO
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 70px;
  padding-top: 30px;
}

.hero img {
  width: 100%;
  max-width: 430px;
  display: block;
  margin-left: auto;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0,0,0,.15);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.chips span {
  background: #EAF9F4;
  color: #1BB386;
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
}

/* ==========================================================================
   SECCIÓN SERVICIOS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 38px;
}

.card {
  background: #fff;
  padding: 34px;
  border-radius: 18px;
  border: none;
  box-shadow: 0 10px 35px rgba(0,0,0,.06);
  transition: .35s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px rgba(0,0,0,.12);
}

.card h3 {
  margin-bottom: 14px;
  font-size: 24px;
}

.card p {
  margin-bottom: 0;
}

/* ==========================================================================
   SECCIÓN EXPERIENCIA
   ========================================================================== */
.experience {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.experience img {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.logos {
  text-align: center;
  margin-top: 40px;
}

.logos img {
  max-width: 100%;
  width: 900px;
}

/* Estilos de espaciado anteriormente en línea */
.logos-title {
  margin-top: 55px;
}

.logos-desc {
  margin-bottom: 30px;
}

/* ==========================================================================
   SECCIÓN HERRAMIENTAS
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.tool {
  background: #fff;
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
  transition: .30s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 205px;
}

.tool:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(0,0,0,.10);
}

.tool img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin-bottom: 14px;
}

.tool h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0F172A;
}

.tool p {
  font-size: 14px;
  line-height: 1.55;
  color: #64748B;
  margin-bottom: 0;
}

/* ==========================================================================
   SECCIÓN CONTACTO Y PIE
   ========================================================================== */
.contact {
  background: #F8FAFC;
  border-radius: 22px;
  padding: 50px;
  max-width: 900px;
  margin: auto;
  box-shadow: 0 15px 40px rgba(0,0,0,.05);
}

/* Enlaces generales dentro de la tarjeta de contacto */
.contact a {
  color: var(--green);
  font-weight: bold;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* Corrección de especificidad: Forzar texto blanco en botones tipo enlace dentro de .contact */
.contact a.btn {
  color: #ffffff;
  text-decoration: none;
}

.contact a.btn:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-name {
  font-size: 28px;
  font-weight: 800;
  margin-top: 35px;
}

.footer-role {
  margin-top: 6px;
  font-size: 18px;
  color: #64748B;
}

/* ==========================================================================
   ESTILOS DEL FORMULARIO EMERGENTE (MODAL)
   ========================================================================== */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 10000; /* Asegura que se sitúe por encima del menú */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6); /* Fondo semi-transparente oscuro */
  backdrop-filter: blur(4px); /* Suave desenfoque del fondo */
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto; /* Permite scroll si la pantalla es muy pequeña */
}

.modal-content {
  background-color: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 550px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  text-align: left;
  animation: modalFadeIn 0.3s ease-out;
}

/* Animación de apertura */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botón de cierre (X) */
.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  color: #94A3B8;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-modal:hover {
  color: var(--dark);
}

.modal-content h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

/* Diseño de los campos del formulario */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 179, 134, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #1BB386, #17a87d);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 10px;
}

.form-submit-btn:hover {
  opacity: 0.9;
}

/* ==========================================================================
   MEDIA QUERIES (SOPORTE DISPOSITIVOS MÓVILES)
   ========================================================================== */
@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .experience {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 45px 0;
  }

  .container {
    padding: 0 20px;
  }

  h1 {
    font-size: 58px;
    line-height: 1.05;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -2px;
  }

  h2 {
    font-size: 30px;
  }

  .contact {
    padding: 30px;
  }

  .modal-content {
    padding: 30px 20px;
  }
}