/* ========== RESET SUAVE & ANTI-SCROLL LATERAL ========== */
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }

/* ========== FUENTE GLOBAL ========== */
body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
}

/* ========== MENÚ PRINCIPAL ========== */
#menu {
  background-color: #5b3d88;
  padding: 0.01em 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ========== CONTENEDOR DEL MENÚ ========== */
#menu .container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ========== LOGO ========== */
.logo a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.7em;
}

.logo a:hover { color: #dcdcdc; }

/* ========== BOTÓN MENÚ HAMBURGUESA ========== */
.menu-toggle {
  font-size: 1.5em;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: none;
}

/* ========== NAVEGACIÓN (LINKS) ========== */
.nav-links ul {
  list-style: none;
  display: flex;
  gap: 1em;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5em 1em;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

.nav-links a:hover { background-color: #432d66; }

/* ========== RESPONSIVE (HASTA 768px) ========== */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; width: 100%; }
  .nav-links.show { display: block; }
  .nav-links ul { flex-direction: column; align-items: center; }
  .nav-links a { display: block; width: 100%; text-align: center; }
}

/* ========== SECCIÓN TITULO PRINCIPAL ========== */
.titulo {
  padding: 40px 20px;
  text-align: center;
  background-color: #f5f5f5;
}

.titulo h2 {
  color: #000;
  font-size: 2em;
  margin-bottom: 0.01em;
  font-weight: 700;
}

.titulo p {
  color: #000;
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

/* ======== BOTONES DE NAVEGACIÓN ======== */
.botones-seccion {
  padding: 2em 0;
  background-color: #f7f7f7;
  text-align: center;
}

.botones-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1em;
}

.boton {
  background-color: #5b3d88;
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 1em 2em;
  border-radius: 50px;
  transition: background-color 0.3s ease;
}

.boton:hover { background-color: #432d66; }

/* Adaptable a pantallas pequeñas */
@media (max-width: 600px) {
  .botones-container { flex-direction: column; align-items: center; }
  .boton { width: 80%; text-align: center; }
}

/* ======== SUBTÍTULOS ======== */
.subtitulos-seccion {
  padding: 2em 1em;
  background-color: #ffffff;
  text-align: center;
}

.subtitulo {
  font-size: 1.8em;
  font-weight: bold;
  color: #333333;
  margin: 0;
  border-bottom: 3px solid #5b3d88;
  display: inline-block;
  padding-bottom: 0.3em;
}

/* ======== TEXTO GENERAL ======== */
.texto-general {
  background-color: #ffffff;
  padding: 2em 1em;
  font-size: 1.1em;
  line-height: 1.6;
  color: #333;
}

.texto-general .contenido-texto {
  max-width: 800px;
  margin: 0 auto;
}

/* ======== FOOTER ======== */
.footer {
  background-color: #5b3d88;
  padding: 1.5em 0;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2em;
}

.footer-container a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid white;
  padding-bottom: 2px;
  transition: opacity 0.3s ease;
  font-weight: 400;
}

.footer-container a:hover { opacity: 0.7; }

/* Responsive footer */
@media (max-width: 600px) {
  .footer-container { flex-direction: column; gap: 1em; }
}

.footer-copy {
  color: white;
  text-align: center;
  margin-top: 1em;
  font-size: 0.95em;
  font-weight: 300;
}

/* ===== Sección de perlas semanales ===== */
.seccion-perlas {
  background: #f4f4f4;
  padding: 3em 1em;
}

.contenedor-perlas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 cols + sin overflow */
  gap: 0; /* separacion compacta */
  max-width: 1200px;
  margin: auto;
  overflow-x: hidden; /* cinturón extra */
}

.boton-perla {
  /* Variante 1: botones compactos */
  background: #e2e1e1;
  color: rgb(0, 0, 0);
  font-weight: 600;
  text-align: center;
  font-size: 1em;
  padding: 1em 0.8em;
  border-radius: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .2s ease, background-color .3s ease, box-shadow .3s ease;
border: 1px solid #5b3d88e0; /* borde */


  /* Anti-desbordes de texto → SOLO una línea con … */
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.boton-perla:hover {
  background: #9f87c7;
  
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* Accesibilidad teclado */
.boton-perla:focus-visible {
  outline: 3px solid #b9a5ff;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(185,165,255,.35);
}

/* Menos movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .boton-perla { transition: none; }
}

/* Móvil: seguimos 4 columnas, sin scroll; solo ajustamos tipografía */
@media (max-width: 600px) {
  .contenedor-perlas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .boton-perla { font-size: .9em; padding: .9em; }
}

/* Contenedor del párrafo (pregunta) */
.separador {
  background: #f3eefc;
  border-radius: 14px;
  border-left: 6px solid #5b3d88;
  padding: 24px 32px 16px 32px;
  margin-bottom: 24px;
  margin-top: 18px;
  box-shadow: 0 2px 12px rgba(90, 61, 136, 0.06);
  font-family: 'Montserrat', sans-serif;
}

.separador .parrafo {
  font-weight: bold;
  font-size: 1.4rem;
  color: #5b3d88;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.separador .parrafo::before {
  content: "📌";
  margin-right: 10px;
  font-size: 1.5rem;
}

.separador .pregunta {
  font-size: 1.07rem;
  color: #333;
}

/* Contenedor del comentario */
.comentario {
  background: #fff;
  border-radius: 14px;
  border-left: 5px solid #5b3d88;
  box-shadow: 0 2px 12px rgba(90, 61, 136, 0.07);
  margin: 0 0 18px 0;
  padding: 24px 32px 18px 32px;
  font-family: 'Montserrat', sans-serif;
}

.comentario .comentario-titulo {
  font-weight: bold;
  font-size: 1.13rem;
  margin-bottom: 7px;
  color: #2d213f;
}

.comentario .contenido {
  font-size: 1rem;
  color: #3b3b3b;
  line-height: 1.6;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .separador,
  .comentario { padding: 20px; }
}

/* ======== ACCESIBILIDAD & UX BOOST ======== */
:focus-visible {
  outline: 3px solid #b9a3e6;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Estados del botón hamburguesa */
.menu-toggle:hover,
.menu-toggle:focus-visible { opacity: 0.9; }

/* Aumenta área de toque en móvil */
@media (max-width: 768px) {
  .nav-links a { padding: 0.9em 1.2em; }
}

/* Contraste en hover/focus de links del menú */
.nav-links a:focus-visible,
.nav-links a:hover {
  background-color: #432d66;
  color: #fff;
}

/* Usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* (Opcional) Evita scroll del body cuando el menú móvil está abierto */
body.nav-open { overflow: hidden; }

/* (Opcional) Mejora de impresión básica */
@media print {
  #menu, .botones-seccion, .footer { display: none !important; }
  .texto-general, .titulo { padding: 0; background: #fff; }
}
