:root {
  --color-bg: #f7f6f2;
  --color-surface: #ffffff;
  --color-border: #ddd6c8;
  --color-text: #1f2933;
  --color-text-muted: #6b7280;
  --color-primary: #01696f;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px; /* si aquí quieres 17px, puedes bajarlo */
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
}

/* Layout base */

.header {
  padding: 2.5rem 1.25rem 1.75rem;
}

.header__inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.header__title {
  font-size: clamp(1.75rem, 2.2vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.header__subtitle {
  font-size: 0.98rem;
  color: var(--color-text-muted);
  max-width: 38rem;
  margin: 0 auto 1.5rem;
}

.main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

.footer {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer__texto {
  margin: 0;
}

/* Botones */

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0.7rem 1.5rem;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease,
    transform 0.08s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #f9fafb;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
}

/* Grupos y testimonios */

.grupo {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 1.4rem 1.9rem;
  margin-bottom: 1.75rem;
}

.grupo__header {
  margin-bottom: 1.1rem;
}

.grupo__titulo {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.grupo__intro {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-muted);
}

.testimonio {
  border-top: 1px solid var(--color-border);
  padding-top: 1.1rem;
  margin-top: 1.1rem;
}

.testimonio:first-of-type {
  border-top: none;
  padding-top: 0.2rem;
  margin-top: 0.4rem;
}

.testimonio__titulo {
  font-size: 1.02rem;
  margin: 0 0 0.6rem;
  color: var(--color-text);
}

.testimonio__imagenes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonio__fig {
  margin: 0;
  background: #f3f4f6;
  border-radius: var(--radius-md);
  padding: 0.55rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
  max-width: 260px;      /* ancho en PC, ajustado para que se vea cómodo */
  margin-inline: auto;
}

.testimonio__fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Sección final */

.grupo--final {
  text-align: center;
}

.grupo__header--centrado {
  text-align: center;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal--visible {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal__dialog {
  position: relative;
  max-width: 640px;
  width: 92%;
  max-height: 90dvh;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.1rem 1.3rem 0.9rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.modal__title {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
}

.modal__content p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.modal__actions {
  flex-shrink: 0;
  padding-top: 0.7rem;
  margin-top: 0.2rem;
  border-top: 1px solid var(--color-border);
  text-align: right;
}

/* Estado inicial: botón final oculto */
#btnVolverInicio {
  display: none;
}

/* Responsivo */

@media (min-width: 768px) {
  .header {
    padding-top: 3rem;
  }

  .grupo {
    padding: 2rem 2rem 2.1rem;
  }
}

@media (max-width: 480px) {
  /* En móvil, las capturas se ven casi a ancho completo */
  .testimonio__fig {
    max-width: 100vw;
  }
}