/*!
 * ============================================================================
 * Iglesia Alianza Cristiana y Misionera Los Olivos
 * Version: 7.0.0
 * ============================================================================*/

.modal {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.95);
  bottom: 0;
  display: none;
  justify-content: center;
  left: 0;
  overflow: hidden;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 15000;
}

.body-modal-abierto {
  height: 100vh;
  overflow: hidden;
}

.modal.abierto {
  animation: fadeIn 0.3s ease;
  display: flex;
}

.navegacion-modal {
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 0 20px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.boton-navegacion {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 48px;
  justify-content: center;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 48px;
}

.boton-navegacion:hover {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.15);
}

.tarjeta-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(2, 16, 45, 0.35);
  display: flex;
  max-height: 85vh;
  min-height: 370px;
  max-width: 1100px;
  width: 100%;
}

.media-modal {
  align-items: center;
  background: #000;
  display: flex;
  flex: 1;
  justify-content: center;
  position: relative;
}

.media-modal-element {
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  width: 100%;
}

.info-modal {
  background: linear-gradient(
    transparent 0%,
    rgba(0, 0, 0, 0.4) 30%,
    rgba(0, 0, 0, 0.85) 100%
  );
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  bottom: 0;
  color: white;
  left: 0;
  padding: 24px 20px;
  position: absolute;
  right: 0;
}

.encabezado-modal {
  margin-bottom: 18px;
  position: relative;
}

