/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ESTILOS GENERALES PARA FUENTE Y FONDO */
html, body {
  /* Se cambia la fuente a "Inter" */
  font-family: 'Inter', sans-serif;
  background-color: #ffffff; /* Fondo blanco */
  color: #333;
}

/* CONTENEDOR PRINCIPAL */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* ENCABEZADO (LOGO, TÍTULOS) */
.header {
  text-align: center;
  margin-top: 60px;  /* Espacio extra arriba */
  margin-bottom: 40px;
}

.header .logo {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

.header h1 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.header h2 {
  font-size: 1rem;
  color: #555;
}

/* SECCIONES (TÍTULOS) */
section h3 {
  text-align: center;
  font-weight: bold;
  color: #5A4036; /* Gris profesional */
  font-size: 1.2rem;
  margin: 60px 0 20px;
}

/* LAYOUT EN DOS COLUMNAS PARA ESCRITORIO, UNA PARA MÓVIL */
.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .grid-two {
    grid-template-columns: 1fr;
  }
}

/* BOTONES (ESTILO BASE) */
a {
  text-decoration: none;
  display: inline-flex;  /* Mantener icono y texto en línea */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;   /* Evita saltos de línea para el texto */
}

/* Todos los botones comparten este estilo base */
.btn-general,
.btn-product,
.btn-contact {
  border: 2px solid #1866a4;  /* Borde azul */
  background-color: #fff;     /* Fondo blanco */
  color: #449a1b;             /* Texto verde */
  margin: 5px 0;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;

  /* Fijamos un tamaño para NO cambiar el alto o ancho */
  height: 50px;
  padding: 0 20px;      /* Solo padding horizontal */
}

/* HOVER EN AZUL (#1866a4) */
.btn-general:hover,
.btn-product:hover,
.btn-contact:hover {
  background-color: #1866a4;
  color: #fff;
}

/* Icono dentro de los botones */
.icon {
  height: 110%;
  width: auto;
  margin-right: 12px;
  object-fit: contain;
}

/* =========================================
   SECCIÓN: "TODO LO QUE NECESITAS SABER"
   ========================================= */

/* Botón que abarca 2 columnas (ej. "Nuestros productos") */
.row-new-button {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.new-big-button {
  grid-column: 1 / 3;
  height: 50px;  /* Mismo alto que los demás botones */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Fila 1: Botón grande + 2 botones en columna */
.products-grid-row1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.big-button {
  min-height: 120px;  /* Mantiene altura mayor */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.stacked-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Ajustamos espacios adicionales alrededor de cada sección */
section {
  margin-bottom: 40px;
}

/* GRID para 2 columnas unificadas (ej. "Gestión de Clínicas" etc.) */
.grid-two-unified {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* Dos columnas iguales */
  gap: 20px;
  margin-bottom: 40px; /* Espacio debajo */
}

.grid-two-unified .btn-product {
  width: auto !important; /* Permite ancho automático */
}

/* ===============================
   CSS para la versión móvil
   =============================== */
@media (max-width: 768px) {

  /* Evita scroll horizontal global */
  html, body {
    overflow-x: hidden !important;
  }

  /* 1 columna en contenedores grid */
  .grid-two,
  .products-grid-row1,
  .row-new-button {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .new-big-button {
    grid-column: 1 !important;
    width: 100% !important;
    height: 50px !important;
    margin: 0 auto;
  }

  /* Permite partir texto en varias líneas */
  a,
  .btn-contact,
  .btn-general,
  .btn-product {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: break-word;
  }

  /* Botones de contacto (WhatsApp, correo) */
  .btn-contact {
    height: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }
  .btn-contact .icon {
    height: 50px !important;
    width: auto !important;
    margin-right: 12px !important;
    object-fit: contain;
  }

  /* Ajuste del botón grande en móvil */
  .big-button {
    min-height: auto !important;
    width: 100% !important;
    margin: 0 auto;
  }
  .big-button .icon {
    max-height: 40px !important;
  }

  /* Para contenedores apilados */
  .stacked-buttons {
    width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .stacked-buttons a {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  /* 1 columna en grid-two-unified en pantallas pequeñas */
  .grid-two-unified {
    grid-template-columns: 1fr !important;
  }
}
