/* Fondo */
body {
  margin: 0;
  color: #fff;
  background-image: url('img/mundocubismo.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Overlay para mejorar contraste */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /*background: rgba(0, 0, 0, 0.45); /* ajustar opacidad según necesites */
  pointer-events: none;
  z-index: 0;
}

/* Contenedor principal: usa stacking por encima del overlay */
.container-md {
  position: relative;
  z-index: 1;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 5%;
  padding: 1rem;
  box-sizing: border-box;
}

/* Carta/logo interna */
.logo-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  /*background: rgba(255,255,255,0.04); /* opcional: sutil caja sobre el fondo */
  padding: 1rem;
  border-radius: 8px;
  /*backdrop-filter: blur(4px);*/
  max-width: 720px;
  width: 100%;
}

/* Imagen del logo: responsive */
.logo-img {
  width: 100%;
  max-width: 360px;   /* tamaño máximo en pantallas grandes */
  height: auto;
  display: block;
}

/* Botón de contacto: ancho adaptable */
.btn-contact,
#contactBtn {
  width: 100%;
  max-width: 220px;
}

/* Ajustes de header */
header .brand h1 {
  font-size: 1.125rem;
  margin: 0;
  z-index: 1;
}

/* --- Media queries para responsividad --- */

/* Móviles (<= 575px) */
@media (max-width: 575.98px) {
  .container-md {
    min-height: 50vh;
    margin-top: 3%;
    padding: 0.75rem;
  }
  .logo-card {
    padding: 0.75rem;
    gap: 0.5rem;
    max-width: 420px;
  }
  .logo-img {
    max-width: 260px;
  }
  .btn-contact,
  #contactBtn {
    max-width: 100%;
  }
  /* Ajuste del header: compactar */
  header .brand h1 { font-size: 1rem; }
}

/* Tablets (>= 576px and <= 991.98px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .container-md { min-height: 60vh; margin-top: 4%; }
  .logo-card { max-width: 600px; padding: 1rem 1.25rem; }
  .logo-img { max-width: 320px; }
  .btn-contact,
  #contactBtn { max-width: 200px; }
}

/* Escritorio (>= 992px) */
@media (min-width: 992px) {
  .container-md { min-height: 70vh; margin-top: 5%; }
  .logo-card { max-width: 720px; padding: 1.5rem; }
  .logo-img { max-width: 420px; }
  .btn-contact,
  #contactBtn { max-width: 220px; }
}

/* Evitar que elementos queden debajo del overlay/atrás */
.modal,
header,
nav {
  z-index: 1050; /* bootstrap modals usan z-index alto; asegúrate de que header/nav estén por encima si es necesario */
}
.custom-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18); /* ajustar opacidad */
  z-index: 1040; /* debe quedar debajo del modal (bootstrap usa ~1050) */
}


/* Contenedor del toast: usa ancho máximo y márgenes en móviles */
.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
  max-width: calc(100% - 2rem);
  pointer-events: none; /* permite click-through excepto en el toast */
}

/* El toast puede recibir pointer events */
.toast-container .toast {
  pointer-events: auto;
  width: 100%;
  max-width: 360px; /* tamaño máximo en pantallas grandes */
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 575.98px) {
  .toast-container {
    right: .5rem;
    bottom: .5rem;
    align-items: center;
    left: .5rem;
    max-width: calc(100% - 1rem);
  }
  .toast-container .toast {
    max-width: 100%;
  }
}

/* Centrado lateral en tablets y pantallas intermedias si se quiere */
@media (min-width: 576px) and (max-width: 991.98px) {
  .toast-container {
    right: 1rem;
    bottom: 1rem;
  }
}

/* Opcional: variante para ubicaciones diferentes (top-right, bottom-left, etc.) */
.toast-container.top-right { top: 1rem; bottom: auto; right: 1rem; left: auto; }

/* Fin Contenedor del toast: usa ancho máximo y márgenes en móviles */