/* ==========================
   Estructura general
========================== */
html, body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background-color: #cdc6bb;
}

.navbar {
  background-color: #5e537e;
}

.titulo, .info-titulo {
  color: #3c2f63;
}

.titulo, .info-titulo, .text-nav, .text-footer {
  font-family: 'Bree Serif', serif;
}

/* Contenedor principal */
main {
  flex: 1; /* Empuja el footer hacia abajo si hay poco contenido */
}

/* ==========================
   Overlay del porfolio
========================== */
.overlay-custom {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  background: rgba(0, 0, 0, 0.5);
  border-radius: .5rem;
  z-index: 1; /* Se mantiene por debajo del modal */
  pointer-events: none; /* 🚀 evita que bloquee clics */
}

.card:hover .overlay-custom {
  opacity: 1;
  pointer-events: auto; /* Solo interactúa cuando es visible */
}

/* ==========================
   Forzar el modal de Bootstrap por encima
========================== */
.modal {
  z-index: 2000 !important;
}

.modal-backdrop {
  z-index: 1999 !important;
}

/* ==========================
   Sección Portafolio
========================== */
.porfolio {
  min-height: 100vh; /* Asegura altura mínima */
  padding: 2rem 0;
}

.info-titulo {
font-size: 20px;
}

#porfolio {
  position: relative;
  overflow: hidden;
  color: #f9f0e3;
  padding: 2rem 0;
}

#porfolio .bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0; /* Siempre al fondo */
}

#porfolio .container {
  position: relative;
  z-index: 1; /* Contenido encima del video */
}

/* ==========================
   Ajuste de textos
========================== */
.card-text {
  font-size: 0.9rem;
  text-align: justify;
}

/* ==========================
   Ajuste de imágenes
========================== */
#porfolio .card {
  border: none;
  overflow: hidden;
  border-radius: .5rem;
  cursor: pointer;
}

#porfolio .card img {
  width: 100%;
  height: 250px; /* Todas iguales */
  object-fit: cover; /* Recorta sin deformar */
  object-position: center;
  border-radius: .5rem;
}

/* ==========================
   Botones flotantes
========================== */
.btnscr {
  position: fixed;
  bottom: 20px;
  left: 95%;
  color: #f9f0e3;
  font-size: 1.2rem;
  font-weight: bold;
  width: 60px;
  height: 60px;
  padding: 0;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: gradientShift 3s ease infinite, bounceBtn 1.2s infinite;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.3s ease, opacity 0.4s ease;
  z-index: 999;
}

/* Tooltip personalizado */
.btnscr::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%; /* aparece arriba del botón */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.8);
  color: #f9f0e3;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Flecha del tooltip */
.btnscr::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mostrar tooltip al hover */
.btnscr:hover::after,
.btnscr:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scroll-up-btn {
  background: linear-gradient(135deg, #8fbdbf, #129aa4);
}

.scroll-up-btn:hover {
  transform: translateX(-50%) scale(1.1);
  background: linear-gradient(135deg, #129aa4, #8fbdbf);
}

.scroll-down-btn {
  background: linear-gradient(135deg, #6d638a, #3c2f63);
}

.scroll-down-btn:hover {
  transform: translateX(-50%) scale(1.1);
  background: linear-gradient(135deg, #3c2f63, #6d638a);
}

/* Animación de gradiente */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animación de rebote del botón */
@keyframes bounceBtn {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* Flecha animada (SVG) */
.scroll-down-btn .arrow {
  width: 45px;  /* ajusta el tamaño según tu SVG */
  height: auto;
  transform: rotate(180deg);
  animation: bounced 1.2s infinite;
}

.scroll-up-btn .arrow {
  width: 45px;  /* ajusta el tamaño según tu SVG */
  height: auto;
  transform: rotate(0deg);
  animation: bounceu 1.2s infinite;
}

/* Animación de rebote de la flecha */
@keyframes bounceu {
  0%, 100% { transform: rotate(0deg) translateY(6px); }
  50% { transform: rotate(0deg) translateY(-6px); }
}

@keyframes bounced {
  0%, 100% { transform: rotate(180deg) translateY(-6px); }
  50% { transform: rotate(180deg) translateY(6px); }
}

/* Estado oculto */
.scroll-down-btn.hidden, .scroll-up-btn.scroll-up-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Posicion del boton en moviles */
@media (max-width: 425px) {
  .btn {
    bottom: 10px;
    left: 85%;
  }
}
.modal-footer a {
  background-color: #3c2f63;
  color: #f9f0e3;
  font-family: 'Bree Serif', serif;
  border: 0px;
}

.modal-footer a:hover {
  background-color: #f9f0e3;
  color: #3c2f63;
}

.modal-footer button {
    font-family: 'Bree Serif', serif;
    background-color: #3c2f63;
    color: #f9f0e3;
    border: 0px;
}

.modal-footer button:hover {
    background-color: #f9f0e3;
    color: #3c2f63;
}

.modal-content h5, .modal-content p {
  color: #3c2f63;
  font-family: 'Bree Serif', serif;
}

/* ==========================
   Footer
========================== */
footer {
  position: relative;                 /* Posición relativa */
  background-color: #5e537e;        /* Fondo oscuro */
  color: #f9f0e3;                     /* Texto claro */
  text-align: center;                 /* Centrado */
  padding: 1rem 0;                    /* Espaciado */
  font-size: 0.9rem;                  /* Tamaño más elegante */
}

footer a {
  color: #f8b400;          /* Color de links */
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