.titulo-modal {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.texto-titulo {
  color: white;
  flex: 1;
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.meta {
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  font-family:
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 0.87rem;
  font-weight: 500;
  gap: 8px;
}

.meta::before {
  color: rgba(255, 255, 255, 0.4);
  content: "•";
  font-size: 1.2rem;
}

.campo {
  margin-bottom: 18px;
  min-height: 130px;
  overflow-y: auto;
}

.descripcion-texto {
  color: rgba(255, 255, 255, 0.95);
  font-family:
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 12px;
  max-height: 4.8em;
  overflow: hidden;
  padding-right: 8px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: pre-line;
}

.descripcion-texto.expandido {
  max-height: 280px;
  overflow-y: auto;
}

.descripcion-texto.expandido::-webkit-scrollbar {
  width: 6px;
}

.descripcion-texto.expandido::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.descripcion-texto.expandido::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.descripcion-texto.expandido::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.descripcion-texto.con-gradiente:not(.expandido)::after {
  border-radius: 0 0 4px 4px;
  bottom: 0;
  content: "";
  height: 4em;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.btn-ver-mas {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font-family:
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 10px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ver-mas:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.acciones-pequenas {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
}

.btn-me-gusta {
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  color: white;
  cursor: pointer;
  display: flex;
  font-family:
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  min-width: 100px;
  padding: 12px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-me-gusta.activo {
  background: rgba(255, 55, 95, 0.15);
  border-color: rgba(255, 55, 95, 0.3);
  box-shadow: 0 4px 20px rgba(255, 55, 95, 0.2);
  color: #ff375f;
}

.btn-me-gusta:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-me-gusta.activo:hover {
  background: rgba(255, 55, 95, 0.2);
  box-shadow: 0 6px 24px rgba(255, 55, 95, 0.3);
}

.btn-cerrar-modal {
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 20px;
  height: 44px;
  justify-content: center;
  position: absolute;
  right: 20px;
  top: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 44px;
  z-index: 20;
}

.btn-cerrar-modal:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1) rotate(90deg);
}

.contador-slides {
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: white;
  font-family:
    "SF Pro Text",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  left: 20px;
  padding: 8px 16px;
  position: absolute;
  top: 20px;
}

.media-modal-element {
  animation: mediaLoad 0.5s ease 0.1s forwards;
  opacity: 0;
}

.btn-me-gusta:active {
  transform: scale(0.95);
}

.boton-navegacion:active {
  transform: scale(0.9);
}

.enlace-descripcion {
  color: #4a6fa5;
  text-decoration: none;
  border-bottom: 1px dotted #4a6fa5;
  word-break: break-all;
}

.enlace-descripcion:hover {
  color: #3a5a8a;
  border-bottom: 1px solid #3a5a8a;
  text-decoration: none;
}

.descripcion-texto .enlace-descripcion {
  color: #6ab0ff;
  border-bottom: 1px dotted #6ab0ff;
}

.descripcion-texto .enlace-descripcion:hover {
  color: #8cc2ff;
  border-bottom: 1px solid #8cc2ff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mediaLoad {
  from {
    opacity: 0;
    transform: scale(1.05);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media screen and (max-width: 1500px) {
  .header {
    animation: header-movement-short-plus both !important;
    animation-range: 5px 20px !important;
    animation-timeline: scroll() !important;
    font-family: var(--font-button);
    top: 0;
    z-index: 3000;
  }
}

@media (min-width: 700px) {
  .modal {
    padding: 40px;
  }

  .boton-navegacion {
    background: rgba(124, 124, 124, 0.637);
    color: rgb(255, 255, 255);
    height: 40px;
    width: 40px;
  }

  .boton-navegacion:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.15);
  }

  .tarjeta-modal {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border-radius: 20px;
    box-shadow:
      0 25px 50px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.05);
    flex-direction: row;

    max-width: 1000px;
    overflow: hidden;
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(30px) scale(0.95);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .media-modal {
    background: #000000;
    border-radius: 20px 0 0 20px;
    flex: 1.1;
  }

  .info-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-left: 1px solid #e9ecef;
    border-top: none;
    color: #1a1a1a;
    display: flex;
    flex: 0.9;
    flex-direction: column;
    padding: 32px;
    position: static;
  }

  .texto-titulo {
    color: #1a1a1a;
    font-size: 1.6rem;
    text-shadow: none;
  }

  .meta {
    color: #6c757d;
  }

  .meta::before {
    color: #dee2e6;
  }

  .descripcion-texto {
    color: #495057;
    flex: 1;
  }

  .descripcion-texto.con-gradiente:not(.expandido)::after {
    background: linear-gradient(transparent, #f8f9fa);
  }

  .btn-ver-mas {
    align-self: flex-start;
    background: #007bff;
    border: 1.5px solid #007bff;
    color: white;
  }

  .btn-ver-mas:hover {
    background: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
  }

  .btn-me-gusta {
    align-self: flex-start;
    background: #f8f9fa;
    border: 1.5px solid #e9ecef;
    color: #495057;
  }

  .btn-me-gusta:hover {
    background: #e9ecef;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }

  .btn-me-gusta.activo {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
  }

  .acciones-pequenas {
    border-top: 1px solid #e9ecef;
    margin-top: auto;
    padding-top: 24px;
  }

  .contador-slides {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #e9ecef;
    color: #495057;
  }

  .descripcion-texto .enlace-descripcion {
    color: #007bff;
    border-bottom: 1px dotted #007bff;
  }

  .descripcion-texto .enlace-descripcion:hover {
    color: #0056b3;
    border-bottom: 1px solid #0056b3;
  }
}

@media (max-height: 700px) and (orientation: landscape) {
  .tarjeta-modal {
    flex-direction: row;
    max-height: 85vh;
  }

  .media-modal {
    flex: 1;
  }

  .info-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #1a1a1a;
    flex: 0.8;
    overflow-y: auto;
    position: static;
  }

  .texto-titulo {
    color: #1a1a1a;
  }

  .meta {
    color: #6c757d;
  }

  .descripcion-texto {
    color: #495057;
  }

  .btn-ver-mas {
    align-self: flex-start;
    background: #007bff;
    border: 1.5px solid #007bff;
    color: white;
  }

  .btn-ver-mas:hover {
    background: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
  }

  .btn-me-gusta {
    align-self: flex-start;
    background: #f8f9fa;
    border: 1.5px solid #e9ecef;
    color: #495057;
  }

  .btn-me-gusta:hover {
    background: #e9ecef;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }

  .btn-me-gusta.activo {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
  }
}
