* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Container para organizar las dos secciones */
.container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
}

/* Columna izquierda (para imágenes verticales) */
.leftGallery {
    width: 45%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* Columna derecha (para imágenes horizontales) */
.rightGallery {
    width: 45%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    height: fit-content;
    gap: 10px;
}

/* Estilo de los contenedores de imagen */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.image-container:hover {
    transform: scale(1.05);
}

/* Imagen dentro del contenedor */
.image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: contain; /* Asegura que las imágenes no se deformen */
}

/* Texto dentro de la imagen */
.image-text {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 16px;
    border-radius: 0 0 10px 10px;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 600px) {
    .leftGallery, .rightGallery {
        width: 100%;
    }

    .leftGallery, .rightGallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.navbar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    padding: 15px;
}

.back-arrow {
    font-size: 24px;
    text-decoration: none;
    color: black;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.back-arrow:hover {
    transform: scale(1.1);
}

.back-arrow::before {
    content: "←";
    font-size: 28px;
    margin-right: 8px;
}




/* El modal está oculto por defecto */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1; /* Se muestra encima del contenido */
    padding-top: 100px; /* Ubicación del modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0); /* Fondo oscuro */
    background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro con opacidad */
  }
  
  /* Imagen dentro del modal */
  .modal-content {
    margin: auto;
    display: block;
    width: 80%;
    height: auto;
  }
  
  /* Texto de la descripción en el modal */
  #caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 20px;
  }
  
  /* Botón de cierre */
  .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
  }
  
  .close:hover,
  .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
  }
  